WSF
WsfTaskStatusMessage.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 WSFTASKSTATUSMESSAGE_HPP
13#define WSFTASKSTATUSMESSAGE_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"
25class WsfTask;
26#include "WsfTrackId.hpp"
27
42{
43public:
44 WsfTaskStatusMessage(); // For XIO (de)serialization.
45 WsfTaskStatusMessage(WsfPlatform* aPlatformPtr);
46 WsfTaskStatusMessage(WsfStringId aStatusId, WsfPlatform* aSenderPtr, const WsfTask& aTask);
47
48 WsfMessage* Clone() const override;
49
50 const char* GetScriptClassName() const override;
51
52 static std::unique_ptr<UtScriptClass> CreateScriptClass(const std::string& aClassName, UtScriptTypes* aScriptTypesPtr);
53
54 static WsfStringId GetTypeId();
55
57 unsigned int GetTaskId() const { return mTaskId; }
58
62
63
65 unsigned int GetAcknowledgeId() const { return mAcknowledgeId; }
66
68 void SetAcknowledgeId(unsigned int aAcknowledgeId) { mAcknowledgeId = aAcknowledgeId; }
70
72
73 WsfPlatform* GetAssigner() const;
74
77
79 void SetAssignerPlatformIndex(size_t aPlatformIndex) { mAssignerPlatformIndex = aPlatformIndex; }
80
83
87
89
90 WsfPlatform* GetAssignee() const;
91
94
96 void SetAssigneePlatformIndex(size_t aPlatformIndex) { mAssigneePlatformIndex = aPlatformIndex; }
97
100
104
106
107
108 WsfStringId GetStatus() const { return mStatus; }
109
111 void SetStatus(WsfStringId aStatus) { mStatus = aStatus; }
112
114 void SetStatus(const std::string& aStatus) { mStatus = aStatus; }
115
118
120 void SetSubStatus(WsfStringId aSubStatus) { mSubStatus = aSubStatus; }
121
123 void SetSubStatus(const std::string& aSubStatus) { mSubStatus = aSubStatus; }
125
127
128
129 const WsfTrackId& GetTrackId() const { return mTrackId; }
130
132 void SetTrackId(const WsfTrackId& aTrackId) { mTrackId = aTrackId; }
134
136
137
139
141 void SetTaskType(WsfStringId aTaskType) { mTaskType = aTaskType; }
142
144 void SetTaskType(const std::string& aTaskType) { mTaskType = aTaskType; }
146
150
151
153
155 void SetResourceName(WsfStringId aResourceName) { mResourceName = aResourceName; }
156
158 void SetResourceName(const std::string& aResourceName) { mResourceName = aResourceName; }
160
163
164
166
168 void SetObjectPlatformIndex(size_t aIndex) { mObjectPlatformIndex = aIndex; }
170
172
173
174 bool IsFromAssignee() const { return mIsFromAssignee; }
175
178 void SetIsFromAssignee(bool aIsFromAssignee) { mIsFromAssignee = aIsFromAssignee; }
180
182 template<typename T>
189
190protected:
191 // Using the default copy constructor.
192 // WsfTaskStatusMessage(const WsfTaskStatusMessage& aSrc);
193
195 unsigned int mAcknowledgeId;
196
198 unsigned int mTaskId;
199
202
205
208
211
214
217
220
223
226
229
232
235
240};
241
242#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
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
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
void SetResourceName(const std::string &aResourceName)
Set the resource (string form).
Definition WsfTaskStatusMessage.hpp:158
void SetObjectPlatformIndex(size_t aIndex)
Sets the object platform index.
Definition WsfTaskStatusMessage.hpp:168
WsfStringId mAssignerPlatformName
The name of the assigner.
Definition WsfTaskStatusMessage.hpp:204
unsigned int mTaskId
The assigners task ID.
Definition WsfTaskStatusMessage.hpp:198
WsfStringId GetAssigneePlatformName() const
Get the name of the assignee.
Definition WsfTaskStatusMessage.hpp:99
const WsfTrackId & GetTrackId() const
Get the task ID to which the message applies.
Definition WsfTaskStatusMessage.hpp:129
void SetIsFromAssignee(bool aIsFromAssignee)
Definition WsfTaskStatusMessage.hpp:178
void SetTaskType(WsfStringId aTaskType)
Set the task type (ID form).
Definition WsfTaskStatusMessage.hpp:141
void SetTrackId(const WsfTrackId &aTrackId)
Set the task ID to which the message applies.
Definition WsfTaskStatusMessage.hpp:132
WsfStringId mAssigneeProcessorName
The name of the processor on the assignee.
Definition WsfTaskStatusMessage.hpp:216
WsfStringId GetStatus() const
Get the status.
Definition WsfTaskStatusMessage.hpp:108
void SetAssigneePlatformIndex(size_t aPlatformIndex)
Set the platform index of the assignee.
Definition WsfTaskStatusMessage.hpp:96
WsfStringId GetAssignerPlatformName() const
Get the name of the assigner.
Definition WsfTaskStatusMessage.hpp:82
WsfTaskStatusMessage()
Constructor, for XIO (de)serialization.
Definition WsfTaskStatusMessage.cpp:23
WsfTrackId mTrackId
The track ID of the track associated with the task.
Definition WsfTaskStatusMessage.hpp:225
void SetSubStatus(const std::string &aSubStatus)
Set the sub-status (string form).
Definition WsfTaskStatusMessage.hpp:123
unsigned int GetTaskId() const
Return the assigners task ID.
Definition WsfTaskStatusMessage.hpp:57
WsfStringId mTaskType
The type of the task.
Definition WsfTaskStatusMessage.hpp:228
void SetAssignerPlatformIndex(size_t aPlatformIndex)
Set the platform index of the assigner.
Definition WsfTaskStatusMessage.hpp:79
WsfStringId mSubStatus
The sub-status that is being reported.
Definition WsfTaskStatusMessage.hpp:222
size_t GetObjectPlatformIndex() const
Returns the object platform index.
Definition WsfTaskStatusMessage.hpp:165
void SetSubStatus(WsfStringId aSubStatus)
Set the sub-status (ID form).
Definition WsfTaskStatusMessage.hpp:120
void SetStatus(WsfStringId aStatus)
Set the status (ID form).
Definition WsfTaskStatusMessage.hpp:111
unsigned int mAcknowledgeId
The message serial number of the message that is being acknowledged by this message.
Definition WsfTaskStatusMessage.hpp:195
bool IsFromAssignee() const
Returns true if the message was sent by the assignee.
Definition WsfTaskStatusMessage.hpp:174
WsfStringId mStatus
The status that is being reported.
Definition WsfTaskStatusMessage.hpp:219
void SetResourceName(WsfStringId aResourceName)
Set the resource (ID form).
Definition WsfTaskStatusMessage.hpp:155
WsfStringId mAssigneePlatformName
The name of the assignee.
Definition WsfTaskStatusMessage.hpp:213
WsfStringId GetAssignerProcessorName() const
Get the name of the processor on the assigner.
Definition WsfTaskStatusMessage.hpp:85
WsfStringId GetSubStatus() const
Get the sub-status.
Definition WsfTaskStatusMessage.hpp:117
size_t mAssigneePlatformIndex
The platform index of the assignee.
Definition WsfTaskStatusMessage.hpp:210
static std::unique_ptr< UtScriptClass > CreateScriptClass(const std::string &aClassName, UtScriptTypes *aScriptTypesPtr)
Definition WsfTaskStatusMessage.cpp:147
size_t mObjectPlatformIndex
Index of the object platform.
Definition WsfTaskStatusMessage.hpp:234
unsigned int GetAcknowledgeId() const
Definition WsfTaskStatusMessage.hpp:65
size_t GetAssigneePlatformIndex() const
Get the platform index of the assignee.
Definition WsfTaskStatusMessage.hpp:93
size_t GetAssignerPlatformIndex() const
Get the platform index of the assigner.
Definition WsfTaskStatusMessage.hpp:76
void SetAcknowledgeId(unsigned int aAcknowledgeId)
Set the message serial number of the message that is being acknowledged.
Definition WsfTaskStatusMessage.hpp:68
bool mIsFromAssignee
Definition WsfTaskStatusMessage.hpp:239
WsfStringId mAssignerProcessorName
The name of the processor on the assigner.
Definition WsfTaskStatusMessage.hpp:207
WsfStringId GetResourceName() const
Get the resource name.
Definition WsfTaskStatusMessage.hpp:152
WsfStringId mResourceName
The resource assigned for the tasked.
Definition WsfTaskStatusMessage.hpp:231
void SetStatus(const std::string &aStatus)
Set the status (string form).
Definition WsfTaskStatusMessage.hpp:114
void SetTaskType(const std::string &aTaskType)
Set the task type (string form).
Definition WsfTaskStatusMessage.hpp:144
WsfStringId GetAssigneeProcessorName() const
Get the name of the processor on the assignee.
Definition WsfTaskStatusMessage.hpp:102
size_t mAssignerPlatformIndex
The platform index of the assigner.
Definition WsfTaskStatusMessage.hpp:201
void Serialize(T &aBuff)
For XIO (de)serialization.
Definition WsfTaskStatusMessage.hpp:183
WsfStringId GetTaskType() const
Get the task type.
Definition WsfTaskStatusMessage.hpp:138
A class that defines a task to be performed.
Definition WsfTask.hpp:28
Definition WsfTrackId.hpp:33
Copyrights Multiple, All Rights Reserved