Working With Fields
In order to automate some basic operations, all the fields had to provide the same basic interface. As the result the actual field values had to be wrapped in a class that defines the required public interface. Such class must also provide means to access/update the wrapped value. For example:
Let's assume the ActualMessage1
defines 3 integer value fields with serialisation lengths of 1, 2, and 4 bytes respectively.
The Dispatching and Handling chapter described the efficient way to dispatch message object to its handler. The appropriate handling function may access its field's value using the following code flow:
When preparing message to send, the similar code sequence may be applied to update the values:
Last updated