WSF
WsfTrackMessage Class Reference

#include <WsfTrackMessage.hpp>

Inheritance diagram for WsfTrackMessage:
Collaboration diagram for WsfTrackMessage:

Public Member Functions

 WsfTrackMessage ()
 Constructor, for XIO (de)serialization.
 WsfTrackMessage (WsfPlatform *aPlatformPtr)
 WsfTrackMessage (WsfPlatform *aPlatformPtr, const WsfTrack &aTrack)
 WsfTrackMessage (const WsfTrackMessage &)
 Copy constructor (for Clone()).
WsfTrackMessageoperator= (const WsfTrackMessage &)=delete
 ~WsfTrackMessage () override
WsfMessageClone () const override
const char * GetScriptClassName () const override
WsfTrackGetTrack () const
void SetTrack (const WsfTrack &aTrack)
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)
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
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 ()
Static Public Member Functions inherited from WsfMessage
static WsfStringId GetTypeId ()

Helpers for WsfTrackProcessor.

These routines exists to help WsfTrackProcessor detect circular track updates.

WsfStringId GetSenderId () const
WsfStringId GetReplyId () const
void SetSenderId (WsfStringId aSenderId)
void SetReplyId (WsfStringId aReplyId)
bool CanBeReplacedBy (const WsfMessage &aMessage) const override
WsfStringId GetComponentNameId () const override
WsfStringId GetComponentTypeId () const override
WsfStringId GetComponentModeId () const override
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.

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 represents a track (WsfTrack) to be transmitted over a communications network.

Constructor & Destructor Documentation

◆ WsfTrackMessage() [1/4]

WsfTrackMessage::WsfTrackMessage ( )

Constructor, for XIO (de)serialization.

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

Referenced by CanBeReplacedBy(), Clone(), operator=(), and WsfTrackMessage().

◆ WsfTrackMessage() [2/4]

WsfTrackMessage::WsfTrackMessage ( WsfPlatform * aPlatformPtr)

◆ WsfTrackMessage() [3/4]

WsfTrackMessage::WsfTrackMessage ( WsfPlatform * aPlatformPtr,
const WsfTrack & aTrack )

◆ WsfTrackMessage() [4/4]

WsfTrackMessage::WsfTrackMessage ( const WsfTrackMessage & aSrc)

Copy constructor (for Clone()).

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

◆ ~WsfTrackMessage()

WsfTrackMessage::~WsfTrackMessage ( )
override

Member Function Documentation

◆ CanBeReplacedBy()

bool WsfTrackMessage::CanBeReplacedBy ( const WsfMessage & aMessage) const
overridevirtual

Can this message be replaced by the new message.

This routine can be used by communications devices to determine if a message that is to be sent should replace a message is in the queue for transmission. For example, a new track update message should replace any queued track update message for the same track ID.

Parameters
aMessageThe new message.
Returns
'true' if the supplied message is a replacement for this message.
Note
The default implementation returns 'false' (the message cannot replace the current message).

Reimplemented from WsfMessage.

References WsfTrack::GetTrackId(), WsfMessage::GetType(), GetTypeId(), WsfMessage::WsfMessage(), and WsfTrackMessage().

◆ Clone()

WsfMessage * WsfTrackMessage::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 WsfTrackMessage().

◆ CreateScriptClass()

std::unique_ptr< UtScriptClass > WsfTrackMessage::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().

◆ GetComponentModeId()

WsfStringId WsfTrackMessage::GetComponentModeId ( ) const
overridevirtual
Returns
The string ID of the mode of the sensor that generated the track contained in the message

Reimplemented from WsfMessage.

◆ GetComponentNameId()

WsfStringId WsfTrackMessage::GetComponentNameId ( ) const
overridevirtual
Returns
The string ID of the name of the sensor that generated the track contained in the message

Reimplemented from WsfMessage.

◆ GetComponentTypeId()

WsfStringId WsfTrackMessage::GetComponentTypeId ( ) const
overridevirtual
Returns
The string ID of the type of the sensor that generated the track contained in the message

Reimplemented from WsfMessage.

◆ GetReplyId()

WsfStringId WsfTrackMessage::GetReplyId ( ) const
inline

◆ GetScriptClassName()

const char * WsfTrackMessage::GetScriptClassName ( ) const
override

◆ GetSenderId()

WsfStringId WsfTrackMessage::GetSenderId ( ) const
inline

◆ GetTrack()

WsfTrack * WsfTrackMessage::GetTrack ( ) const
inline

Return the pointer to the track

Returns
a pointer to the track contained in the message
Note
This pointer is valid only during the processing of the message. If the information is to be saved then the track must be cloned.

Referenced by WsfCompositeSensor::ProcessMessage(), WsfCuedLaserWeapon::ProcessMessage(), WsfDirectionFinderProcessor::ProcessMessage(), WsfRF_Jammer::ProcessMessage(), WsfTrackProcessor::ProcessMessage(), WsfWeaponTrackProcessor::ProcessMessage(), WsfTrackProcessor::SendTrackP(), and WsfXIO_AutoDisMapping::TranslateTrackMessage().

◆ GetTypeId()

◆ operator=()

WsfTrackMessage & WsfTrackMessage::operator= ( const WsfTrackMessage & )
delete

References WsfTrackMessage().

◆ Serialize()

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

For XIO (de)serialization.

References WsfMessage::Serialize().

◆ SetReplyId()

void WsfTrackMessage::SetReplyId ( WsfStringId aReplyId)
inline

◆ SetSenderId()

void WsfTrackMessage::SetSenderId ( WsfStringId aSenderId)
inline

◆ SetTrack()

void WsfTrackMessage::SetTrack ( const WsfTrack & aTrack)

Sets the message's track.

Parameters
aTrackThe track that will be cloned and stored.

References WsfTrack::Clone(), and WsfMessage::SetDataTag().

Referenced by WsfTrackMessage().


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