COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
TransportValueLayerBase.h
1//
2// Copyright 2025 - 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
10#pragma once
11
12#include "comms/frame/details/TransportValueLayerOptionsParser.h"
14
15#include <cstddef>
16
17namespace comms
18{
19
20namespace frame
21{
22
23// Forward declaration
24template <typename TField, std::size_t TIdx, typename TNextLayer, typename... TOptions>
26
27namespace details
28{
29
30template <typename TField, std::size_t TIdx, typename TNextLayer, typename... TOptions>
31class TransportValueLayerBaseHelper
32{
33 using ParsedOptionsInternal = comms::frame::details::TransportValueLayerOptionsParser<TOptions...>;
34 using ActualLayer = typename ParsedOptionsInternal::template DefineExtendingClass<TransportValueLayer<TField, TIdx, TNextLayer, TOptions...>>;
35 using TopBase =
37 TField,
38 TNextLayer,
39 ActualLayer,
40 typename ParsedOptionsInternal::template ForceReadUntilDataSplitIfNeeded<TNextLayer>
41 >;
42
43 using AdaptedPseudoBase = typename ParsedOptionsInternal::template BuildPseudoBase<TopBase>;
44
45public:
46 using Base = AdaptedPseudoBase;
47};
48
49template <typename TField, std::size_t TIdx, typename TNextLayer, typename... TOptions>
50using TransportValueLayerBase = typename TransportValueLayerBaseHelper<TField, TIdx, TNextLayer, TOptions...>::Base;
51
52} // namespace details
53
54} // namespace frame
55
56} // namespace comms
Contains definition of comms::frame::FrameLayerBase.
Base class for all the middle (non MsgDataLayer) protocol transport layers.
Definition FrameLayerBase.h:65
comms::frame::TransportValueLayer< TField, TIdx, TNextLayer, TOptions... > TransportValueLayer
Alias to the comms::frame::TransportValueLayer.
Definition TransportValueLayer.h:27
Main namespace for all classes / functions of COMMS library.