Sending messages requires a pub_beginMessage function, which signals the start of a new message, and a pub_sendMessage function, which places messages into the network buffer.
The publisher API code uses the field name to check that the pub_SetField() functions have been called in the correct order and that the data value passed in is the correct datatype.
Each field within a message must be set in the order in which it is defined in the template.
The pub_beginMessage method signals to the RAP code that a new message is being started.
Each network buffer has one network buffer header that indicates the sequential packet number being sent. Buffering ensures multicast ordering and allows possible resend requests.
The publisher API encodes each value sent to it via any pub_setField() method directly into the wire-ready format buffer. Each successive value of a message is directly appended to make one string that can be sent over the network. Since messages may contain as few as 60 characters, multiple messages can be inserted into a single network packet buffer. Maximum transmission unit (MTU) size determines the packet size.
The pub_sendMessage method places one or more messages into one wire format network buffer, and places a sequential network packet number on each packet it multicasts.
When the pub_sendMessage() method is called, the buffer to be sent is already in the appropriate format. The message template number used to construct the message is the first field of the wire format message.
pub_sendMessage() places one or more messages into one wire format network buffer.
When pub_sendMessage() is called, it must have been configured to define the channels over which to multicast the packet. pub_sendMessage() is also responsible for placing a sequential network packet number on each packet that it multicasts.
Publisher uses multiple channels for sending messages to maintain high performance through parallelism.
Returns:
An error code or ERR_NONE (value 0).