iCub-main
|
#include <can_string.h>
Public Member Functions | |
can_string2 () | |
Default constructor. | |
~can_string2 () | |
Destructor. | |
int | add_string (void *can_packet) |
Process a string can packet. | |
char * | print (int buffer_num) |
Prints a string buffer. | |
void | clear_string (int buffer_num) |
Resets the string buffer. | |
Definition at line 28 of file can_string.h.
can_string2< T >::can_string2 | ( | ) |
Default constructor.
Definition at line 83 of file can_string.h.
can_string2< T >::~can_string2 | ( | ) |
Destructor.
Definition at line 90 of file can_string.h.
|
inline |
Process a string can packet.
All can packets belonging to the same string are joined in the same string buffer untill the string is complete.
can_packet | is the can message (CMSG* type). It must belong to the CAN_BCAST_PRINT class. |
Definition at line 109 of file can_string.h.
|
inline |
Resets the string buffer.
cbuffer_num | is the number of the buffer. 0 <= buffer_num <= MAX_STRINGS |
Definition at line 95 of file can_string.h.
|
inline |
Prints a string buffer.
The buffer can be already completed (all parts of the can string have been already received or not). If the string contains a "hole" (a can packet is not arrived yet), the string will be printed till the first missing packet.
buffer_num | is the number of the buffer. 0 <= buffer_num <= MAX_STRINGS |
Definition at line 169 of file can_string.h.