COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
Bundle.h
Go to the documentation of this file.
1//
2// Copyright 2015 - 2025 (C). Alex Robenko. All rights reserved.
3//
4// This Source Code Form is subject to the terms of the Mozilla Public
5// License, v. 2.0. If a copy of the MPL was not distributed with this
6// file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
10
11#pragma once
12
13#include "comms/ErrorStatus.h"
14#include "comms/field/basic/Bundle.h"
15#include "comms/field/details/AdaptBasicField.h"
16#include "comms/options.h"
17#include "comms/util/Tuple.h"
18
19#include <utility>
20
21namespace comms
22{
23
24namespace field
25{
26
57template <typename TFieldBase, typename TMembers, typename... TOptions>
58class Bundle : public
59 details::AdaptBasicFieldT<
60 basic::Bundle<
61 TFieldBase,
62 details::OptionsParser<TOptions...>::ForcedMembersVersionDependency,
63 TMembers>,
64 TOptions...
65 >
66{
67 using BaseImpl =
68 details::AdaptBasicFieldT<
69 basic::Bundle<
70 TFieldBase,
71 details::OptionsParser<TOptions...>::ForcedMembersVersionDependency,
72 TMembers>,
73 TOptions...
74 >;
76 "TMembers is expected to be a tuple of std::tuple<...>");
77
78 static_assert(
79 1U <= std::tuple_size<TMembers>::value,
80 "Number of members is expected to be at least 1.");
81
82public:
84 using FieldBase = TFieldBase;
85
87 using Endian = typename BaseImpl::Endian;
88
90 using VersionType = typename BaseImpl::VersionType;
91
93 using ParsedOptions = details::OptionsParser<TOptions...>;
94
96 using CommsTag = typename BaseImpl::CommsTag;
97
101 using ValueType = typename BaseImpl::ValueType;
102
106 using FieldType = typename ParsedOptions::FieldType;
107
110 Bundle() = default;
111
113 explicit Bundle(const ValueType& val)
114 : BaseImpl(val)
115 {
116 }
117
119 explicit Bundle(ValueType&& val)
120 : BaseImpl(std::move(val))
121 {
122 }
123
126 static constexpr bool hasFailOnInvalid()
127 {
128 return ParsedOptions::HasFailOnInvalid;
129 }
130
133 static constexpr bool hasIgnoreInvalid()
134 {
135 return ParsedOptions::HasIgnoreInvalid;
136 }
137
140 static constexpr bool hasEmptySerialization()
141 {
142 return ParsedOptions::HasEmptySerialization;
143 }
144
147 static constexpr bool hasFieldType()
148 {
149 return ParsedOptions::HasFieldType;
150 }
151
154 static constexpr bool hasFixedValue()
155 {
156 return ParsedOptions::HasFixedValue;
157 }
158
161 static constexpr bool hasName()
162 {
163 return ParsedOptions::HasName;
164 }
165
168 {
169 return BaseImpl::value();
170 }
171
173 const ValueType& value() const
174 {
175 return BaseImpl::value();
176 }
177
180 const ValueType& getValue() const
181 {
182 return BaseImpl::getValue();
183 }
184
187 template <typename U>
188 void setValue(U&& val)
189 {
190 BaseImpl::setValue(std::forward<U>(val));
191 }
192
197 std::size_t length() const
198 {
199 return BaseImpl::length();
200 }
201
208 template <std::size_t TFromIdx>
209 std::size_t lengthFrom() const
210 {
211 return BaseImpl::template lengthFrom<TFromIdx>();
212 }
213
220 template <std::size_t TUntilIdx>
221 std::size_t lengthUntil() const
222 {
223 return BaseImpl::template lengthUntil<TUntilIdx>();
224 }
225
234 template <std::size_t TFromIdx, std::size_t TUntilIdx>
235 std::size_t lengthFromUntil() const
236 {
237 return BaseImpl::template lengthFromUntil<TFromIdx, TUntilIdx>();
238 }
239
242 static constexpr std::size_t minLength()
243 {
244 return BaseImpl::minLength();
245 }
246
251 template <std::size_t TFromIdx>
252 static constexpr std::size_t minLengthFrom()
253 {
254 return BaseImpl::template minLengthFrom<TFromIdx>();
255 }
256
261 template <std::size_t TUntilIdx>
262 static constexpr std::size_t minLengthUntil()
263 {
264 return BaseImpl::template minLengthUntil<TUntilIdx>();
265 }
266
273 template <std::size_t TFromIdx, std::size_t TUntilIdx>
274 static constexpr std::size_t minLengthFromUntil()
275 {
276 return BaseImpl::template minLengthFromUntil<TFromIdx, TUntilIdx>();
277 }
278
281 static constexpr std::size_t maxLength()
282 {
283 return BaseImpl::maxLength();
284 }
285
290 template <std::size_t TFromIdx>
291 static constexpr std::size_t maxLengthFrom()
292 {
293 return BaseImpl::template maxLengthFrom<TFromIdx>();
294 }
295
300 template <std::size_t TUntilIdx>
301 static constexpr std::size_t maxLengthUntil()
302 {
303 return BaseImpl::template maxLengthUntil<TUntilIdx>();
304 }
305
312 template <std::size_t TFromIdx, std::size_t TUntilIdx>
313 static constexpr std::size_t maxLengthFromUntil()
314 {
315 return BaseImpl::template maxLengthFromUntil<TFromIdx, TUntilIdx>();
316 }
317
324 template <typename TIter>
325 ErrorStatus read(TIter& iter, std::size_t size)
326 {
327 return BaseImpl::read(iter, size);
328 }
329
340 template <std::size_t TFromIdx, typename TIter>
341 ErrorStatus readFrom(TIter& iter, std::size_t len)
342 {
343 return BaseImpl::template readFrom<TFromIdx>(iter, len);
344 }
345
357 template <std::size_t TFromIdx, typename TIter>
358 ErrorStatus readFromAndUpdateLen(TIter& iter, std::size_t& len)
359 {
360 return BaseImpl::template readFromAndUpdateLen<TFromIdx>(iter, len);
361 }
362
373 template <std::size_t TUntilIdx, typename TIter>
374 ErrorStatus readUntil(TIter& iter, std::size_t len)
375 {
376 return BaseImpl::template readUntil<TUntilIdx>(iter, len);
377 }
378
390 template <std::size_t TUntilIdx, typename TIter>
391 ErrorStatus readUntilAndUpdateLen(TIter& iter, std::size_t& len)
392 {
393 return BaseImpl::template readUntilAndUpdateLen<TUntilIdx>(iter, len);
394 }
395
409 template <std::size_t TFromIdx, std::size_t TUntilIdx, typename TIter>
410 ErrorStatus readFromUntil(TIter& iter, std::size_t len)
411 {
412 return BaseImpl::template readFromUntil<TFromIdx, TUntilIdx>(iter, len);
413 }
414
429 template <std::size_t TFromIdx, std::size_t TUntilIdx, typename TIter>
430 ErrorStatus readFromUntilAndUpdateLen(TIter& iter, std::size_t& len)
431 {
432 return BaseImpl::template readFromUntilAndUpdateLen<TFromIdx, TUntilIdx>(iter, len);
433 }
434
437 static constexpr bool hasReadNoStatus()
438 {
439 return BaseImpl::hasReadNoStatus();
440 }
441
447 template <typename TIter>
448 void readNoStatus(TIter& iter)
449 {
450 BaseImpl::readNoStatus(iter);
451 }
452
462 template <std::size_t TFromIdx, typename TIter>
463 void readFromNoStatus(TIter& iter)
464 {
465 BaseImpl::template readFromNoStatus<TFromIdx>(iter);
466 }
467
477 template <std::size_t TUntilIdx, typename TIter>
478 void readUntilNoStatus(TIter& iter)
479 {
480 BaseImpl::template readUntilNoStatus<TUntilIdx>(iter);
481 }
482
495 template <std::size_t TFromIdx, std::size_t TUntilIdx, typename TIter>
496 void readFromUntilNoStatus(TIter& iter)
497 {
498 BaseImpl::template readFromUntilNoStatus<TFromIdx, TUntilIdx>(iter);
499 }
500
502 bool canWrite() const
503 {
504 return BaseImpl::canWrite();
505 }
506
513 template <typename TIter>
514 ErrorStatus write(TIter& iter, std::size_t size) const
515 {
516 return BaseImpl::write(iter, size);
517 }
518
529 template <std::size_t TFromIdx, typename TIter>
530 ErrorStatus writeFrom(TIter& iter, std::size_t size) const
531 {
532 return BaseImpl::template writeFrom<TFromIdx>(iter, size);
533 }
534
545 template <std::size_t TUntilIdx, typename TIter>
546 ErrorStatus writeUntil(TIter& iter, std::size_t size) const
547 {
548 return BaseImpl::template writeUntil<TUntilIdx>(iter, size);
549 }
550
564 template <std::size_t TFromIdx, std::size_t TUntilIdx, typename TIter>
565 ErrorStatus writeFromUntil(TIter& iter, std::size_t size) const
566 {
567 return BaseImpl::template writeFromUntil<TFromIdx, TUntilIdx>(iter, size);
568 }
569
572 static constexpr bool hasWriteNoStatus()
573 {
574 return BaseImpl::hasWriteNoStatus();
575 }
576
582 template <typename TIter>
583 void writeNoStatus(TIter& iter) const
584 {
585 BaseImpl::writeNoStatus(iter);
586 }
587
597 template <std::size_t TFromIdx, typename TIter>
598 void writeFromNoStatus(TIter& iter)
599 {
600 BaseImpl::template writeFromNoStatus<TFromIdx>(iter);
601 }
602
612 template <std::size_t TUntilIdx, typename TIter>
613 void writeUntilNoStatus(TIter& iter)
614 {
615 BaseImpl::template writeUntilNoStatus<TUntilIdx>(iter);
616 }
617
629 template <std::size_t TFromIdx, std::size_t TUntilIdx, typename TIter>
630 void writeFromUntilNoStatus(TIter& iter)
631 {
632 BaseImpl::template writeFromUntilNoStatus<TFromIdx, TUntilIdx>(iter);
633 }
634
636 bool valid() const
637 {
638 return BaseImpl::valid();
639 }
640
644 bool refresh()
645 {
646 return BaseImpl::refresh();
647 }
648
650 static constexpr bool isVersionDependent()
651 {
652 return ParsedOptions::HasCustomVersionUpdate || BaseImpl::isVersionDependent();
653 }
654
656 static constexpr bool hasNonDefaultRefresh()
657 {
658 return BaseImpl::hasNonDefaultRefresh();
659 }
660
664 {
665 return BaseImpl::getVersion();
666 }
667
671 {
672 return BaseImpl::setVersion(version);
673 }
674
675protected:
676 using BaseImpl::readData;
677 using BaseImpl::writeData;
678
679private:
680 static_assert(!ParsedOptions::HasSerOffset,
681 "comms::option::def::NumValueSerOffset option is not applicable to Bundle field");
682 static_assert(!ParsedOptions::HasFixedLengthLimit,
683 "comms::option::def::FixedLength option is not applicable to Bundle field");
684 static_assert(!ParsedOptions::HasFixedBitLengthLimit,
685 "comms::option::def::FixedBitLength option is not applicable to Bundle field");
686 static_assert(!ParsedOptions::HasVarLengthLimits,
687 "comms::option::def::VarLength option is not applicable to Bundle field");
688 static_assert(!ParsedOptions::HasAvailableLengthLimit,
689 "comms::option::def::AvailableLengthLimit option is not applicable to Bundle field");
690 static_assert(!ParsedOptions::HasSequenceElemLengthForcing,
691 "comms::option::def::SequenceElemLengthForcingEnabled option is not applicable to Bundle field");
692 static_assert(!ParsedOptions::HasSequenceSizeForcing,
693 "comms::option::def::SequenceSizeForcingEnabled option is not applicable to Bundle field");
694 static_assert(!ParsedOptions::HasSequenceLengthForcing,
695 "comms::option::def::SequenceLengthForcingEnabled option is not applicable to Bundle field");
696 static_assert(!ParsedOptions::HasSequenceFixedSize,
697 "comms::option::def::SequenceFixedSize option is not applicable to Bundle field");
698 static_assert(!ParsedOptions::HasSequenceFixedSizeUseFixedSizeStorage,
699 "comms::option::app::SequenceFixedSizeUseFixedSizeStorage option is not applicable to Bundle field");
700 static_assert(!ParsedOptions::HasSequenceSizeFieldPrefix,
701 "comms::option::def::SequenceSizeFieldPrefix option is not applicable to Bundle field");
702 static_assert(!ParsedOptions::HasSequenceSerLengthFieldPrefix,
703 "comms::option::def::SequenceSerLengthFieldPrefix option is not applicable to Bundle field");
704 static_assert(!ParsedOptions::HasSequenceElemSerLengthFieldPrefix,
705 "comms::option::def::SequenceElemSerLengthFieldPrefix option is not applicable to Bundle field");
706 static_assert(!ParsedOptions::HasSequenceElemFixedSerLengthFieldPrefix,
707 "comms::option::def::SequenceElemSerLengthFixedFieldPrefix option is not applicable to Bundle field");
708 static_assert(!ParsedOptions::HasSequenceTrailingFieldSuffix,
709 "comms::option::def::SequenceTrailingFieldSuffix option is not applicable to Bundle field");
710 static_assert(!ParsedOptions::HasSequenceTerminationFieldSuffix,
711 "comms::option::def::SequenceTerminationFieldSuffix option is not applicable to Bundle field");
712 static_assert(!ParsedOptions::HasFixedSizeStorage,
713 "comms::option::app::FixedSizeStorage option is not applicable to Bundle field");
714 static_assert(!ParsedOptions::HasCustomStorageType,
715 "comms::option::app::CustomStorageType option is not applicable to Bundle field");
716 static_assert(!ParsedOptions::HasScalingRatio,
717 "comms::option::def::ScalingRatio option is not applicable to Bundle field");
718 static_assert(!ParsedOptions::HasUnits,
719 "comms::option::def::Units option is not applicable to Bundle field");
720 static_assert(!ParsedOptions::HasOrigDataView,
721 "comms::option::app::OrigDataView option is not applicable to Bundle field");
722 static_assert(!ParsedOptions::HasMultiRangeValidation,
723 "comms::option::def::ValidNumValueRange (or similar) option is not applicable to Bundle field");
724 static_assert(!ParsedOptions::HasVersionsRange,
725 "comms::option::def::ExistsBetweenVersions (or similar) option is not applicable to Bundle field");
726 static_assert(!ParsedOptions::HasInvalidByDefault,
727 "comms::option::def::InvalidByDefault option is not applicable to Bundle field");
728 static_assert(!ParsedOptions::HasMissingOnReadFail,
729 "comms::option::def::MissingOnReadFail option is not applicable to Bundle field");
730 static_assert(!ParsedOptions::HasMissingOnInvalid,
731 "comms::option::def::MissingOnInvalid option is not applicable to Bundle field");
732};
733
739template <typename TFieldBase, typename TMembers, typename... TOptions>
742 const Bundle<TFieldBase, TMembers, TOptions...>& field2) noexcept
743{
744 return field1.value() == field2.value();
745}
746
752template <typename TFieldBase, typename TMembers, typename... TOptions>
755 const Bundle<TFieldBase, TMembers, TOptions...>& field2) noexcept
756{
757 return field1.value() != field2.value();
758}
759
764template <typename TFieldBase, typename TMembers, typename... TOptions>
767 const Bundle<TFieldBase, TMembers, TOptions...>& field2) noexcept
768{
769 return field1.value() < field2.value();
770}
771
776template <typename TFieldBase, typename TMembers, typename... TOptions>
779 const Bundle<TFieldBase, TMembers, TOptions...>& field2) noexcept
780{
781 return field1.value() <= field2.value();
782}
783
788template <typename TFieldBase, typename TMembers, typename... TOptions>
791 const Bundle<TFieldBase, TMembers, TOptions...>& field2) noexcept
792{
793 return field1.value() > field2.value();
794}
795
800template <typename TFieldBase, typename TMembers, typename... TOptions>
803 const Bundle<TFieldBase, TMembers, TOptions...>& field2) noexcept
804{
805 return field1.value() >= field2.value();
806}
807
813template <typename T>
814constexpr bool isBundle()
815{
816 return std::is_same<typename T::CommsTag, tag::Bundle>::value;
817}
818
821template <typename TFieldBase, typename TMembers, typename... TOptions>
822inline
823Bundle<TFieldBase, TMembers, TOptions...>&
825{
826 return field;
827}
828
831template <typename TFieldBase, typename TMembers, typename... TOptions>
832inline
833const Bundle<TFieldBase, TMembers, TOptions...>&
835{
836 return field;
837}
838
839} // namespace field
840
841} // namespace comms
842
843
This file contain definition of error statuses used by comms module.
Contains various tuple type manipulation classes and functions.
Bundles multiple fields into a single field.
Definition Bundle.h:66
ValueType & value()
Get access to the stored tuple of fields.
Definition Bundle.h:167
static constexpr std::size_t maxLengthFromUntil()
Get maximal length that is required to serialise specified bundled fields.
Definition Bundle.h:313
bool operator>(const Bundle< TFieldBase, TMembers, TOptions... > &field1, const Bundle< TFieldBase, TMembers, TOptions... > &field2) noexcept
Equivalence comparison operator.
Definition Bundle.h:789
ErrorStatus readFrom(TIter &iter, std::size_t len)
Read selected number of member fields (from specified index).
Definition Bundle.h:341
static constexpr bool hasNonDefaultRefresh()
Compile time check if this class has non-default refresh functionality.
Definition Bundle.h:656
std::size_t length() const
Get length required to serialise bundled fields.
Definition Bundle.h:197
ErrorStatus readUntil(TIter &iter, std::size_t len)
Read selected number of member fields (until specified index).
Definition Bundle.h:374
Bundle()=default
Default constructor.
typename BaseImpl::ValueType ValueType
Value type.
Definition Bundle.h:101
static constexpr std::size_t minLength()
Get minimal length that is required to serialise all bundled fields.
Definition Bundle.h:242
static constexpr std::size_t maxLength()
Get maximal length that is required to serialise all bundled fields.
Definition Bundle.h:281
Bundle(const ValueType &val)
Constructor.
Definition Bundle.h:113
typename BaseImpl::Endian Endian
Endian used for serialisation.
Definition Bundle.h:87
void readFromUntilNoStatus(TIter &iter)
Read selected member fields from input data sequence without error check and status report.
Definition Bundle.h:496
bool operator>=(const Bundle< TFieldBase, TMembers, TOptions... > &field1, const Bundle< TFieldBase, TMembers, TOptions... > &field2) noexcept
Equivalence comparison operator.
Definition Bundle.h:801
constexpr bool isBundle()
Compile time check function of whether a provided type is any variant of comms::field::Bundle.
Definition Bundle.h:814
std::size_t lengthFrom() const
Get length required to serialise specified bundled member fields.
Definition Bundle.h:209
static constexpr std::size_t minLengthFrom()
Get minimal length that is required to serialise specified bundled fields.
Definition Bundle.h:252
void readNoStatus(TIter &iter)
Read field value from input data sequence without error check and status report.
Definition Bundle.h:448
static constexpr std::size_t maxLengthFrom()
Get maximal length that is required to serialise specified bundled fields.
Definition Bundle.h:291
static constexpr bool hasFailOnInvalid()
Compile time inquiry of whether comms::option::def::FailOnInvalid option has been used.
Definition Bundle.h:126
void writeFromUntilNoStatus(TIter &iter)
Write selected member fields to output data sequence without error check and status report.
Definition Bundle.h:630
bool operator<(const Bundle< TFieldBase, TMembers, TOptions... > &field1, const Bundle< TFieldBase, TMembers, TOptions... > &field2) noexcept
Equivalence comparison operator.
Definition Bundle.h:765
ErrorStatus write(TIter &iter, std::size_t size) const
Write current field value to output data sequence.
Definition Bundle.h:514
TFieldBase FieldBase
Base class provided in the first template parameter.
Definition Bundle.h:84
const ValueType & value() const
Get access to the stored tuple of fields.
Definition Bundle.h:173
bool operator==(const Bundle< TFieldBase, TMembers, TOptions... > &field1, const Bundle< TFieldBase, TMembers, TOptions... > &field2) noexcept
Equality comparison operator.
Definition Bundle.h:740
void readUntilNoStatus(TIter &iter)
Read selected member fields from input data sequence without error check and status report.
Definition Bundle.h:478
static constexpr bool hasWriteNoStatus()
Compile time check of whether the field has proper writeNoStatus() member function.
Definition Bundle.h:572
ErrorStatus writeFromUntil(TIter &iter, std::size_t size) const
Write selected member fields to output data sequence.
Definition Bundle.h:565
static constexpr std::size_t maxLengthUntil()
Get maximal length that is required to serialise specified bundled fields.
Definition Bundle.h:301
VersionType getVersion() const
Get version of the field.
Definition Bundle.h:663
static constexpr bool hasIgnoreInvalid()
Compile time inquiry of whether comms::option::def::IgnoreInvalid option has been used.
Definition Bundle.h:133
typename BaseImpl::CommsTag CommsTag
Tag indicating type of the field.
Definition Bundle.h:96
const ValueType & getValue() const
Get value.
Definition Bundle.h:180
ErrorStatus read(TIter &iter, std::size_t size)
Read field value from input data sequence.
Definition Bundle.h:325
std::size_t lengthUntil() const
Get length required to serialise specified bundled member fields.
Definition Bundle.h:221
bool canWrite() const
Check of whether the field has a consistent value for writing.
Definition Bundle.h:502
bool valid() const
Check validity of all the bundled fields.
Definition Bundle.h:636
typename ParsedOptions::FieldType FieldType
Type of actual extending field specified via comms::option::def::FieldType.
Definition Bundle.h:106
Bundle(ValueType &&val)
Constructor.
Definition Bundle.h:119
bool operator<=(const Bundle< TFieldBase, TMembers, TOptions... > &field1, const Bundle< TFieldBase, TMembers, TOptions... > &field2) noexcept
Equivalence comparison operator.
Definition Bundle.h:777
static constexpr bool isVersionDependent()
Compile time check if this class is version dependent.
Definition Bundle.h:650
static constexpr std::size_t minLengthUntil()
Get minimal length that is required to serialise specified bundled fields.
Definition Bundle.h:262
details::OptionsParser< TOptions... > ParsedOptions
All the options provided to this class bundled into struct.
Definition Bundle.h:93
void setValue(U &&val)
Set value.
Definition Bundle.h:188
ErrorStatus writeUntil(TIter &iter, std::size_t size) const
Write selected member fields to output data sequence.
Definition Bundle.h:546
static constexpr bool hasName()
Compile time inquiry of whether comms::option::def::HasName option has been used.
Definition Bundle.h:161
void writeFromNoStatus(TIter &iter)
Write selected member fields to output data sequence without error check and status report.
Definition Bundle.h:598
void writeNoStatus(TIter &iter) const
Write current field value to output data sequence without error check and status report.
Definition Bundle.h:583
bool setVersion(VersionType version)
Default implementation of version update.
Definition Bundle.h:670
ErrorStatus writeFrom(TIter &iter, std::size_t size) const
Write selected member fields to output data sequence.
Definition Bundle.h:530
void readFromNoStatus(TIter &iter)
Read selected member fields from input data sequence without error check and status report.
Definition Bundle.h:463
static constexpr std::size_t minLengthFromUntil()
Get minimal length that is required to serialise specified bundled fields.
Definition Bundle.h:274
ErrorStatus readUntilAndUpdateLen(TIter &iter, std::size_t &len)
Read selected number of member fields (until specified index) while updating remaining length informa...
Definition Bundle.h:391
static constexpr bool hasReadNoStatus()
Compile time check of whether the field has proper readNoStatus() member function (or similar).
Definition Bundle.h:437
ErrorStatus readFromUntil(TIter &iter, std::size_t len)
Read selected number of member fields (between specified indices).
Definition Bundle.h:410
ErrorStatus readFromUntilAndUpdateLen(TIter &iter, std::size_t &len)
Read selected number of member fields (between specified indices) while updating remaining length inf...
Definition Bundle.h:430
ErrorStatus readFromAndUpdateLen(TIter &iter, std::size_t &len)
Read selected number of member fields (from specified index) while updating remaining length informat...
Definition Bundle.h:358
std::size_t lengthFromUntil() const
Get length required to serialise specified bundled member fields.
Definition Bundle.h:235
static constexpr bool hasFixedValue()
Compile time inquiry of whether comms::option::def::FixedValue option has been used.
Definition Bundle.h:154
void writeUntilNoStatus(TIter &iter)
Write selected member fields to output data sequence without error check and status report.
Definition Bundle.h:613
typename BaseImpl::VersionType VersionType
Version type.
Definition Bundle.h:90
bool refresh()
Refresh the field's contents.
Definition Bundle.h:644
bool operator!=(const Bundle< TFieldBase, TMembers, TOptions... > &field1, const Bundle< TFieldBase, TMembers, TOptions... > &field2) noexcept
Non-equality comparison operator.
Definition Bundle.h:753
static constexpr bool hasFieldType()
Compile time inquiry of whether comms::option::def::FieldType option has been used.
Definition Bundle.h:147
static constexpr bool hasEmptySerialization()
Compile time inquiry of whether comms::option::def::EmptySerialization option has been used.
Definition Bundle.h:140
Bundle< TFieldBase, TMembers, TOptions... > & toFieldBase(Bundle< TFieldBase, TMembers, TOptions... > &field)
Upcast type of the field definition to its parent comms::field::Bundle type in order to have access t...
Definition Bundle.h:824
Main namespace for all classes / functions of COMMS library.
ErrorStatus
Error statuses reported by the Communication module.
Definition ErrorStatus.h:17
constexpr unsigned version()
Version of the COMMS library as single numeric value.
Definition version.h:64
STL namespace.
Contains definition of all the options used by the COMMS library.
Check whether provided type is a variant of std::tuple.
Definition Tuple.h:36