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