| 
    DataStructures 1.6.16
    
   A small compiled C library of data structures used in the NHP wrist center-out and other tasks. 
   | 
 
Message handler functions for serializing and desiarilizing byte messages. More...
Functions | |
| void | packTargetData (const RenderedCircleData *target, uint8_t targetIndex, char *buffer) | 
| Packs target data into a string buffer for transmission.   | |
| void | unpackTargetData (RenderedCircleData **targets, const char *buffer) | 
| Unpacks target data from a received message and updates the targets array.   | |
| void | packCursorData (const RenderedCircleData *cursor, char *buffer) | 
| Packs cursor data into a string buffer for transmission.   | |
| void | unpackCursorData (RenderedCircleData *cursor, const char *buffer) | 
| Unpacks cursor data from a received message and updates the cursor position.   | |
| void | packStateData (const StateData *stateData, char *buffer) | 
| Packs StateData struct into a byte buffer.   | |
| void | unpackStateData (StateData *stateData, const char *buffer) | 
| Unpacks byte buffer into StateData struct.   | |
Message handler functions for serializing and desiarilizing byte messages.
| void packCursorData | ( | const RenderedCircleData * | cursor, | 
| char * | buffer ) | 
Packs cursor data into a string buffer for transmission.
This function packs the x and y coordinates of the cursor into a comma-separated string.
| cursor | Pointer to the RenderedCircleData structure representing the cursor data. | 
| buffer | Pointer to the buffer where the packed data will be stored. | 
| void packStateData | ( | const StateData * | stateData, | 
| char * | buffer ) | 
| void packTargetData | ( | const RenderedCircleData * | target, | 
| uint8_t | targetIndex, | ||
| char * | buffer ) | 
Packs target data into a string buffer for transmission.
This function packs messages in the format "x,y,radius,render,targetIndex".
| target | Pointer to the RenderedCircleData structure representing the target data. | 
| targetIndex | Index of the target. | 
| buffer | Pointer to the buffer where the packed data will be stored. | 
| void unpackCursorData | ( | RenderedCircleData * | cursor, | 
| const char * | buffer ) | 
Unpacks cursor data from a received message and updates the cursor position.
This function assumes that the received message is in the format "x,y".
| cursor | Pointer to the RenderedCircleData structure representing the cursor. | 
| buffer | Pointer to the buffer containing the received message. | 
| void unpackStateData | ( | StateData * | stateData, | 
| const char * | buffer ) | 
| void unpackTargetData | ( | RenderedCircleData ** | targets, | 
| const char * | buffer ) | 
Unpacks target data from a received message and updates the targets array.
This function assumes that the received message is in the format "x,y,radius,render,targetIndex".
| targets | Array of pointers to RenderedCircleData structures representing the targets. | 
| buffer | Pointer to the buffer containing the received message. |