WSF
WsfTrackNotifyMessage Class Reference

A specialization of WsfMessage that is used by the WsfTrackManager to represent state changes of a track in the master track list (see WsfTrackManager for supported state changes). More...

#include <WsfTrackNotifyMessage.hpp>

Inheritance diagram for WsfTrackNotifyMessage:
Collaboration diagram for WsfTrackNotifyMessage:

Public Member Functions

 WsfTrackNotifyMessage (WsfPlatform *aPlatformPtr, const WsfTrackId &aTrackId, WsfStringId aTrackProcessorNameId, int aChangedReason)
 Constructor.
 ~WsfTrackNotifyMessage () override
WsfMessageClone () const override
const char * GetScriptClassName () const override
const WsfTrackIdGetTrackId () const
WsfStringId GetTrackProcessorNameId () const
int GetChangedReason () const
template<typename T>
void Serialize (T &aBuff)
Public Member Functions inherited from WsfMessage
 WsfMessage (WsfStringId aType)
 Constructor for XIO (de)serialization.
 WsfMessage (WsfStringId aType, const wsf::comm::Address &aSrcAddr, WsfSimulation &aSimulation)
 WsfMessage (WsfPlatform *aPlatformPtr)
 WsfMessage (WsfStringId aType, WsfPlatform *aPlatformPtr)
 WsfMessage (WsfStringId aType, WsfStringId aSubType, WsfPlatform *aPlatformPtr)
 WsfMessage (WsfSimulation &aSimulation)
WsfMessageoperator= (const WsfMessage &aRhs)=default
 ~WsfMessage () override
const char * GetScriptClassName () const override
WsfSimulationGetSimulation () const
 Get the simulation that owns the message.
void SetSimulation (WsfSimulation *aSimulationPtr)
WsfStringId GetOriginator () const
void SetOriginator (WsfPlatform *aPlatformPtr)
 Set the originator of this message.
size_t GetOriginatorIndex () const
int GetSizeBits () const
void SetSizeBits (int aSizeBits)
int GetSizeBytes () const
void SetSizeBytes (int aSizeBytes)
unsigned int GetSerialNumber () const
void SetSerialNumber (unsigned int aSerialNumber)
double GetDataTag () const
void SetDataTag (double aDataTag)
WsfStringId GetStaticType () const
WsfStringId GetType () const
void SetType (WsfStringId aType)
WsfStringId GetSubType () const
void SetSubType (WsfStringId aSubType)
int GetPriority () const
void SetPriority (int aPriority)
const wsf::comm::AddressGetSrcAddr () const
void SetSrcAddr (const wsf::comm::Address &aSrcAddr)
const wsf::comm::AddressGetDstAddr () const
void SetDstAddr (const wsf::comm::Address &aDstAddr)
const wsf::comm::AddressGetNextHopAddr () const
void SetNextHopAddr (const wsf::comm::Address &aNextHopAddr)
virtual bool CanBeReplacedBy (const WsfMessage &aMessage) const
WsfStringId GetGroup () const
void SetGroup (WsfStringId aGroup) const
void PrintDataTagPrecise (std::ostream &aStream, std::streamsize aPrecision) const
template<typename T>
void Serialize (T &aBuff)
 (De)serializer for XIO
virtual WsfStringId GetComponentNameId () const
virtual WsfStringId GetComponentTypeId () const
virtual WsfStringId GetComponentModeId () const
Public Member Functions inherited from WsfAuxDataEnabled
 WsfAuxDataEnabled ()=default
 WsfAuxDataEnabled (const WsfAuxDataEnabled &aSrc)=default
WsfAuxDataEnabledoperator= (const WsfAuxDataEnabled &aRhs)
 WsfAuxDataEnabled (WsfAuxDataEnabled &&)=default
WsfAuxDataEnabledoperator= (WsfAuxDataEnabled &&)=default
virtual ~WsfAuxDataEnabled () noexcept
void SetAuxData (const WsfAttributeContainer &aAuxData)
void DeleteAuxData ()
 Delete the aux data container from the object.
void MergeAuxData (const WsfAuxDataEnabled &aSrc)
 Merge the object's aux data with aux data from an existing object.
void UpdateAuxData (const WsfAuxDataEnabled &aSrc)
 Update the object's aux data with aux data from an existing object.
bool HasAuxData () const
 Returns true if this object has aux data.
