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 - 2026 (C). Alex Robenko. All rights reserved.
3//
4// SPDX-License-Identifier: MPL-2.0
5//
6// This Source Code Form is subject to the terms of the Mozilla Public
7// License, v. 2.0. If a copy of the MPL was not distributed with this
8// file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
12
13#pragma once
14
15#include "comms/ErrorStatus.h"
16#include "comms/field/basic/Bundle.h"
17#include "comms/field/details/AdaptBasicField.h"
18#include "comms/options.h"
19#include "comms/util/Tuple.h"
20
21#include <cstddef>
22#include <type_traits>
23#include <utility>
24
25namespace comms
26{
27
28namespace field
29{
30
61template <typename TFieldBase, typename TMembers, typename... TOptions>
62class Bundle : public
63 details::AdaptBasicFieldT<
64 basic::Bundle<
65 TFieldBase,
66 details::OptionsParser<TOptions...>::ForcedMembersVersionDependency,
67 TMembers>,
68 TOptions...
69 >
70{
71 using BaseImpl =
72 details::AdaptBasicFieldT<
73 basic::Bundle<
74 TFieldBase,
75 details::OptionsParser<TOptions...>::ForcedMembersVersionDependency,
76 TMembers>,
77 TOptions...
78 >;
80 "TMembers is expected to be a tuple of std::tuple<...>");
81
82 static_assert(
83 1U <= std::tuple_size<TMembers>::value,
84 "Number of members is expected to be at least 1.");
85
86public:
88 using FieldBase = TFieldBase;
89
91 using Endian = typename BaseImpl::Endian;
92
94 using VersionType = typename BaseImpl::VersionType;
95
97 using ParsedOptions = details::OptionsParser<TOptions...>;
98
100 using CommsTag = typename BaseImpl::CommsTag;
101
105 using ValueType = typename BaseImpl::ValueType;
106
110 using FieldType = typename ParsedOptions::FieldType;
111
114 Bundle() = default;
115
117 explicit Bundle(const ValueType& val)
118 : BaseImpl(val)
119 {
120 }
121
123 explicit Bundle(ValueType&& val)
124 : BaseImpl(std::move(val))
125 {
126 }
127
130 static constexpr bool hasFailOnInvalid()
131 {
132 return ParsedOptions::HasFailOnInvalid;
133 }
134
137 static constexpr bool hasIgnoreInvalid()
138 {
139 return ParsedOptions::HasIgnoreInvalid;
140 }
141
144 static constexpr bool hasEmptySerialization()
145 {
146 return ParsedOptions::HasEmptySerialization;
147 }
148
151 static constexpr bool hasFieldType()
152 {
153 return ParsedOptions::HasFieldType;
154 }
155
158 static constexpr bool hasFixedValue()
159 {
160 return ParsedOptions::HasFixedValue;
161 }
162
165 static constexpr bool hasName()
166 {
167 return ParsedOptions::HasName;
168 }
169
172 {
173 return BaseImpl::value();
174 }
175
177 const ValueType& value() const
178 {
179 return BaseImpl::value();
180 }
181
184 const ValueType& getValue() const
185 {
186 return BaseImpl::getValue();
187 }
188
191 template <typename U>
192 void setValue(U&& val)
193 {
194 BaseImpl::setValue(std::forward<U>(val));
195 }
196
201 std::size_t length() const
202 {
203 return BaseImpl::length();
204 }
205
212 template <std::size_t TFromIdx>
213 std::size_t lengthFrom() const
214 {
215 return BaseImpl::template lengthFrom<TFromIdx>();
216 }
217
224 template <std::size_t TUntilIdx>
225 std::size_t lengthUntil() const
226 {
227 return BaseImpl::template lengthUntil<TUntilIdx>();
228 }
229
238 template <std::size_t TFromIdx, std::size_t TUntilIdx>
239 std::size_t lengthFromUntil() const
240 {
241 return BaseImpl::template lengthFromUntil<TFromIdx, TUntilIdx>();
242 }
243
246 static constexpr std::size_t minLength()
247 {
248 return BaseImpl::minLength();
249 }
250
255 template <std::size_t TFromIdx>
256 static constexpr std::size_t minLengthFrom()
257 {
258 return BaseImpl::template minLengthFrom<TFromIdx>();
259 }
260
265 template <std::size_t TUntilIdx>
266 static constexpr std::size_t minLengthUntil()
267 {
268 return BaseImpl::template minLengthUntil<TUntilIdx>();
269 }
270
277 template <std::size_t TFromIdx, std::size_t TUntilIdx>
278 static constexpr std::size_t minLengthFromUntil()
279 {
280 return BaseImpl::template minLengthFromUntil<TFromIdx, TUntilIdx>();
281 }
282
285 static constexpr std::size_t maxLength()
286 {
287 return BaseImpl::maxLength();
288 }
289
294 template <std::size_t TFromIdx>
295 static constexpr std::size_t maxLengthFrom()
296 {
297 return BaseImpl::template maxLengthFrom<TFromIdx>();
298 }
299
304 template <std::size_t TUntilIdx>
305 static constexpr std::size_t maxLengthUntil()
306 {
307 return BaseImpl::template maxLengthUntil<TUntilIdx>();
308 }
309
316 template <std::size_t TFromIdx, std::size_t TUntilIdx>
317 static constexpr std::size_t maxLengthFromUntil()
318 {
319 return BaseImpl::template maxLengthFromUntil<TFromIdx, TUntilIdx>();
320 }
321
328 template <typename TIter>
329 ErrorStatus read(TIter& iter, std::size_t size)
330 {
331 return BaseImpl::read(iter, size);
332 }
333
344 template <std::size_t TFromIdx, typename TIter>
345 ErrorStatus readFrom(TIter& iter, std::size_t len)
346 {
347 return BaseImpl::template readFrom<TFromIdx>(iter, len);
348 }
349
361 template <std::size_t TFromIdx, typename TIter>
362 ErrorStatus readFromAndUpdateLen(TIter& iter, std::size_t& len)
363 {
364 return BaseImpl::template readFromAndUpdateLen<TFromIdx>(iter, len);
365 }
366
377 template <std::size_t TUntilIdx, typename TIter>
378 ErrorStatus readUntil(TIter& iter, std::size_t len)
379 {
380 return BaseImpl::template readUntil<TUntilIdx>(iter, len);
381 }
382
394 template <std::size_t TUntilIdx, typename TIter>
395 ErrorStatus readUntilAndUpdateLen(TIter& iter, std::size_t& len)
396 {
397 return BaseImpl::template readUntilAndUpdateLen<TUntilIdx>(iter, len);
398 }
399
413 template <std::size_t TFromIdx, std::size_t TUntilIdx, typename TIter>
414 ErrorStatus readFromUntil(TIter& iter, std::size_t len)
415 {
416 return BaseImpl::template readFromUntil<TFromIdx, TUntilIdx>(iter, len);
417 }
418
433 template <std::size_t TFromIdx, std::size_t TUntilIdx, typename TIter>
434 ErrorStatus readFromUntilAndUpdateLen(TIter& iter, std::size_t& len)
435 {
436 return BaseImpl::template readFromUntilAndUpdateLen<TFromIdx, TUntilIdx>(iter, len);
437 }
438
441 static constexpr bool hasReadNoStatus()
442 {
443 return BaseImpl::hasReadNoStatus();
444 }
445
451 template <typename TIter>
452 void readNoStatus(TIter& iter)
453 {
454 BaseImpl::readNoStatus(iter);
455 }
456
466 template <std::size_t TFromIdx, typename TIter>
467 void readFromNoStatus(TIter& iter)
468 {
469 BaseImpl::template readFromNoStatus<TFromIdx>(iter);
470 }
471
481 template <std::size_t TUntilIdx, typename TIter>
482 void readUntilNoStatus(TIter& iter)
483 {
484 BaseImpl::template readUntilNoStatus<TUntilIdx>(iter);
485 }
486
499 template <std::size_t TFromIdx, std::size_t TUntilIdx, typename TIter>
500 void readFromUntilNoStatus(TIter& iter)
501 {
502 BaseImpl::template readFromUntilNoStatus<TFromIdx, TUntilIdx>(iter);
503 }
504
506 bool canWrite() const
507 {
508 return BaseImpl::canWrite();
509 }
510
517 template <typename TIter>
518 ErrorStatus write(TIter& iter, std::size_t size) const
519 {
520 return BaseImpl::write(iter, size);
521 }
522
533 template <std::size_t TFromIdx, typename TIter>
534 ErrorStatus writeFrom(TIter& iter, std::size_t size) const
535 {
536 return BaseImpl::template writeFrom<TFromIdx>(iter, size);
537 }
538
549 template <std::size_t TUntilIdx, typename TIter>
550 ErrorStatus writeUntil(TIter& iter, std::size_t size) const
551 {
552 return BaseImpl::template writeUntil<TUntilIdx>(iter, size);
553 }
554
568 template <std::size_t TFromIdx, std::size_t TUntilIdx, typename TIter>
569 ErrorStatus writeFromUntil(TIter& iter, std::size_t size) const
570 {
571 return BaseImpl::template writeFromUntil<TFromIdx, TUntilIdx>(iter, size);
572 }
573
576 static constexpr bool hasWriteNoStatus()
577 {
578 return BaseImpl::hasWriteNoStatus();
579 }
580
586 template <typename TIter>
587 void writeNoStatus(TIter& iter) const
588 {
589 BaseImpl::writeNoStatus(iter);
590 }
591
601 template <std::size_t TFromIdx, typename TIter>
602 void writeFromNoStatus(TIter& iter)
603 {
604 BaseImpl::template writeFromNoStatus<TFromIdx>(iter);
605 }
606
616 template <std::size_t TUntilIdx, typename TIter>
617 void writeUntilNoStatus(TIter& iter)
618 {
619 BaseImpl::template writeUntilNoStatus<TUntilIdx>(iter);
620 }
621
633 template <std::size_t TFromIdx, std::size_t TUntilIdx, typename TIter>
634 void writeFromUntilNoStatus(TIter& iter)
635 {
636 BaseImpl::template writeFromUntilNoStatus<TFromIdx, TUntilIdx>(iter);
637 }
638
640 bool valid() const
641 {
642 return BaseImpl::valid();
643 }
644
648 bool refresh()
649 {
650 return BaseImpl::refresh();
651 }
652
654 static constexpr bool isVersionDependent()
655 {
656 return ParsedOptions::HasCustomVersionUpdate || BaseImpl::isVersionDependent();
657 }
658
660 static constexpr bool hasNonDefaultRefresh()
661 {
662 return BaseImpl::hasNonDefaultRefresh();
663 }
664
668 {
669 return BaseImpl::getVersion();
670 }
671
675 {
676 return BaseImpl::setVersion(version);
677 }
678
679protected:
680 using BaseImpl::readData;
681 using BaseImpl::writeData;
682
683private:
684 static_assert(!ParsedOptions::HasSerOffset,
685 "comms::option::def::NumValueSerOffset option is not applicable to Bundle field");
686 static_assert(!ParsedOptions::HasFixedLengthLimit,
687 "comms::option::def::FixedLength option is not applicable to Bundle field");
688 static_assert(!ParsedOptions::HasFixedBitLengthLimit,
689 "comms::option::def::FixedBitLength option is not applicable to Bundle field");
690 static_assert(!ParsedOptions::HasVarLengthLimits,
691 "comms::option::def::VarLength option is not applicable to Bundle field");
692 static_assert(!ParsedOptions::HasAvailableLengthLimit,
693 "comms::option::def::AvailableLengthLimit option is not applicable to Bundle field");
694 static_assert(!ParsedOptions::HasSequenceElemLengthForcing,
695 "comms::option::def::SequenceElemLengthForcingEnabled option is not applicable to Bundle field");
696 static_assert(!ParsedOptions::HasSequenceSizeForcing,
697 "comms::option::def::SequenceSizeForcingEnabled option is not applicable to Bundle field");
698 static_assert(!ParsedOptions::HasSequenceLengthForcing,
699 "comms::option::def::SequenceLengthForcingEnabled option is not applicable to Bundle field");
700 static_assert(!ParsedOptions::HasSequenceFixedSize,
701 "comms::option::def::SequenceFixedSize option is not applicable to Bundle field");
702 static_assert(!ParsedOptions::HasSequenceFixedSizeUseFixedSizeStorage,
703 "comms::option::app::SequenceFixedSizeUseFixedSizeStorage option is not applicable to Bundle field");
704 static_assert(!ParsedOptions::HasSequenceSizeFieldPrefix,
705 "comms::option::def::SequenceSizeFieldPrefix option is not applicable to Bundle field");
706 static_assert(!ParsedOptions::HasSequenceSerLengthFieldPrefix,
707 "comms::option::def::SequenceSerLengthFieldPrefix option is not applicable to Bundle field");
708 static_assert(!ParsedOptions::HasSequenceElemSerLengthFieldPrefix,
709 "comms::option::def::SequenceElemSerLengthFieldPrefix option is not applicable to Bundle field");
710 static_assert(!ParsedOptions::HasSequenceElemFixedSerLengthFieldPrefix,
711 "comms::option::def::SequenceElemSerLengthFixedFieldPrefix option is not applicable to Bundle field");
712 static_assert(!ParsedOptions::HasSequenceTrailingFieldSuffix,
713 "comms::option::def::SequenceTrailingFieldSuffix option is not applicable to Bundle field");
714 static_assert(!ParsedOptions::HasSequenceTerminationFieldSuffix,
715 "comms::option::def::SequenceTerminationFieldSuffix option is not applicable to Bundle field");
716 static_assert(!ParsedOptions::HasFixedSizeStorage,
717 "comms::option::app::FixedSizeStorage option is not applicable to Bundle field");
718 static_assert(!ParsedOptions::HasCustomStorageType,
719 "comms::option::app::CustomStorageType option is not applicable to Bundle field");
720 static_assert(!ParsedOptions::HasScalingRatio,
721 "comms::option::def::ScalingRatio option is not applicable to Bundle field");
722 static_assert(!ParsedOptions::HasUnits,
723 "comms::option::def::Units option is not applicable to Bundle field");
724 static_assert(!ParsedOptions::HasOrigDataView,
725 "comms::option::app::OrigDataView option is not applicable to Bundle field");
726 static_assert(!ParsedOptions::HasMultiRangeValidation,
727 "comms::option::def::ValidNumValueRange (or similar) option is not applicable to Bundle field");
728 static_assert(!ParsedOptions::HasVersionsRange,
729 "comms::option::def::ExistsBetweenVersions (or similar) option is not applicable to Bundle field");
730 static_assert(!ParsedOptions::HasInvalidByDefault,
731 "comms::option::def::InvalidByDefault option is not applicable to Bundle field");
732 static_assert(!ParsedOptions::HasMissingOnReadFail,
733 "comms::option::def::MissingOnReadFail option is not applicable to Bundle field");
734 static_assert(!ParsedOptions::HasMissingOnInvalid,
735 "comms::option::def::MissingOnInvalid option is not applicable to Bundle field");
736};
737
743template <typename TFieldBase, typename TMembers, typename... TOptions>
746 const Bundle<TFieldBase, TMembers, TOptions...>& field2) noexcept
747{
748 return field1.value() == field2.value();
749}
750
756template <typename TFieldBase, typename TMembers, typename... TOptions>
759 const Bundle<TFieldBase, TMembers, TOptions...>& field2) noexcept
760{
761 return field1.value() != field2.value();
762}
763
768template <typename TFieldBase, typename TMembers, typename... TOptions>
771 const Bundle<TFieldBase, TMembers, TOptions...>& field2) noexcept
772{
773 return field1.value() < field2.value();
774}
775
780template <typename TFieldBase, typename TMembers, typename... TOptions>
783 const Bundle<TFieldBase, TMembers, TOptions...>& field2) noexcept
784{
785 return field1.value() <= field2.value();
786}
787
792template <typename TFieldBase, typename TMembers, typename... TOptions>
795 const Bundle<TFieldBase, TMembers, TOptions...>& field2) noexcept
796{
797 return field1.value() > field2.value();
798}
799
804template <typename TFieldBase, typename TMembers, typename... TOptions>
807 const Bundle<TFieldBase, TMembers, TOptions...>& field2) noexcept
808{
809 return field1.value() >= field2.value();
810}
811
817template <typename T>
818constexpr bool isBundle()
819{
820 return std::is_same<typename T::CommsTag, tag::Bundle>::value;
821}
822
825template <typename TFieldBase, typename TMembers, typename... TOptions>
826inline
827Bundle<TFieldBase, TMembers, TOptions...>&
829{
830 return field;
831}
832
835template <typename TFieldBase, typename TMembers, typename... TOptions>
836inline
837const Bundle<TFieldBase, TMembers, TOptions...>&
839{
840 return field;
841}
842
843} // namespace field
844
845} // namespace comms
846
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:70
ValueType & value()
Get access to the stored tuple of fields.
Definition Bundle.h:171
static constexpr std::size_t maxLengthFromUntil()
Get maximal length that is required to serialise specified bundled fields.
Definition Bundle.h:317
bool operator>(const Bundle< TFieldBase, TMembers, TOptions... > &field1, const Bundle< TFieldBase, TMembers, TOptions... > &field2) noexcept
Equivalence comparison operator.
Definition Bundle.h:793
ErrorStatus readFrom(TIter &iter, std::size_t len)
Read selected number of member fields (from specified index).
Definition Bundle.h:345
static constexpr bool hasNonDefaultRefresh()
Compile time check if this class has non-default refresh functionality.
Definition Bundle.h:660
std::size_t length() const
Get length required to serialise bundled fields.
Definition Bundle.h:201
ErrorStatus readUntil(TIter &iter, std::size_t len)
Read selected number of member fields (until specified index).
Definition Bundle.h:378
Bundle()=default
Default constructor.
typename BaseImpl::ValueType ValueType
Value type.
Definition Bundle.h:105
static constexpr std::size_t minLength()
Get minimal length that is required to serialise all bundled fields.
Definition Bundle.h:246
static constexpr std::size_t maxLength()
Get maximal length that is required to serialise all bundled fields.
Definition Bundle.h:285
Bundle(const ValueType &val)
Constructor.
Definition Bundle.h:117
typename BaseImpl::Endian Endian
Endian used for serialisation.
Definition Bundle.h:91
void readFromUntilNoStatus(TIter &iter)
Read selected member fields from input data sequence without error check and status report.
Definition Bundle.h:500
bool operator>=(const Bundle< TFieldBase, TMembers, TOptions... > &field1, const Bundle< TFieldBase, TMembers, TOptions... > &field2) noexcept
Equivalence comparison operator.
Definition Bundle.h:805
constexpr bool isBundle()
Compile time check function of whether a provided type is any variant of comms::field::Bundle.
Definition Bundle.h:818
std::size_t lengthFrom() const
Get length required to serialise specified bundled member fields.
Definition Bundle.h:213
static constexpr std::size_t minLengthFrom()
Get minimal length that is required to serialise specified bundled fields.
Definition Bundle.h:256
void readNoStatus(TIter &iter)
Read field value from input data sequence without error check and status report.
Definition Bundle.h:452
static constexpr std::size_t maxLengthFrom()
Get maximal length that is required to serialise specified bundled fields.
Definition Bundle.h:295
static constexpr bool hasFailOnInvalid()
Compile time inquiry of whether comms::option::def::FailOnInvalid option has been used.
Definition Bundle.h:130
void writeFromUntilNoStatus(TIter &iter)
Write selected member fields to output data sequence without error check and status report.
Definition Bundle.h:634
bool operator<(const Bundle< TFieldBase, TMembers, TOptions... > &field1, const Bundle< TFieldBase, TMembers, TOptions... > &field2) noexcept
Equivalence comparison operator.
Definition Bundle.h:769
ErrorStatus write(TIter &iter, std::size_t size) const
Write current field value to output data sequence.
Definition Bundle.h:518
TFieldBase FieldBase
Base class provided in the first template parameter.
Definition Bundle.h:88
const ValueType & value() const
Get access to the stored tuple of fields.
Definition Bundle.h:177
bool operator==(const Bundle< TFieldBase, TMembers, TOptions... > &field1, const Bundle< TFieldBase, TMembers, TOptions... > &field2) noexcept
Equality comparison operator.
Definition Bundle.h:744
void readUntilNoStatus(TIter &iter)
Read selected member fields from input data sequence without error check and status report.
Definition Bundle.h:482
static constexpr bool hasWriteNoStatus()
Compile time check of whether the field has proper writeNoStatus() member function.
Definition Bundle.h:576
ErrorStatus writeFromUntil(TIter &iter, std::size_t size) const
Write selected member fields to output data sequence.
Definition Bundle.h:569
static constexpr std::size_t maxLengthUntil()
Get maximal length that is required to serialise specified bundled fields.
Definition Bundle.h:305
VersionType getVersion() const
Get version of the field.
Definition Bundle.h:667
static constexpr bool hasIgnoreInvalid()
Compile time inquiry of whether comms::option::def::IgnoreInvalid option has been used.
Definition Bundle.h:137
typename BaseImpl::CommsTag CommsTag
Tag indicating type of the field.
Definition Bundle.h:100
const ValueType & getValue() const
Get value.
Definition Bundle.h:184
ErrorStatus read(TIter &iter, std::size_t size)
Read field value from input data sequence.
Definition Bundle.h:329
std::size_t lengthUntil() const
Get length required to serialise specified bundled member fields.
Definition Bundle.h:225
bool canWrite() const
Check of whether the field has a consistent value for writing.
Definition Bundle.h:506
bool valid() const
Check validity of all the bundled fields.
Definition Bundle.h:640
typename ParsedOptions::FieldType FieldType
Type of actual extending field specified via comms::option::def::FieldType.
Definition Bundle.h:110
Bundle(ValueType &&val)
Constructor.
Definition Bundle.h:123
bool operator<=(const Bundle< TFieldBase, TMembers, TOptions... > &field1, const Bundle< TFieldBase, TMembers, TOptions... > &field2) noexcept
Equivalence comparison operator.
Definition Bundle.h:781
static constexpr bool isVersionDependent()
Compile time check if this class is version dependent.
Definition Bundle.h:654
static constexpr std::size_t minLengthUntil()
Get minimal length that is required to serialise specified bundled fields.
Definition Bundle.h:266
details::OptionsParser< TOptions... > ParsedOptions
All the options provided to this class bundled into struct.
Definition Bundle.h:97
void setValue(U &&val)
Set value.
Definition Bundle.h:192
ErrorStatus writeUntil(TIter &iter, std::size_t size) const
Write selected member fields to output data sequence.
Definition Bundle.h:550
static constexpr bool hasName()
Compile time inquiry of whether comms::option::def::HasName option has been used.
Definition Bundle.h:165
void writeFromNoStatus(TIter &iter)
Write selected member fields to output data sequence without error check and status report.
Definition Bundle.h:602
void writeNoStatus(TIter &iter) const
Write current field value to output data sequence without error check and status report.
Definition Bundle.h:587
bool setVersion(VersionType version)
Default implementation of version update.
Definition Bundle.h:674
ErrorStatus writeFrom(TIter &iter, std::size_t size) const
Write selected member fields to output data sequence.
Definition Bundle.h:534
void readFromNoStatus(TIter &iter)
Read selected member fields from input data sequence without error check and status report.
Definition Bundle.h:467
static constexpr std::size_t minLengthFromUntil()
Get minimal length that is required to serialise specified bundled fields.
Definition Bundle.h:278
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:395
static constexpr bool hasReadNoStatus()
Compile time check of whether the field has proper readNoStatus() member function (or similar).
Definition Bundle.h:441
ErrorStatus readFromUntil(TIter &iter, std::size_t len)
Read selected number of member fields (between specified indices).
Definition Bundle.h:414
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:434
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:362
std::size_t lengthFromUntil() const
Get length required to serialise specified bundled member fields.
Definition Bundle.h:239
static constexpr bool hasFixedValue()
Compile time inquiry of whether comms::option::def::FixedValue option has been used.
Definition Bundle.h:158
void writeUntilNoStatus(TIter &iter)
Write selected member fields to output data sequence without error check and status report.
Definition Bundle.h:617
typename BaseImpl::VersionType VersionType
Version type.
Definition Bundle.h:94
bool refresh()
Refresh the field's contents.
Definition Bundle.h:648
bool operator!=(const Bundle< TFieldBase, TMembers, TOptions... > &field1, const Bundle< TFieldBase, TMembers, TOptions... > &field2) noexcept
Non-equality comparison operator.
Definition Bundle.h:757
static constexpr bool hasFieldType()
Compile time inquiry of whether comms::option::def::FieldType option has been used.
Definition Bundle.h:151
static constexpr bool hasEmptySerialization()
Compile time inquiry of whether comms::option::def::EmptySerialization option has been used.
Definition Bundle.h:144
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:828
Main namespace for all classes / functions of COMMS library.
ErrorStatus
Error statuses reported by the Communication module.
Definition ErrorStatus.h:19
constexpr unsigned version()
Version of the COMMS library as single numeric value.
Definition version.h:66
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:39