WSF
WsfAssociationMessage.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 WSFASSOCIATIONMESSAGE_HPP
13#define WSFASSOCIATIONMESSAGE_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;
24class WsfSensor;
25#include "WsfStringId.hpp"
26#include "WsfTrackId.hpp"
27
43{
44public:
45 WsfAssociationMessage(); // For XIO (de)serialization.
48 WsfMessage* Clone() const override;
49 const char* GetScriptClassName() const override;
50 static std::unique_ptr<UtScriptClass> CreateScriptClass(const std::string& aClassName, UtScriptTypes* aScriptTypesPtr);
51
52 static WsfStringId GetTypeId();
53
56
58
61
63 void SetSensorPlatformIndex(size_t aPlatformIndex) { mSensorPlatformIndex = aPlatformIndex; }
64
67
69 void SetSensorName(WsfStringId aSensorName) { mSensorName = aSensorName; }
71
75
76
78
80 void SetSubjectId(const WsfTrackId& aSubjectId) { mSubjectId = aSubjectId; }
82
86
87
89
91 void SetAssociatedId(const WsfTrackId& aAssociatedId) { mAssociatedId = aAssociatedId; }
93
95 template<typename T>
96 void Serialize(T& aBuff)
97 {
100 }
101
102protected:
103 // Using the default copy constructor.
104 // WsfAssociationMessage(const WsfAssociationMessage& aSrc);
105
108
111
114
117};
118
119#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
size_t mSensorPlatformIndex
The index of the platform on which the producing sensor is located.
Definition WsfAssociationMessage.hpp:107
WsfTrackId GetAssociatedId() const
Get the associated track ID.
Definition WsfAssociationMessage.hpp:88
WsfAssociationMessage()
Constructor, for XIO (de)serialization.
Definition WsfAssociationMessage.cpp:26
void SetSensorPlatformIndex(size_t aPlatformIndex)
Set the index of the platform on which the producing sensor is located.
Definition WsfAssociationMessage.hpp:63
size_t GetSensorPlatformIndex() const
Return the index of the platform on which the producing sensor is located.
Definition WsfAssociationMessage.hpp:60
void SetSubjectId(const WsfTrackId &aSubjectId)
Set the subject track ID.
Definition WsfAssociationMessage.hpp:80
WsfStringId GetSensorName() const
Return the name of the producing sensor.
Definition WsfAssociationMessage.hpp:66
void SetSensorName(WsfStringId aSensorName)
Set the name of the producing sensor.
Definition WsfAssociationMessage.hpp:69
WsfTrackId mAssociatedId
The ID of the track that is associated with the subject track ID.
Definition WsfAssociationMessage.hpp:116
void SetAssociatedId(const WsfTrackId &aAssociatedId)
Set the associated track ID.
Definition WsfAssociationMessage.hpp:91
void Serialize(T &aBuff)
For XIO (de)serialization.
Definition WsfAssociationMessage.hpp:96
WsfTrackId GetSubjectId() const
Get the subject track ID.
Definition WsfAssociationMessage.hpp:77
static std::unique_ptr< UtScriptClass > CreateScriptClass(const std::string &aClassName, UtScriptTypes *aScriptTypesPtr)
Definition WsfAssociationMessage.cpp:105
WsfStringId mSensorName
The name of the producing sensor.
Definition WsfAssociationMessage.hpp:110
WsfTrackId mSubjectId
The ID of the track to which the associated track applies.
Definition WsfAssociationMessage.hpp:113
WsfPlatform * GetSensorPlatform() const
Definition WsfAssociationMessage.cpp:75
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
Definition WsfSensor.hpp:92
Definition WsfTrackId.hpp:33
Copyrights Multiple, All Rights Reserved