WSF
WsfControlMessage.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 WSFCONTROLMESSAGE_HPP
13#define WSFCONTROLMESSAGE_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 "WsfRoute.hpp"
25#include "WsfStringId.hpp"
26#include "WsfTrack.hpp"
27#include "WsfTrackId.hpp"
28
33
35{
36public:
37 WsfControlMessage(); // For XIO (de)serialization.
38 WsfControlMessage(WsfPlatform* aPlatformPtr);
39
40 WsfMessage* Clone() const override;
41
42 const char* GetScriptClassName() const override;
43
44 static std::unique_ptr<UtScriptClass> CreateScriptClass(const std::string& aClassName, UtScriptTypes* aScriptTypesPtr);
45
46 static WsfStringId GetTypeId();
47
53
55
56 void SetFunction(WsfStringId aFunction);
58
63
64
65 const WsfTrackId& GetRequestId() const { return mRequestId; }
66
68 void SetRequestId(const WsfTrackId& aRequestId) { mRequestId = aRequestId; }
70
75
76
79
80 std::string GetResource() const;
81
83 void SetResourceId(WsfStringId aResourceId) { mResourceId = aResourceId; }
84
85 void SetResource(const std::string& aResource);
87
92
93
94 const WsfTrack& GetTrack() const { return mTrack; }
95
97 WsfTrack& GetTrack() { return mTrack; }
98
99 void SetTrack(const WsfTrack& aTrack);
101
105
106
107 const WsfRoute& GetRoute() const { return mRoute; }
108
110 WsfRoute& GetRoute() { return mRoute; }
111
112 void SetRoute(const WsfRoute& aRoute);
114
116 template<typename T>
117 void Serialize(T& aBuff)
118 {
121 }
122
123protected:
126
131};
132
133#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfControlMessage.hpp:35
WsfStringId GetFunction() const
Get the function (string form).
Definition WsfControlMessage.cpp:86
const WsfTrackId & GetRequestId() const
Get the request ID to which the status applies.
Definition WsfControlMessage.hpp:65
static std::unique_ptr< UtScriptClass > CreateScriptClass(const std::string &aClassName, UtScriptTypes *aScriptTypesPtr)
Definition WsfControlMessage.cpp:160
WsfControlMessage()
Constructor, for XIO (de)serialization.
Definition WsfControlMessage.cpp:26
void SetFunction(WsfStringId aFunction)
Set the function (string form).
Definition WsfControlMessage.cpp:92
const WsfTrack & GetTrack() const
Return the track (const form).
Definition WsfControlMessage.hpp:94
WsfTrack mTrack
The associated track.
Definition WsfControlMessage.hpp:129
WsfTrackId mRequestId
Definition WsfControlMessage.hpp:127
const WsfRoute & GetRoute() const
Return the route (const form).
Definition WsfControlMessage.hpp:107
void Serialize(T &aBuff)
For XIO (de)serialization.
Definition WsfControlMessage.hpp:117
WsfRoute & GetRoute()
Return the route (non-const form).
Definition WsfControlMessage.hpp:110
WsfStringId mResourceId
String ID of the resource.
Definition WsfControlMessage.hpp:128
void SetRequestId(const WsfTrackId &aRequestId)
Set the request ID to which the status applies.
Definition WsfControlMessage.hpp:68
WsfStringId GetResourceId() const
Definition WsfControlMessage.hpp:78
void SetResourceId(WsfStringId aResourceId)
Set the resource (string ID form).
Definition WsfControlMessage.hpp:83
WsfRoute mRoute
The associated route.
Definition WsfControlMessage.hpp:130
WsfTrack & GetTrack()
Return the track (non-const form).
Definition WsfControlMessage.hpp:97
WsfMessage(WsfStringId aType)
Constructor for XIO (de)serialization.
Definition WsfMessage.cpp:25
WsfMessage & operator=(const WsfMessage &aRhs)=default
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
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
A collection of WsfWaypoint objects that represent a path to be followed.
Definition WsfRoute.hpp:40
Definition WsfTrackId.hpp:33
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120
Copyrights Multiple, All Rights Reserved