COMMS
Template library intended to help with implementation of communication protocols.
Loading...
Searching...
No Matches
MsgIdLayerBase.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/MsgIdLayerOptionsParser.h"
12
13#include <cstddef>
14
15namespace comms
16{
17
18namespace frame
19{
20
21// Forward declaration
22template <typename TField, typename TMessage, typename TAllMessages,typename TNextLayer, typename... TOptions>
23class MsgIdLayer;
24
25namespace details
26{
27
28template <typename TField, typename TMessage, typename TAllMessages,typename TNextLayer, typename... TOptions>
29class MsgIdLayerBaseHelper
30{
31 using ParsedOptionsInternal = comms::frame::details::MsgIdLayerOptionsParser<TOptions...>;
32 using ActualLayer = typename ParsedOptionsInternal::template DefineExtendingClass<MsgIdLayer<TField, TMessage, TAllMessages, TNextLayer, TOptions...>>;
33 using TopBase =
35 TField,
36 TNextLayer,
37 ActualLayer
38 >;
39
40public:
41 using Base = TopBase;
42};
43
44template <typename TField, typename TMessage, typename TAllMessages,typename TNextLayer, typename... TOptions>
45using MsgIdLayerBase = typename MsgIdLayerBaseHelper<TField, TMessage, TAllMessages, TNextLayer, TOptions...>::Base;
46
47} // namespace details
48
49} // namespace frame
50
51} // 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::MsgIdLayer< TField, TMessage, TAllMessages, TNextLayer, TOptions... > MsgIdLayer
Alias to the comms::frame::MsgIdLayer.
Definition MsgIdLayer.h:25
Main namespace for all classes / functions of COMMS library.