bool ProcessInput (UtInput &aInput)
template<typename T>
void Serialize (T &aBuff)
 (De)serialization for XIO
WsfAttributeContainerGetAuxData ()
const WsfAttributeContainerGetAuxData () const noexcept
const WsfAttributeContainerGetAuxDataConst () const noexcept

Static Public Member Functions

static std::unique_ptr< UtScriptClass > CreateScriptClass (const std::string &aClassName, UtScriptTypes *aScriptTypesPtr)
static WsfStringId GetTypeId ()
 Return the specific type id corresponding with the name of this message type (WSF_TRACK_NOTIFY_MESSAGE).
Static Public Member Functions inherited from WsfMessage
static WsfStringId GetTypeId ()

Additional Inherited Members

Static Public Attributes inherited from WsfMessage
static constexpr size_t cBITS_IN_BYTE = 8U
Static Public Attributes inherited from WsfAuxDataEnabled
static UtCallbackListN< void(const WsfAuxDataEnabled *)> AuxDataAccessed
static UtCallbackListN< void(const WsfAuxDataEnabled *)> AuxDataDestroyed
 WsfMessage (const WsfMessage &aSrc)=default

Detailed Description

A specialization of WsfMessage that is used by the WsfTrackManager to represent state changes of a track in the master track list (see WsfTrackManager for supported state changes).

Once received, the receiver can check his master track list to take appropriate action.

Constructor & Destructor Documentation

◆ WsfTrackNotifyMessage()

WsfTrackNotifyMessage::WsfTrackNotifyMessage ( WsfPlatform * aPlatformPtr,
const WsfTrackId & aTrackId,
WsfStringId aTrackProcessorNameId,
int aChangedReason )

Constructor.

Parameters
aPlatformPtrThe originator of the message.
aTrackIdThe local track ID corresponding with the track of interest.
aTrackProcessorNameIdThe name of the track processor that originated this message.
aChangedReasonThe changed reason as enumerated in WsfTrackManager. These can be one of (CREATED, UPDATED, DROPPED, REMOVED).

References GetTypeId(), and WsfMessage::WsfMessage().

Referenced by Clone().

◆ ~WsfTrackNotifyMessage()

WsfTrackNotifyMessage::~WsfTrackNotifyMessage ( )
override

Member Function Documentation

◆ Clone()

WsfMessage * WsfTrackNotifyMessage::Clone ( ) const
inlineoverridevirtual

Clone this object by creating an identical copy and returning a pointer to it.

Returns
A pointer to the cloned object.

Reimplemented from WsfMessage.

References WsfMessage::WsfMessage(), and WsfTrackNotifyMessage().

◆ CreateScriptClass()

std::unique_ptr< UtScriptClass > WsfTrackNotifyMessage::CreateScriptClass ( const std::string & aClassName,
UtScriptTypes * aScriptTypesPtr )
static

Create the 'class' object for the script system. This is invoked once by WsfScriptManager to create the 'class' object that defines the interface to instances of this class from the script system.

Referenced by WsfScriptManager::RegisterTypes().

◆ GetChangedReason()

int WsfTrackNotifyMessage::GetChangedReason ( ) const
inline

Get the reason for sending this message.

Returns
The changed track status.

Referenced by WsfTrackProcessor::ProcessMessage().

◆ GetScriptClassName()

const char * WsfTrackNotifyMessage::GetScriptClassName ( ) const
override

◆ GetTrackId()

const WsfTrackId & WsfTrackNotifyMessage::GetTrackId ( ) const
inline

Get the ID of the track whose state has changed.

Returns
The ID of the dropped track.

Referenced by WsfTrackProcessor::ProcessMessage().

◆ GetTrackProcessorNameId()

WsfStringId WsfTrackNotifyMessage::GetTrackProcessorNameId ( ) const
inline

Get the name of the track processor that owns the changed track.

Note
There can be multiple track processors on a single platform.

Referenced by WsfTrackProcessor::ProcessMessage().

◆ GetTypeId()

WsfStringId WsfTrackNotifyMessage::GetTypeId ( )
static

Return the specific type id corresponding with the name of this message type (WSF_TRACK_NOTIFY_MESSAGE).

Referenced by WsfTrackProcessor::ProcessMessage(), and WsfTrackNotifyMessage().

◆ Serialize()

template<typename T>
void WsfTrackNotifyMessage::Serialize ( T & aBuff)
inline

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved