WSF
WsfStatusMessage.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 2003-2015 The Boeing 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 WSFSTATUSMESSAGE_HPP
13#define WSFSTATUSMESSAGE_HPP
14
15#include "wsf_export.h"
16
17#include <memory>
18#include <string>
19
20class UtScriptClass;
21class UtScriptTypes;
22#include "WsfMessage.hpp"
23class WsfPlatform;
24#include "WsfStringId.hpp"
25#include "WsfTrackId.hpp"
26
29{
30public:
31 WsfStatusMessage(); // For XIO (de)serialization
33 WsfStatusMessage(WsfPlatform* aPlatformPtr);
34 WsfStatusMessage(WsfStringId aStatusId, WsfPlatform* aPlatformPtr);
35
36 WsfMessage* Clone() const override;
37
38 const char* GetScriptClassName() const override;
39
40 static std::unique_ptr<UtScriptClass> CreateScriptClass(const std::string& aClassName, UtScriptTypes* aScriptTypesPtr);
41
42 static WsfStringId GetTypeId();
43
48
49
50 WsfStringId GetStatusId() const { return GetSubType(); }
51
52 const std::string& GetStatus() const;
53
55 void SetStatusId(WsfStringId aStatusId) { SetSubType(aStatusId); }
56
57 void SetStatus(WsfStringId aStatus);
59
63
64
65 const WsfTrackId& GetRequestId() const { return mRequestId; }
66
68 void SetRequestId(const WsfTrackId& aRequestId) { mRequestId = aRequestId; }
70
74
75
79
80 std::string GetSystemName() const;
81
85 void SetSystemNameId(WsfStringId aSystemNameId) { mSystemNameId = aSystemNameId; }
86
87 void SetSystemName(const std::string& aSystemName);
89
94
95 WsfPlatform* GetPlatform() const;
96 size_t GetPlatformIndex() const { return mPlatformIndex; }
97
98 void SetPlatform(WsfPlatform* aPlatformPtr);
99 void SetPlatformIndex(size_t aPlatformIndex) { mPlatformIndex = aPlatformIndex; }
101
103 template<typename T>
104 void Serialize(T& aBuff)
105 {
108 }
109
110protected:
111 // Using the default copy constructor.
112 // WsfStatusMessage(const WsfStatusMessage& aSrc);
113
116
119
122};
123
124#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
void SetSubType(WsfStringId aSubType)
Definition WsfMessage.hpp:129
WsfMessage(WsfStringId aType)
Constructor for XIO (de)serialization.
Definition WsfMessage.cpp:25
void Serialize(T &aBuff)
(De)serializer for XIO
Definition WsfMessage.hpp:207
const char * GetScriptClassName() const override
Definition WsfMessage.cpp:235
static WsfStringId GetTypeId()
Definition WsfMessage.cpp:159
virtual WsfMessage * Clone() const
Definition WsfMessage.cpp:150
WsfStringId GetSubType() const
Definition WsfMessage.hpp:125
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
The main controller for a simulation.
Definition WsfSimulation.hpp:109
WsfStatusMessage()
Constructor, for XIO (de)serialization (create a Status message).
Definition WsfStatusMessage.cpp:22
size_t mPlatformIndex
The other platform index.
Definition WsfStatusMessage.hpp:121
WsfStringId GetSystemNameId() const
Definition WsfStatusMessage.hpp:78
WsfStringId mSystemNameId
The system name ID to which the status pertains.
Definition WsfStatusMessage.hpp:118
WsfTrackId mRequestId
The request ID to which the status pertains.
Definition WsfStatusMessage.hpp:115
static std::unique_ptr< UtScriptClass > CreateScriptClass(const std::string &aClassName, UtScriptTypes *aScriptTypesPtr)
Definition WsfStatusMessage.cpp:141
WsfStringId GetStatusId() const
Get the status (string ID form).
Definition WsfStatusMessage.hpp:50
void SetRequestId(const WsfTrackId &aRequestId)
Set the request ID to which the status applies.
Definition WsfStatusMessage.hpp:68
void SetSystemNameId(WsfStringId aSystemNameId)
Definition WsfStatusMessage.hpp:85
void SetPlatformIndex(size_t aPlatformIndex)
Definition WsfStatusMessage.hpp:99
size_t GetPlatformIndex() const
Definition WsfStatusMessage.hpp:96
void Serialize(T &aBuff)
For XIO (de)serialization.
Definition WsfStatusMessage.hpp:104
WsfStatusMessage(WsfSimulation &aSimulation)
const WsfTrackId & GetRequestId() const
Get the request ID to which the status applies.
Definition WsfStatusMessage.hpp:65
void SetStatusId(WsfStringId aStatusId)
Set the status (string ID form).
Definition WsfStatusMessage.hpp:55
Definition WsfTrackId.hpp:33
Copyrights Multiple, All Rights Reserved