Frames
Last updated
Was this helpful?
Last updated
Was this helpful?
Every communication protocol must ensure that the message is successfully delivered over the I/O link to the other side. The serialised message payload must be wrapped in some kind of transport information prior to being sent and unwrapped on the other side when received. The CommsDSL allows specification of such transport wraping using <frame> XML node.
Every frame definition must specify its using name .
It is possible to provide a description of the frame about what it is and how it is expected to be used. This description is only for documentation purposes and may find it's way into the generated code as a comment for the generated class. The is description.
The example above defines simple protocol framing where 1 byte of numeric message ID precedes the message payload.
Available layers are:
The protocol framing is defined using so called "layers", which are additional abstraction on top of , where every such layer has a specific purpose. For example:
- Message payload.
- Numeric message ID.
- Remaining size (length).
- Synchronization bytes.
- Checksum.
- Extra value, usually to be assigned to one of the
fields.
- Any other custom layer, not defined by CommsDSL.
If there is any other defined as XML child of the <frame>, then all the layers must be wrapped in <layers> XML element for separation.
All these layers have as well as their own specific set of properties.
Use for future references.