WSF
WsfAssociationMessage Class Reference

#include <WsfAssociationMessage.hpp>

Inheritance diagram for WsfAssociationMessage:
Collaboration diagram for WsfAssociationMessage:

Public Member Functions

 WsfAssociationMessage ()
 Constructor, for XIO (de)serialization.
 WsfAssociationMessage (WsfPlatform *aPlatformPtr)
 WsfAssociationMessage (WsfSensor *aSensorPtr)
WsfMessageClone () const override
const char * GetScriptClassName () const override
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 ()
Static Public Member Functions inherited from WsfMessage
static WsfStringId GetTypeId ()

Associated Track ID methods.

The 'associated ID' is the track ID that is being associated with the subject track.

size_t mSensorPlatformIndex
 The index of the platform on which the producing sensor is located.
WsfStringId mSensorName
 The name of the producing sensor.
WsfTrackId mSubjectId
 The ID of the track to which the associated track applies.
WsfTrackId mAssociatedId
 The ID of the track that is associated with the subject track ID.
WsfTrackId GetAssociatedId () const
 Get the associated track ID.
void SetAssociatedId (const WsfTrackId &aAssociatedId)
 Set the associated track ID.
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.

Producing sensor methods.

These methods can be used to retrieve information about the producing sensor.

WsfPlatformGetSensorPlatform () const
size_t GetSensorPlatformIndex () const
 Return the index of the platform on which the producing sensor is located.
void SetSensorPlatformIndex (size_t aPlatformIndex)
 Set the index of the platform on which the producing sensor is located.
WsfStringId GetSensorName () const
 Return the name of the producing sensor.
void SetSensorName (WsfStringId aSensorName)
 Set the name of the producing sensor.

Subject Track ID methods.

The 'subject ID' is the ID of the track to which the associated track is being associated.

WsfTrackId GetSubjectId () const
 Get the subject track ID.
void SetSubjectId (const WsfTrackId &aSubjectId)
 Set the subject track ID.

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 'association message' associates a track produced by a sensor with a tracking request.

A request can be made to a sensor attempt to establish a track on an object using a cue that is itself a track (WsfSensor::StartTracking). When the sensor acquires the target(s), it will generate tracks. This message is issued by the sensor to indicate that a given sensor track is associated with a particular request.

In the typical case, the 'subject track ID' is the ID of the track that was provided to WsfSensor::StartTracking and the 'associated track ID' is the ID of the track that is being produced by the sensor in response to the request.

Note
The sensor will ensure that this message preceeds any message that pertains to the associated track. In this way, a recipient will be able to correctly associate the sensor track messages with the tracking request.

Constructor & Destructor Documentation

◆ WsfAssociationMessage() [1/3]

WsfAssociationMessage::WsfAssociationMessage ( )

Constructor, for XIO (de)serialization.

References GetTypeId(), mAssociatedId, mSensorName, mSensorPlatformIndex, mSubjectId, and WsfMessage::WsfMessage().

Referenced by Clone().

◆ WsfAssociationMessage() [2/3]

WsfAssociationMessage::WsfAssociationMessage ( WsfPlatform * aPlatformPtr)

Constructor (Create an Association Message).

Parameters
aPlatformPtrThe sender of the message.

References GetTypeId(), mAssociatedId, mSensorName, mSensorPlatformIndex, mSubjectId, and WsfMessage::WsfMessage().

◆ WsfAssociationMessage() [3/3]

WsfAssociationMessage::WsfAssociationMessage ( WsfSensor * aSensorPtr)

Constructor (Create an Association Message).

Parameters
aSensorPtrThe sensor that is producing the subject track.

References GetTypeId(), mAssociatedId, mSensorName, mSensorPlatformIndex, mSubjectId, and WsfMessage::WsfMessage().

Member Function Documentation

◆ Clone()

WsfMessage * WsfAssociationMessage::Clone ( ) const
overridevirtual

Create a clone of this message (the 'virtual copy constructor').

Returns
The pointer to the copy of this message.

Reimplemented from WsfMessage.

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

◆ CreateScriptClass()

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

◆ GetAssociatedId()

