The <size> layer represents remaining serialization length of the frame until the end of <payload>. The frame definition must NOT contain more than one <size> layer.
Some protocols may specify that the field of the <size> layer contains its own length as well. The CommsDSL allows implementation of such case by adding usage of serOffset property to the field of the <size> layer.
The example below implements ID (2 bytes) | SIZE (2 bytes) | PAYLOAD framing where SIZE value includes length of the header (ID + SIZE) in addition to the length of PAYLOAD.
Also NOTE that <size> layer specifies number of remaining bytes until the end of <payload> layer. There are protocols that append some kind of <checksum> after the payload. In order to include them in the value of the <size> layer, also use serOffset property.
The <size> layer doesn't have any extra properties in addition to common ones.