Helper Types

The helper.h header provides the fundamental building blocks used throughout the framework. All types in this header have no runtime dependency beyond the C++20 standard library.

Version

A plain constexpr-capable struct that carries major, minor, and build as uint32_t fields. It supports != and > comparisons and is used in two places:

  • As a group version embedded in DataLayer::GroupInfo — checked during deserialization to detect model changes.

  • As a datapoint version on individual DataLayer::DataPoint instances — used to skip deserializing a single datapoint when only its version changed (when AllowUpgrade is set).

struct Version

FixedString

A compile-time string literal wrapper used as a Non-Type Template Parameter (NTTP). It stores the characters in a std::array<char, N+1> and is implicitly convertible to std::string_view. Deduction guides handle the common FixedString("my_name") usage.

template<size_t N>
struct FixedString

PersistenceType

Controls how a group’s data is persisted. Set in groups.json and propagated into DataLayer::GroupInfo.

enum class DataLayer::PersistenceType : uint8_t

Values:

enumerator None
enumerator Cyclic
enumerator OnWrite

Access Tag Types

Three empty tag structs used as the Access template parameter of DataLayer::DataPoint. Their presence or absence controls which get() and set() overloads are available (enforced by C++20 Concepts — see C++20 Concepts).

struct READ_ONLY

Subclassed by Helper::READ_WRITE

struct WRITE_ONLY

Subclassed by Helper::READ_WRITE

struct READ_WRITE : public Helper::READ_ONLY, public Helper::WRITE_ONLY

BaseType

A thin wrapper around a scalar type T used to implement alias types with optional range bounds. When Minimum and Maximum static members are present, DataLayer::Detail::checkValue() enforces the range before a value is stored.

template<typename Type>
struct BaseType

CheckResult

Returned by DataLayer::GroupDataPointMapping::setDatapoint() and DataLayer::Dispatcher::setDatapoint() to communicate whether the write succeeded and whether a range check fired.

struct CheckResult

Helper Utilities

template<typename T, size_t N>
constexpr std::array<T, N> DataLayer::Detail::make_array(T value) noexcept
template<typename T>
auto DataLayer::Detail::checkValue(T value) noexcept