COMMS
Template library intended to help with implementation of communication protocols.
comms::option::def::SequenceSizeFieldPrefix< TField > Struct Template Reference

#include "comms/options.h"

Detailed Description

template<typename TField>
struct comms::option::def::SequenceSizeFieldPrefix< TField >

Option that modifies the default behaviour of collection fields to prepend the serialised data with number of elements information.

Quite often when collection of fields is serialised it must be prepended with one or more bytes indicating number of elements that will follow. Applicable to fields that represent collection of raw data or other fields, such as comms::field::ArrayList or comms::field::String.
For example sequence of raw bytes must be prefixed with 2 bytes stating the size of the sequence:

using MyField =
MyFieldBase,
std::uint8_t,
>
>;
Base class to all the field classes.
Definition: Field.h:33
Field that represents a sequential collection of fields.
Definition: ArrayList.h:192
Field that represent integral value.
Definition: IntValue.h:72
Option that modifies the default behaviour of collection fields to prepend the serialised data with n...
Definition: options.h:438
Template Parameters
TFieldType of the field that represents size

The documentation for this struct was generated from the following file: