COMMS
Template library intended to help with implementation of communication protocols.
|
Namespace that contains all the options used to define protocol. More...
Namespace that contains all the options used to define protocol.
Classes | |
struct | AssumeFieldsExistence |
Option that notifies comms::MessageBase about existence of access to fields. More... | |
struct | AvailableLengthLimit |
Option used to specify that serialization length can be contolled by available data length. More... | |
struct | ChecksumLayerVerifyBeforeRead |
Force comms::protocol::ChecksumLayer and comms::protocol::ChecksumPrefixLayer, to verify checksum prior to forwarding read to the wrapped layer(s). More... | |
struct | ContentsValidator |
Option that specifies custom validation class. More... | |
struct | DefaultValueInitialiser |
Option that specifies default initialisation class. More... | |
struct | EmptySerialization |
Force field not to be serialized during read/write operations. More... | |
struct | Endian |
Options to specify endian. More... | |
struct | ExistsBetweenVersions |
Mark an comms::field::Optional field as existing between specified versions. More... | |
struct | ExtendingClass |
Option to specify real extending class. More... | |
struct | ExtraTransportFields |
Option used to specify some extra fields from transport framing. More... | |
struct | FailOnInvalid |
Option that forces field's read operation to fail if invalid value is received. More... | |
struct | FieldsImpl |
Option used to specify fields of the message and force implementation of default read, write, validity check, and length retrieval information of the message. More... | |
struct | FieldType |
Option used to specify actual type of the field. More... | |
struct | FixedBitLength |
Option used to specify number of bits that is used for field serialisation when a field is a member of comms::field::Bitfield. More... | |
struct | FixedLength |
Option used to specify number of bytes that is used for field serialisation. More... | |
struct | HasCustomRead |
Mark field class to have custom implementation of read functionality. More... | |
struct | HasCustomRefresh |
Mark message / field class to have custom implementation of refresh functionality. More... | |
struct | HasCustomVersionUpdate |
Mark message / field class to have custom implementation of version update functionality. More... | |
struct | HasCustomWrite |
Mark field class to have custom implementation of read functionality. More... | |
struct | HasDoGetId |
Option that notifies comms::MessageBase about existence of doGetId() member function in derived class. More... | |
struct | HasName |
Mark message class as providing its name information. More... | |
struct | HasVersionDependentMembers |
Mark complex fields like comms::field::Bundle or comms::field::Variant that their members are or are not version dependent. More... | |
struct | IgnoreInvalid |
Option that forces field's read operation to ignore read data if invalid value is received. More... | |
struct | InvalidByDefault |
Make the field's contents to be invalid by default. More... | |
struct | MissingOnInvalid |
Mark an comms::field::Optional field as missing if its contents are invalid (member field has invalid value). More... | |
struct | MissingOnReadFail |
Mark an comms::field::Optional field as missing if its read operation fails. More... | |
struct | MsgIdType |
Option used to specify type of the ID. More... | |
struct | MsgType |
Option used to specify actual type of the message. More... | |
struct | NoIdImpl |
Option used to specify that message doesn't have valid ID. More... | |
struct | NumValueSerOffset |
Option to specify numeric value serialisation offset. More... | |
struct | ProtocolLayerDisallowReadUntilDataSplit |
Disallow usage of ProtocolLayerForceReadUntilDataSplit option in earlier (outer wrapping) layers. More... | |
struct | ProtocolLayerForceReadUntilDataSplit |
Option to force comms::protocol::ProtocolLayerBase class to split read operation "until" and "from" data (payload) layer. More... | |
struct | ProtocolLayerSuppressReadUntilDataSplitForcing |
Option to forcefully disable passing the ProtocolLayerForceReadUntilDataSplit option to the layer definition. More... | |
struct | PseudoValue |
Option for comms::protocol::TransportValueLayer to mark that the handled field is a "pseudo" one, i.e. is not serialised. More... | |
struct | RemLengthMemberField |
Option to specify index of member field containing remaining length in bytes. More... | |
struct | ScalingRatio |
Option to specify scaling ratio. More... | |
struct | SequenceElemFixedSerLengthFieldPrefix |
Option that forces first element only of comms::field::ArrayList to be prefixed with its serialisation length. More... | |
struct | SequenceElemLengthForcingEnabled |
Option to enable external forcing of the collection element serialisation length. More... | |
struct | SequenceElemSerLengthFieldPrefix |
Option that forces every element of comms::field::ArrayList to be prefixed with its serialisation length. More... | |
struct | SequenceFixedSize |
Option used to define exact number of elements in the collection field. More... | |
struct | SequenceLengthForcingEnabled |
Option to enable external forcing of the collection's serialisation length duting "read" operation. More... | |
struct | SequenceSerLengthFieldPrefix |
Option that modifies the default behaviour of collection fields to prepend the serialised data with number of bytes information. More... | |
struct | SequenceSizeFieldPrefix |
Option that modifies the default behaviour of collection fields to prepend the serialised data with number of elements information. More... | |
struct | SequenceSizeForcingEnabled |
Option to enable external forcing of the collection's elements count. More... | |
struct | SequenceTerminationFieldSuffix |
Option that forces termination of the sequence when predefined value is encountered. More... | |
struct | SequenceTrailingFieldSuffix |
Option that forces collection fields to append provides suffix every time it is serialised. More... | |
struct | StaticNumIdImpl |
Option used to specify numeric ID of the message. More... | |
struct | Units |
Options to specify units of the field. More... | |
struct | ValidBigUnsignedNumValueRange |
Provide range of valid unsigned numeric values. More... | |
struct | ValidNumValueRange |
Provide range of valid numeric values. More... | |
struct | ValidRangesClear |
Clear accumulated ranges of valid values. More... | |
struct | VariantHasCustomResetOnDestruct |
Avoid invocation of built-in reset() member function on destruction of the comms::field::Variant field. More... | |
struct | VarLength |
Option used to specify that field may have variable serialisation length. More... | |
struct | VersionInExtraTransportFields |
Option used to specify index of the version field inside extra transport fields tuple provided with comms::option::def::ExtraTransportFields option. More... | |
struct | VersionStorage |
Add storage of version information inside private data members. More... | |
struct | VersionType |
Provide type to be used for versioning. More... | |
Typedefs | |
using | BigEndian = Endian< comms::traits::endian::Big > |
Alias option to Endian specifying Big endian. | |
template<std::uintmax_t TMask, std::uintmax_t TValue = 0U> | |
using | BitmaskReservedBits = ContentsValidator< details::BitmaskReservedBitsValidator< TMask, TValue > > |
Alias to ContentsValidator, it defines validator class that checks that reserved bits of the field have expected values. | |
template<std::uintmax_t TVal> | |
using | DefaultBigUnsignedNumValue = DefaultValueInitialiser< details::DefaultNumValueInitialiser< std::uintmax_t, TVal > > |
Alias to DefaultValueInitialiser, it defines initialiser class that assigns big unsigned numeric value provided as the template argument to this option. | |
template<std::intmax_t TVal> | |
using | DefaultNumValue = DefaultValueInitialiser< details::DefaultNumValueInitialiser< std::intmax_t, TVal > > |
Alias to DefaultValueInitialiser, it defines initialiser class that assigns numeric value provided as the template argument to this option. | |
template<comms::field::OptionalMode TVal> | |
using | DefaultOptionalMode = DefaultValueInitialiser< details::DefaultOptModeInitialiser< TVal > > |
Alias to DefaultValueInitialiser, it sets default mode to field::Optional field. | |
template<std::size_t TIdx> | |
using | DefaultVariantIndex = DefaultValueInitialiser< details::DefaultVariantIndexInitialiser< TIdx > > |
Alias to DefaultValueInitialiser, it initalises comms::field::Variant field to contain valid default value of the specified member. | |
using | EmptySerialisation = EmptySerialization |
Same as EmptySerialization. | |
using | ExistsByDefault = DefaultOptionalMode< comms::field::OptionalMode::Exists > |
Alias to DefaultOptionalMode. | |
template<std::uintmax_t TVer> | |
using | ExistsSinceVersion = ExistsBetweenVersions< TVer, std::numeric_limits< std::uintmax_t >::max()> |
Mark an comms::field::Optional field as existing starting from specified version. | |
template<std::uintmax_t TVer> | |
using | ExistsUntilVersion = ExistsBetweenVersions< 0, TVer > |
Mark an comms::field::Optional field as existing only until specified version. | |
using | HasDoRefresh = HasCustomRefresh |
Option that notifies comms::MessageBase about existence of custom refresh functionality in derived class. | |
using | LittleEndian = Endian< comms::traits::endian::Little > |
Alias option to Endian specifying Little endian. | |
using | MissingByDefault = DefaultOptionalMode< comms::field::OptionalMode::Missing > |
Alias to DefaultOptionalMode. | |
using | OptionalExistsByDefault = ExistsByDefault |
Alias to DefaultOptionalMode<comms::field::OptinalMode::Exists> | |
using | OptionalMissingByDefault = MissingByDefault |
Alias to DefaultOptionalMode<comms::field::OptinalMode::Missing> | |
using | UnitsAmps = Units< comms::traits::units::Current, comms::traits::units::AmpsRatio > |
Alias option, specifying field value units are "amps". | |
using | UnitsBytes = Units< comms::traits::units::Memory, comms::traits::units::BytesRatio > |
Alias option, specifying field value units are "bytes". | |
using | UnitsCentimeters = Units< comms::traits::units::Distance, comms::traits::units::CentimetersRatio > |
Alias option, specifying field value units are "centimeters". | |
using | UnitsCentimetersPerSecond = Units< comms::traits::units::Speed, comms::traits::units::CentimetersPerSecondRatio > |
Alias option, specifying field value units are "centimeters per second". | |
using | UnitsDays = Units< comms::traits::units::Time, comms::traits::units::DaysRatio > |
Alias option, specifying field value units are "days". | |
using | UnitsDegrees = Units< comms::traits::units::Angle, comms::traits::units::DegreesRatio > |
Alias option, specifying field value units are "degrees". | |
using | UnitsGigabytes = Units< comms::traits::units::Memory, comms::traits::units::GigabytesRatio > |
Alias option, specifying field value units are "gigabytes". | |
using | UnitsGigahertz = Units< comms::traits::units::Frequency, comms::traits::units::GigaHzRatio > |
Alias option, specifying field value units are "gigahertz". | |
using | UnitsHertz = Units< comms::traits::units::Frequency, comms::traits::units::HzRatio > |
Alias option, specifying field value units are "hertz". | |
using | UnitsHours = Units< comms::traits::units::Time, comms::traits::units::HoursRatio > |
Alias option, specifying field value units are "hours". | |
using | UnitsKiloamps = Units< comms::traits::units::Current, comms::traits::units::KiloampsRatio > |
Alias option, specifying field value units are "kiloamps". | |
using | UnitsKilobytes = Units< comms::traits::units::Memory, comms::traits::units::KilobytesRatio > |
Alias option, specifying field value units are "kilobytes". | |
using | UnitsKilohertz = Units< comms::traits::units::Frequency, comms::traits::units::KiloHzRatio > |
Alias option, specifying field value units are "kilohertz". | |
using | UnitsKilometers = Units< comms::traits::units::Distance, comms::traits::units::KilometersRatio > |
Alias option, specifying field value units are "kilometers". | |
using | UnitsKilometersPerHour = Units< comms::traits::units::Speed, comms::traits::units::KilometersPerHourRatio > |
Alias option, specifying field value units are "kilometers per hour". | |
using | UnitsKilometersPerSecond = Units< comms::traits::units::Speed, comms::traits::units::KilometersPerSecondRatio > |
Alias option, specifying field value units are "kilometers per second". | |
using | UnitsKilovolts = Units< comms::traits::units::Voltage, comms::traits::units::KilovoltsRatio > |
Alias option, specifying field value units are "kilovolts". | |
using | UnitsMegabytes = Units< comms::traits::units::Memory, comms::traits::units::MegabytesRatio > |
Alias option, specifying field value units are "megabytes". | |
using | UnitsMegahertz = Units< comms::traits::units::Frequency, comms::traits::units::MegaHzRatio > |
Alias option, specifying field value units are "megahertz". | |
using | UnitsMeters = Units< comms::traits::units::Distance, comms::traits::units::MetersRatio > |
Alias option, specifying field value units are "meters". | |
using | UnitsMetersPerSecond = Units< comms::traits::units::Speed, comms::traits::units::MetersPerSecondRatio > |
Alias option, specifying field value units are "meters per second". | |
using | UnitsMicroamps = Units< comms::traits::units::Current, comms::traits::units::MicroampsRatio > |
Alias option, specifying field value units are "microamps". | |
using | UnitsMicrometers = Units< comms::traits::units::Distance, comms::traits::units::MicrometersRatio > |
Alias option, specifying field value units are "micrometers". | |
using | UnitsMicrometersPerSecond = Units< comms::traits::units::Speed, comms::traits::units::MicrometersPerSecondRatio > |
Alias option, specifying field value units are "micrometers per second". | |
using | UnitsMicroseconds = Units< comms::traits::units::Time, comms::traits::units::MicrosecondsRatio > |
Alias option, specifying field value units are "microseconds". | |
using | UnitsMicrovolts = Units< comms::traits::units::Voltage, comms::traits::units::MicrovoltsRatio > |
Alias option, specifying field value units are "microvolts". | |
using | UnitsMilliamps = Units< comms::traits::units::Current, comms::traits::units::MilliampsRatio > |
Alias option, specifying field value units are "milliamps". | |
using | UnitsMillimeters = Units< comms::traits::units::Distance, comms::traits::units::MillimetersRatio > |
Alias option, specifying field value units are "millimeters". | |
using | UnitsMillimetersPerSecond = Units< comms::traits::units::Speed, comms::traits::units::MillimetersPerSecondRatio > |
Alias option, specifying field value units are "millimeters per second". | |
using | UnitsMilliseconds = Units< comms::traits::units::Time, comms::traits::units::MillisecondsRatio > |
Alias option, specifying field value units are "milliseconds". | |
using | UnitsMillivolts = Units< comms::traits::units::Voltage, comms::traits::units::MillivoltsRatio > |
Alias option, specifying field value units are "millivolts". | |
using | UnitsMinutes = Units< comms::traits::units::Time, comms::traits::units::MinutesRatio > |
Alias option, specifying field value units are "minutes". | |
using | UnitsNanoamps = Units< comms::traits::units::Current, comms::traits::units::NanoampsRatio > |
Alias option, specifying field value units are "nanoamps". | |
using | UnitsNanometers = Units< comms::traits::units::Distance, comms::traits::units::NanometersRatio > |
Alias option, specifying field value units are "nanometers". | |
using | UnitsNanometersPerSecond = Units< comms::traits::units::Speed, comms::traits::units::NanometersPerSecondRatio > |
Alias option, specifying field value units are "nanometers per second". | |
using | UnitsNanoseconds = Units< comms::traits::units::Time, comms::traits::units::NanosecondsRatio > |
Alias option, specifying field value units are "nanoseconds". | |
using | UnitsNanovolts = Units< comms::traits::units::Voltage, comms::traits::units::NanovoltsRatio > |
Alias option, specifying field value units are "nanovolts". | |
using | UnitsRadians = Units< comms::traits::units::Angle, comms::traits::units::RadiansRatio > |
Alias option, specifying field value units are "radians". | |
using | UnitsSeconds = Units< comms::traits::units::Time, comms::traits::units::SecondsRatio > |
Alias option, specifying field value units are "seconds". | |
using | UnitsTerabytes = Units< comms::traits::units::Memory, comms::traits::units::TerabytesRatio > |
Alias option, specifying field value units are "terabytes". | |
using | UnitsVolts = Units< comms::traits::units::Voltage, comms::traits::units::VoltsRatio > |
Alias option, specifying field value units are "volts". | |
using | UnitsWeeks = Units< comms::traits::units::Time, comms::traits::units::WeeksRatio > |
Alias option, specifying field value units are "weeks". | |
template<std::uintmax_t TValue> | |
using | ValidBigUnsignedNumValue = ValidBigUnsignedNumValueRange< TValue, TValue > |
Alias to ValidBigUnsignedNumValueRange. | |
template<std::uintmax_t TValue> | |
using | ValidBigUnsignedNumValueOverride = ValidBigUnsignedNumValueRangeOverride< TValue, TValue > |
Alias to ValidBigUnsignedNumValueRangeOverride. | |
template<std::uintmax_t TMinValue, std::uintmax_t TMaxValue> | |
using | ValidBigUnsignedNumValueRangeOverride = std::tuple< ValidBigUnsignedNumValueRange< TMinValue, TMaxValue >, ValidRangesClear > |
Similar to ValidBigUnsignedNumValueRange, but overrides (nullifies) all previously set valid values ranges. | |
template<std::intmax_t TValue> | |
using | ValidNumValue = ValidNumValueRange< TValue, TValue > |
Alias to ValidNumValueRange. | |
template<std::intmax_t TValue> | |
using | ValidNumValueOverride = ValidNumValueRangeOverride< TValue, TValue > |
Alias to ValidNumValueRangeOverride. | |
template<std::intmax_t TMinValue, std::intmax_t TMaxValue> | |
using | ValidNumValueRangeOverride = std::tuple< ValidNumValueRange< TMinValue, TMaxValue >, ValidRangesClear > |
Similar to ValidNumValueRange, but overrides (nullifies) all previously set valid values ranges. | |
using | ZeroFieldsImpl = FieldsImpl< std::tuple<> > |
Alias to FieldsImpl<std::tuple<> > | |
using comms::option::def::BitmaskReservedBits = typedef ContentsValidator<details::BitmaskReservedBitsValidator<TMask, TValue> > |
Alias to ContentsValidator, it defines validator class that checks that reserved bits of the field have expected values.
It is usually used with comms::field::BitmaskValue field to specify values of the unused/reserved bits. The custom validator will return true if
TMask | Mask that specifies reserved bits. |
TValue | Expected value of the reserved bits. Defaults to 0. |
using comms::option::def::DefaultBigUnsignedNumValue = typedef DefaultValueInitialiser< details::DefaultNumValueInitialiser<std::uintmax_t, TVal> > |
Alias to DefaultValueInitialiser, it defines initialiser class that assigns big unsigned numeric value provided as the template argument to this option.
If the required numeric value is small enough to fit into std::intmax_t type, it is recommended to use DefaultNumValue option class instead.
TVal | Numeric value is to be assigned to the field in default constructor. |
using comms::option::def::DefaultNumValue = typedef DefaultValueInitialiser< details::DefaultNumValueInitialiser<std::intmax_t, TVal> > |
Alias to DefaultValueInitialiser, it defines initialiser class that assigns numeric value provided as the template argument to this option.
If the required numeric value is too big (doesn't fit into std::intmax_t type), please use DefaultBigUnsignedNumValue option class instead.
TVal | Numeric value is to be assigned to the field in default constructor. |
using comms::option::def::DefaultOptionalMode = typedef DefaultValueInitialiser<details::DefaultOptModeInitialiser<TVal> > |
Alias to DefaultValueInitialiser, it sets default mode to field::Optional field.
TVal | Optional mode value is to be assigned to the field in default constructor. |
using comms::option::def::DefaultVariantIndex = typedef DefaultValueInitialiser<details::DefaultVariantIndexInitialiser<TIdx> > |
Alias to DefaultValueInitialiser, it initalises comms::field::Variant field to contain valid default value of the specified member.
TIdx | Index of the default member. |
using comms::option::def::EmptySerialisation = typedef EmptySerialization |
Same as EmptySerialization.
Just British English spelling.
using comms::option::def::ExistsByDefault = typedef DefaultOptionalMode<comms::field::OptionalMode::Exists> |
Alias to DefaultOptionalMode.
Equivalent to
using comms::option::def::ExistsSinceVersion = typedef ExistsBetweenVersions<TVer, std::numeric_limits<std::uintmax_t>::max()> |
Mark an comms::field::Optional field as existing starting from specified version.
Alias to ExistsBetweenVersions
TVer | First version when field has been added |
using comms::option::def::ExistsUntilVersion = typedef ExistsBetweenVersions<0, TVer> |
Mark an comms::field::Optional field as existing only until specified version.
Alias to ExistsBetweenVersions
TVer | Last version when field still hasn't been removed. |
using comms::option::def::HasDoRefresh = typedef HasCustomRefresh |
Option that notifies comms::MessageBase about existence of custom refresh functionality in derived class.
Alias to HasCustomRefresh for backward compatibility.
using comms::option::def::MissingByDefault = typedef DefaultOptionalMode<comms::field::OptionalMode::Missing> |
Alias to DefaultOptionalMode.
Equivalent to
using comms::option::def::ValidBigUnsignedNumValue = typedef ValidBigUnsignedNumValueRange<TValue, TValue> |
Alias to ValidBigUnsignedNumValueRange.
Equivalent to ValidBigUnsignedNumValueRange<TValue, TValue>
using comms::option::def::ValidBigUnsignedNumValueOverride = typedef ValidBigUnsignedNumValueRangeOverride<TValue, TValue> |
Alias to ValidBigUnsignedNumValueRangeOverride.
Equivalent to ValidBigUnsignedNumValueRangeOverride<TValue, TValue>
using comms::option::def::ValidBigUnsignedNumValueRangeOverride = typedef std::tuple< ValidBigUnsignedNumValueRange<TMinValue, TMaxValue>, ValidRangesClear > |
Similar to ValidBigUnsignedNumValueRange, but overrides (nullifies) all previously set valid values ranges.
using comms::option::def::ValidNumValue = typedef ValidNumValueRange<TValue, TValue> |
Alias to ValidNumValueRange.
Equivalent to ValidNumValueRange<TValue, TValue>
using comms::option::def::ValidNumValueOverride = typedef ValidNumValueRangeOverride<TValue, TValue> |
Alias to ValidNumValueRangeOverride.
Equivalent to ValidNumValueRangeOverride<TValue, TValue>
using comms::option::def::ValidNumValueRangeOverride = typedef std::tuple< ValidNumValueRange<TMinValue, TMaxValue>, ValidRangesClear > |
Similar to ValidNumValueRange, but overrides (nullifies) all previously set valid values ranges.