Indicates to the publisher that a new message is being built.
This method must be called before setting any of the fields on the
message.
Syntax
uint16_t pub_beginMessage( uint16_t message_type, PUB_SEND_MESSAGE_CONTEXT * msg ).
Parameters
-
uint16_t message_type –
The type of message. The value for this parameter must match
the message type indicated in the template.
-
PUB_SEND_MESSAGE_CONTEXT * msg –
The message context for the message being built.
This structure must be allocated before calling this method. To simultaneously
build multiple messages from multiple threads, allocate
several PUB_SEND_MESSAGE_CONTEXT structures
and use one thread per message.
Returns
uint16_t error_code
An error code or ERR_NONE (value 0).