27 ZCM_MSG_ITEM_CHAR = 1,
28 ZCM_MSG_ITEM_SHORT = 2,
30 ZCM_MSG_ITEM_LONG = 4,
31 ZCM_MSG_ITEM_FLOAT = 5,
32 ZCM_MSG_ITEM_DOUBLE = 6,
33 ZCM_MSG_ITEM_ARRAY = 7,
34 ZCM_MSG_ITEM_TEXT = 8,
35 ZCM_MSG_ITEM_BYTES = 9
42 ZCM_MSG_ARRAY_CHAR = 1,
43 ZCM_MSG_ARRAY_SHORT = 2,
44 ZCM_MSG_ARRAY_INT = 3,
45 ZCM_MSG_ARRAY_FLOAT = 4,
46 ZCM_MSG_ARRAY_DOUBLE = 5
55 ZCM_MSG_ERR_TYPE = -2,
56 ZCM_MSG_ERR_RANGE = -3,
57 ZCM_MSG_ERR_FORMAT = -4
64 ZCM_MSG_VALUE_TEXT = 1,
65 ZCM_MSG_VALUE_DOUBLE = 2,
66 ZCM_MSG_VALUE_FLOAT = 3,
216 uint32_t elements,
const void *data);
344 uint32_t *elements,
const void **data);
int zcm_msg_get_char(zcm_msg_t *msg, char *value)
Read the next char item.
int zcm_msg_put_value_float(zcm_msg_t *msg, float value)
Append the standardized scalar value as float.
void zcm_msg_free(zcm_msg_t *msg)
Free a message allocated by zcm_msg_new().
int zcm_msg_from_bytes(zcm_msg_t *msg, const void *data, size_t len)
Load message state from serialized envelope bytes.
int zcm_msg_put_float(zcm_msg_t *msg, float value)
Append a float item.
int zcm_msg_get_double(zcm_msg_t *msg, double *value)
Read the next double item.
int zcm_msg_put_char(zcm_msg_t *msg, char value)
Append a char item.
int zcm_msg_put_int(zcm_msg_t *msg, int32_t value)
Append a 32-bit signed integer item.
struct zcm_msg zcm_msg_t
Opaque typed message container.
int zcm_msg_put_value_text(zcm_msg_t *msg, const char *value)
Append the standardized scalar value as text.
int zcm_msg_get_float(zcm_msg_t *msg, float *value)
Read the next float item.
int zcm_msg_put_bytes(zcm_msg_t *msg, const void *data, uint32_t len)
Append an opaque byte buffer item.
zcm_msg_t * zcm_msg_new(void)
Allocate a new empty message.
int zcm_msg_put_array(zcm_msg_t *msg, zcm_msg_array_type_t type, uint32_t elements, const void *data)
Append an array item.
int zcm_msg_put_value_int(zcm_msg_t *msg, int32_t value)
Append the standardized scalar value as int.
int zcm_msg_validate(const zcm_msg_t *msg)
Validate encoded payload structure.
struct zcm_msg_value zcm_msg_value_t
Decoded standardized scalar value extracted from a message.
const void * zcm_msg_data(const zcm_msg_t *msg, size_t *len)
Get raw payload bytes (without transport envelope).
zcm_msg_array_type_t
Element type for array payload items.
int zcm_msg_put_double(zcm_msg_t *msg, double value)
Append a double item.
int zcm_msg_put_value_double(zcm_msg_t *msg, double value)
Append the standardized scalar value as double.
int zcm_msg_put_long(zcm_msg_t *msg, int64_t value)
Append a 64-bit signed integer item.
zcm_msg_status_t
Status/error codes returned by zcm_msg APIs.
zcm_msg_item_type_t
Encoded item kind stored in a message payload.
void zcm_msg_rewind(zcm_msg_t *msg)
Reset only the payload read cursor to the beginning.
int zcm_msg_set_type(zcm_msg_t *msg, const char *type)
Set application-level message type string.
int zcm_msg_get_value(zcm_msg_t *msg, zcm_msg_value_t *out)
Decode the standardized scalar value from the current read offset.
void zcm_msg_reset(zcm_msg_t *msg)
Clear payload, type name, and read cursor of a message.
int zcm_msg_get_short(zcm_msg_t *msg, int16_t *value)
Read the next 16-bit signed integer item.
const char * zcm_msg_get_type(const zcm_msg_t *msg)
Get the message type string.
int zcm_msg_put_short(zcm_msg_t *msg, int16_t value)
Append a 16-bit signed integer item.
int zcm_msg_get_bytes(zcm_msg_t *msg, const void **data, uint32_t *len)
Read the next raw byte item.
int zcm_msg_get_int(zcm_msg_t *msg, int32_t *value)
Read the next 32-bit signed integer item.
int zcm_msg_put_text(zcm_msg_t *msg, const char *value)
Append a UTF-8 or ASCII text item.
int zcm_msg_get_long(zcm_msg_t *msg, int64_t *value)
Read the next 64-bit signed integer item.
int zcm_msg_get_text(zcm_msg_t *msg, const char **value, uint32_t *len)
Read the next text item.
const char * zcm_msg_last_error(const zcm_msg_t *msg)
Get the last decode/validation error text for a message.
zcm_msg_value_kind_t
Canonical scalar kind used by the standardized value property.
int zcm_msg_get_array(zcm_msg_t *msg, zcm_msg_array_type_t *type, uint32_t *elements, const void **data)
Read the next array item.
size_t zcm_msg_remaining(const zcm_msg_t *msg)
Get unread payload bytes remaining from current read cursor.
Decoded standardized scalar value extracted from a message.
const char * text
Text value pointer for ZCM_MSG_VALUE_TEXT (message-owned).
int32_t i
Integer value for ZCM_MSG_VALUE_INT.
double d
Double value for ZCM_MSG_VALUE_DOUBLE.
float f
Float value for ZCM_MSG_VALUE_FLOAT.
zcm_msg_value_kind_t kind
Value kind.
uint32_t text_len
Text length in bytes for text.