The "dsra" Package

These routines are meant to provide a mechanism to read the recursive, heirarchical data structure supported in Karma from open channels, in ASCII format. The use of these routines is NOT recommended. The dsxfr routines are the preferred means of transferring data structures.

Library: karma
Link With: -lkarma

Functions

dsra_multi_descRead ASCII representation of a multi_array data structure.
dsra_packet_descRead ASCII representation of a packet descriptor.
dsra_element_descRead ASCII representation of an element descriptor.
dsra_array_descRead ASCII representation of an array descriptor.
dsra_dim_descRead ASCII representation of a dimension descriptor.
dsra_multi_dataREAD ASCII representation of data in a multi_array descriptor.
dsra_packetRead ASCII representation of a data packet.
dsra_elementRead ASCII representation of an element.
dsra_arrayRead ASCII representation of an array of data packets.
dsra_listRead ASCII represention of a linked list.
dsra_flagRead ASCII representation of a boolean value.
dsra_typeRead ASCII representation of a data type.
dsra_uintRead the ASCII representation of an unsigned integer.
dsra_intRead the ASCII representation of a signed integer.
dsra_floatRead the ASCII representation of a floating point value.
dsra_doubleRead ASCII representation of a double floating point value.


Functions


multi_array * dsra_multi_desc (Channel channel)

This routine will read the ASCII representation of a multi_array data structure descriptor from a channel object.

Parameters:

Returns: A pointer to the multi array header on success, else NULL.
Multithreading Level: Unsafe
Note:


packet_desc * dsra_packet_desc (Channel channel)

This routine will read the ASCII representation of a packet descriptor from a channel object. The routine will recursively read in array and linked list descriptors if required.

Parameters:

Returns: A pointer to the packet descriptor on success, else NULL.
Multithreading Level: Unsafe


flag dsra_element_desc (Channel channel, unsigned int *type, char name[])

Read ASCII representation of an element descriptor.

Parameters:

Returns: TRUE if a valid element descriptor was read, else FALSE.
Multithreading Level: Unsafe


array_desc * dsra_array_desc (Channel channel, unsigned int type)

Read ASCII representation of an array descriptor.

Parameters:

Returns: A pointer to the array descriptor on success, else NULL.
Multithreading Level: Unsafe


dim_desc * dsra_dim_desc (Channel channel)

Read ASCII representation of a dimension descriptor.

Parameters:

Returns: A pointer to the dimension descriptor on success, else NULL.
Multithreading Level: Unsafe


flag dsra_multi_data (Channel channel, multi_array *multi_desc)

READ ASCII representation of data in a multi_array descriptor.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe
Note:


flag dsra_packet (Channel channel, packet_desc *descriptor, char *packet)

This routine will read the ASCII representation of a data packet. The routine will recursively read in sub arrays and linked lists.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag dsra_element (Channel channel, unsigned int type, char *desc, char *element)

Read ASCII representation of an element.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag dsra_array (Channel channel, array_desc *descriptor, char *array)

Read ASCII representation of an array of data packets.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag dsra_list (Channel channel, packet_desc *descriptor, list_header *header)

This routine will read in the ASCII representation of a linked list of data from a channel object. The routine will recursively read in sub arrays and linked lists.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


flag dsra_flag (Channel channel, flag *logical)

Read ASCII representation of a boolean value.

Parameters:

Returns: TRUE if the flag was read in without error, else FALSE.
Multithreading Level: Unsafe


flag dsra_type (Channel channel, unsigned int *type)

Read ASCII representation of a data type.

Parameters:

Returns: TRUE if the type was read without error, else FALSE.
Multithreading Level: Unsafe


flag dsra_uint (Channel channel, unsigned int *value)

Read the ASCII representation of an unsigned integer.

Parameters:

Returns: TRUE if successful, else FALSE.
Multithreading Level: Unsafe


flag dsra_int (Channel channel, int *value)

Read the ASCII representation of a signed integer.

Parameters:

Returns: TRUE if successful, else FALSE.
Multithreading Level: Unsafe


flag dsra_float (Channel channel, float *value)

Read the ASCII representation of a floating point value.

Parameters:

Returns: TRUE if successful, else FALSE.
Multithreading Level: Unsafe


flag dsra_double (Channel channel, double *value)

Read ASCII representation of a double floating point value.

Parameters:

Returns: TRUE if successful, else FALSE.
Multithreading Level: Unsafe


Back to Karma Home Page
Contact: Richard Gooch
Web Development: Ariel Internet Services