WsfTrackId WsfAssociationMessage::GetAssociatedId ( ) const
inline

Get the associated track ID.

References mAssociatedId.

Referenced by WsfTaskManager::ProcessAssociationMessage().

◆ GetScriptClassName()

const char * WsfAssociationMessage::GetScriptClassName ( ) const
override

◆ GetSensorName()

WsfStringId WsfAssociationMessage::GetSensorName ( ) const
inline

Return the name of the producing sensor.

References mSensorName.

Referenced by WsfTaskManager::ProcessAssociationMessage().

◆ GetSensorPlatform()

WsfPlatform * WsfAssociationMessage::GetSensorPlatform ( ) const

Return the pointer to the sensing platform.

Returns
The pointer to the sensing platform, or zero if the platform has been deleted.

References WsfSimulation::GetPlatformByIndex(), WsfMessage::GetSimulation(), and mSensorPlatformIndex.

◆ GetSensorPlatformIndex()

size_t WsfAssociationMessage::GetSensorPlatformIndex ( ) const
inline

Return the index of the platform on which the producing sensor is located.

References mSensorPlatformIndex.

Referenced by WsfXIO_AutoDisMapping::TranslateAssociationMessage().

◆ GetSubjectId()

WsfTrackId WsfAssociationMessage::GetSubjectId ( ) const
inline

Get the subject track ID.

References mSubjectId.

Referenced by WsfTaskManager::ProcessAssociationMessage().

◆ GetTypeId()

WsfStringId WsfAssociationMessage::GetTypeId ( )
static

Get the type ID associated with this message.

Returns
The string ID of this message.

Referenced by WsfXIO_MessageService::HandleMessage(), WsfXIO_AutoDisMapping::Initialize(), WsfAssociationMessage(), WsfAssociationMessage(), and WsfAssociationMessage().

◆ Serialize()

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

For XIO (de)serialization.

References mAssociatedId, mSensorName, mSensorPlatformIndex, mSubjectId, and WsfMessage::Serialize().

◆ SetAssociatedId()

void WsfAssociationMessage::SetAssociatedId ( const WsfTrackId & aAssociatedId)
inline

Set the associated track ID.

References mAssociatedId.

Referenced by WsfDefaultSensorTracker::TargetDetected().

◆ SetSensorName()

void WsfAssociationMessage::SetSensorName ( WsfStringId aSensorName)
inline

Set the name of the producing sensor.

References mSensorName.

◆ SetSensorPlatformIndex()

void WsfAssociationMessage::SetSensorPlatformIndex ( size_t aPlatformIndex)
inline

Set the index of the platform on which the producing sensor is located.

References mSensorPlatformIndex.

Referenced by WsfXIO_AutoDisMapping::TranslateAssociationMessage().

◆ SetSubjectId()

void WsfAssociationMessage::SetSubjectId ( const WsfTrackId & aSubjectId)
inline

Set the subject track ID.

References mSubjectId.

Referenced by WsfDefaultSensorTracker::TargetDetected().

Member Data Documentation

◆ mAssociatedId

WsfTrackId WsfAssociationMessage::mAssociatedId
protected

The ID of the track that is associated with the subject track ID.

Referenced by GetAssociatedId(), Serialize(), SetAssociatedId(), WsfAssociationMessage(), WsfAssociationMessage(), and WsfAssociationMessage().

◆ mSensorName

WsfStringId WsfAssociationMessage::mSensorName
protected

◆ mSensorPlatformIndex

size_t WsfAssociationMessage::mSensorPlatformIndex
protected

The index of the platform on which the producing sensor is located.

Referenced by GetSensorPlatform(), GetSensorPlatformIndex(), Serialize(), SetSensorPlatformIndex(), WsfAssociationMessage(), WsfAssociationMessage(), and WsfAssociationMessage().

◆ mSubjectId

WsfTrackId WsfAssociationMessage::mSubjectId
protected

The ID of the track to which the associated track applies.

Referenced by GetSubjectId(), Serialize(), SetSubjectId(), WsfAssociationMessage(), WsfAssociationMessage(), and WsfAssociationMessage().


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