22template <
typename TTrailField,
typename TBase>
25 using BaseImpl = TBase;
26 using TrailField = TTrailField;
28 static_assert(!TrailField::isVersionDependent(),
29 "Suffix fields must not be version dependent");
32 using ValueType =
typename BaseImpl::ValueType;
33 using ElementType =
typename BaseImpl::ElementType;
43 : BaseImpl(
std::move(val))
52 constexpr std::size_t length()
const
54 return trailField_.length() + BaseImpl::length();
57 static constexpr std::size_t minLength()
59 return TrailField::minLength() + BaseImpl::minLength();
62 static constexpr std::size_t maxLength()
64 return TrailField::maxLength() + BaseImpl::maxLength();
69 return trailField_.valid() && BaseImpl::valid();
72 template <
typename TIter>
75 auto es = BaseImpl::read(iter, len - TrailField::minLength());
80 return trailField_.read(iter, len - BaseImpl::length());
83 static constexpr bool hasReadNoStatus()
88 template <
typename TIter>
89 void readNoStatus(TIter& iter) =
delete;
91 template <
typename TIter>
94 auto trailLen = trailField_.length();
95 auto es = BaseImpl::write(iter, len - trailLen);
100 return trailField_.write(iter, trailLen);
103 template <
typename TIter>
104 void writeNoStatus(TIter& iter)
const
106 BaseImpl::writeNoStatus(iter);
107 trailField_.writeNoStatus(iter);
111 TrailField trailField_;
This file contains classes required for generic custom assertion functionality.
This file contain definition of error statuses used by comms module.
comms::option::def::SequenceTrailingFieldSuffix< TField > SequenceTrailingFieldSuffix
Same as comms::option::def::SequenceTrailingFieldSuffix.
Definition options.h:1531
Main namespace for all classes / functions of COMMS library.
ErrorStatus
Error statuses reported by the Communication module.
Definition ErrorStatus.h:17
@ Success
Used to indicate successful outcome of the operation.