The basic operation requires the decoding of data within a discreet packet as well as the ability to determine the end of one message and beginning of another within that packet.
Decoding a Packet
Decoding of the datagram should be conducted as a unit of work in which only the data in a given packet participates in the scope of the decoding process. To determine when the process has fully decoded a discreet message, it is important to use the template to step through a message field-by-field.
Decoding Messages in a Packet
When the decoder determines that it has processed all repeating groups in the message, and that there are no further fields specified by the template, then it can conclude that the end of the message has been reached. In this way, it is necessary to use the presence maps, NoMDEntries, and the template to determine when end of message has been reached. To recap, the steps involved are:
• Decode fields in the non-repeating body of the message using the high-level presence map.
• If the last field in the template has been reached the end of message has been encountered.
• If the NoMDEntries field is present, then process each repeating group using the repeating group presence map and template.
• When number of repeating groups processed equals the count specified in NoMDEntries, then the end of the repeating groups has been encountered.
Error Handling in a Broadcast Environment
If FAST encounters an error during the process of decoding the contents of a UDP packet, the process should stop, log the problem, and decode the next packet. In all likelihood, the error is due to an inconsistency between the encoded data and the template being used to decode the data. At this point, it is advised that parties synchronize templates in order to ensure that the same data definitions are being used.