WSF
WsfCommLayerMessage.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2019 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WSFCOMMLAYERMESSAGE_HPP
13#define WSFCOMMLAYERMESSAGE_HPP
14
15#include "wsf_export.h"
16
17#include <string>
18
19namespace wsf
20{
21namespace comm
22{
23namespace layer
24{
25
36{
37public:
38 constexpr Message(size_t aValue, char const* aName, bool aLowerSender)
39 : mValue(aValue)
40 , mName(aName)
41 , mLower(aLowerSender)
42 {
43 }
44 ~Message() = default;
45
46 constexpr size_t GetValue() const { return mValue; }
47 constexpr char const* GetName() const { return mName; }
48 constexpr bool FromLower() const { return mLower; }
49
50private:
51 size_t mValue;
52 char const* mName;
53 bool mLower;
54};
55
70static constexpr const Message cDOWN_ACK_SEND(0U, "UPPER_LAYER_ACK_SEND", false);
71static constexpr const Message cDOWN_NACK_SEND(1U, "UPPER_LAYER_NACK_SEND", false);
72static constexpr const Message cUP_ACK_SEND(2U, "LOWER_LAYER_ACK_SEND", true);
73static constexpr const Message cUP_NACK_SEND(3U, "LOWER_LAYER_NACK_SEND", true);
74static constexpr const Message cDOWN_ACK_RECEIVE(4U, "UPPER_LAYER_ACK_RECEIVE", false);
75static constexpr const Message cDOWN_NACK_RECEIVE(5U, "UPPER_LAYER_NACK_RECEIVE", false);
76static constexpr const Message cUP_ACK_RECEIVE(6U, "LOWER_LAYER_ACK_RECEIVE", true);
77static constexpr const Message cUP_NACK_RECEIVE(7U, "LOWER_LAYER_NACK_RECEIVE", true);
81static constexpr const Message cNETWORK_FORWARD(8U, "FORWARD_MESSAGE", false);
82static constexpr const Message cNETWORK_MULTIPLE_SEND(9U, "MULTIPLE_SEND", false);
86static constexpr const Message cDATALINK_READY(10U, "DATALINK_READY", false);
87static constexpr const Message cDATALINK_QUEUE_PURGE(11U, "DATALINK_QUEUE_PURGE", false);
88
89} // namespace layer
90} // namespace comm
91} // namespace wsf
92
93#endif
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfCommLayerMessage.hpp:36
constexpr char const * GetName() const
Definition WsfCommLayerMessage.hpp:47
constexpr bool FromLower() const
Definition WsfCommLayerMessage.hpp:48
constexpr size_t GetValue() const
Definition WsfCommLayerMessage.hpp:46
constexpr Message(size_t aValue, char const *aName, bool aLowerSender)
Definition WsfCommLayerMessage.hpp:38
Definition WsfCommLayerMessage.hpp:24
static constexpr const Message cNETWORK_MULTIPLE_SEND(9U, "MULTIPLE_SEND", false)
static constexpr const Message cDATALINK_READY(10U, "DATALINK_READY", false)
static constexpr const Message cUP_ACK_SEND(2U, "LOWER_LAYER_ACK_SEND", true)
static constexpr const Message cUP_ACK_RECEIVE(6U, "LOWER_LAYER_ACK_RECEIVE", true)
static constexpr const Message cNETWORK_FORWARD(8U, "FORWARD_MESSAGE", false)
static constexpr const Message cDOWN_ACK_SEND(0U, "UPPER_LAYER_ACK_SEND", false)
static constexpr const Message cDOWN_NACK_SEND(1U, "UPPER_LAYER_NACK_SEND", false)
static constexpr const Message cDATALINK_QUEUE_PURGE(11U, "DATALINK_QUEUE_PURGE", false)
static constexpr const Message cUP_NACK_SEND(3U, "LOWER_LAYER_NACK_SEND", true)
static constexpr const Message cUP_NACK_RECEIVE(7U, "LOWER_LAYER_NACK_RECEIVE", true)
static constexpr const Message cDOWN_ACK_RECEIVE(4U, "UPPER_LAYER_ACK_RECEIVE", false)
static constexpr const Message cDOWN_NACK_RECEIVE(5U, "UPPER_LAYER_NACK_RECEIVE", false)
Definition WsfComm.cpp:34
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved