WSF
WsfTaskStatusMessage Class Reference

#include <WsfTaskStatusMessage.hpp>

Inheritance diagram for WsfTaskStatusMessage:
Collaboration diagram for WsfTaskStatusMessage:

Public Member Functions

 WsfTaskStatusMessage ()
 Constructor, for XIO (de)serialization.
 WsfTaskStatusMessage (WsfPlatform *aPlatformPtr)
 WsfTaskStatusMessage (WsfStringId aStatusId, WsfPlatform *aSenderPtr, const WsfTask &aTask)
WsfMessageClone () const override
const char * GetScriptClassName () const override
unsigned int GetTaskId () const
 Return the assigners task ID.
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 ()

Message source.

unsigned int mAcknowledgeId
 The message serial number of the message that is being acknowledged by this message.
unsigned int mTaskId
 The assigners task ID.
size_t mAssignerPlatformIndex
 The platform index of the assigner.
WsfStringId mAssignerPlatformName
 The name of the assigner.
WsfStringId mAssignerProcessorName
 The name of the processor on the assigner.
size_t mAssigneePlatformIndex
 The platform index of the assignee.
WsfStringId mAssigneePlatformName
 The name of the assignee.
WsfStringId mAssigneeProcessorName
 The name of the processor on the assignee.
WsfStringId mStatus
 The status that is being reported.
WsfStringId mSubStatus
 The sub-status that is being reported.
WsfTrackId mTrackId
 The track ID of the track associated with the task.
WsfStringId mTaskType
 The type of the task.
WsfStringId mResourceName
 The resource assigned for the tasked.
size_t mObjectPlatformIndex
 Index of the object platform.
bool mIsFromAssignee
bool IsFromAssignee () const
 Returns true if the message was sent by the assignee.
void SetIsFromAssignee (bool aIsFromAssignee)
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.

Message acknowledge Id.

A status message may represent the acknowledgment of a received message. The value is the message serial number of the message that is being acknowledged.

unsigned int GetAcknowledgeId () const
void SetAcknowledgeId (unsigned int aAcknowledgeId)
 Set the message serial number of the message that is being acknowledged.

Assigner methods.

WsfPlatformGetAssigner () const
size_t GetAssignerPlatformIndex () const
 Get the platform index of the assigner.
void SetAssignerPlatformIndex (size_t aPlatformIndex)
 Set the platform index of the assigner.
WsfStringId GetAssignerPlatformName () const
 Get the name of the assigner.
WsfStringId GetAssignerProcessorName () const
 Get the name of the processor on the assigner.

Assignee methods.

WsfPlatformGetAssignee () const
size_t GetAssigneePlatformIndex () const
 Get the platform index of the assignee.
void SetAssigneePlatformIndex (size_t aPlatformIndex)
 Set the platform index of the assignee.
WsfStringId GetAssigneePlatformName () const
 Get the name of the assignee.
WsfStringId GetAssigneeProcessorName () const
 Get the name of the processor on the assignee.

Status and sub-status methods.

WsfStringId GetStatus () const
 Get the status.
void SetStatus (WsfStringId aStatus)
 Set the status (ID form).
void SetStatus (const std::string &aStatus)
 Set the status (string form).
WsfStringId GetSubStatus () const
 Get the sub-status.
void SetSubStatus (WsfStringId aSubStatus)
 Set the sub-status (ID form).
void SetSubStatus (const std::string &aSubStatus)
 Set the sub-status (string form).

Track ID methods.

const WsfTrackIdGetTrackId () const
 Get the task ID to which the message applies.
void SetTrackId (const WsfTrackId &aTrackId)
 Set the task ID to which the message applies.

Task type methods.

WsfStringId GetTaskType () const
 Get the task type.
void SetTaskType (WsfStringId aTaskType)
 Set the task type (ID form).
void SetTaskType (const std::string &aTaskType)
 Set the task type (string form).

Resource methods.

A task may have an associated resource (sensor, processor, etc.)

WsfStringId GetResourceName () const
 Get the resource name.
void SetResourceName (WsfStringId aResourceName)
 Set the resource (ID form).
void SetResourceName (const std::string &aResourceName)
 Set the resource (string form).

Object index methods.

A task status may be referencing another object. This is the object platform index.

size_t GetObjectPlatformIndex () const
 Returns the object platform index.
void SetObjectPlatformIndex (size_t aIndex)
 Sets the object platform index.

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 'status message' provides status about a task assignment. This message is sent by the recipient of a task assignment to indicate the progress towards performing the task. Messages are generally sent to convey:

  • acceptance or rejection of the task assignment.
  • completion of the task.
  • intermediate progress on the task.

Common values of the 'status' are defined by convention in WsfTaskManager, but other values may be defined if a particular application has other requirements.

See also
WsfTaskManager
WsfTaskAssignMessage

Constructor & Destructor Documentation

◆ WsfTaskStatusMessage() [1/3]

◆ WsfTaskStatusMessage() [2/3]

◆ WsfTaskStatusMessage() [3/3]

WsfTaskStatusMessage::WsfTaskStatusMessage ( WsfStringId aStatus,
WsfPlatform * aSenderPtr,
const WsfTask & aTask )

Constructor.

Parameters
aStatusThe status as a string ID.
aSenderPtrThe originator of the message. In most cases this will be the assignee, but it may be the assigner if it is sending the acknowledgment of the task complete status.
aTaskThe task whose status is being reported.

References GetAssigneePlatformIndex(), GetAssigneePlatformName(), GetAssigneeProcessorName(), GetAssignerPlatformIndex(), GetAssignerPlatformName(), GetAssignerProcessorName(), GetResourceName(), GetTaskId(), GetTaskType(), GetTrackId(), GetTypeId(), mAcknowledgeId, mAssigneePlatformIndex, mAssigneePlatformName, mAssigneeProcessorName, mAssignerPlatformIndex, mAssignerPlatformName, mAssignerProcessorName, mIsFromAssignee, mObjectPlatformIndex, mResourceName, mStatus, mSubStatus, mTaskId, mTaskType, mTrackId, and WsfMessage::WsfMessage().

Member Function Documentation

◆ Clone()

WsfMessage * WsfTaskStatusMessage::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 WsfMessage::WsfMessage(), and WsfTaskStatusMessage().

◆ CreateScriptClass()

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

◆ GetAcknowledgeId()

unsigned int WsfTaskStatusMessage::GetAcknowledgeId ( ) const
inline

The message serial number of the message that is being acknowledged by this message. If zero then the message is not acknowledging another message.

References mAcknowledgeId.

Referenced by WsfQuantumTaskerProcessor::ProcessTaskStatusMessage(), WsfTaskManager::ProcessTaskStatusMessage(), and WsfTaskManager::ReceiveMessage().

◆ GetAssignee()

WsfPlatform * WsfTaskStatusMessage::GetAssignee ( ) const

Return the pointer to the assigned platform.

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

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

◆ GetAssigneePlatformIndex()

size_t WsfTaskStatusMessage::GetAssigneePlatformIndex ( ) const
inline

◆ GetAssigneePlatformName()

WsfStringId WsfTaskStatusMessage::GetAssigneePlatformName ( ) const
inline

◆ GetAssigneeProcessorName()

WsfStringId WsfTaskStatusMessage::GetAssigneeProcessorName ( ) const
inline

Get the name of the processor on the assignee.

References mAssigneeProcessorName.

Referenced by WsfTaskManager::ReceiveMessage(), and WsfTaskStatusMessage().

◆ GetAssigner()

WsfPlatform * WsfTaskStatusMessage::GetAssigner ( ) const

Return the pointer to the assigning platform.

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

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

◆ GetAssignerPlatformIndex()

◆ GetAssignerPlatformName()

WsfStringId WsfTaskStatusMessage::GetAssignerPlatformName ( ) const
inline

Get the name of the assigner.

References mAssignerPlatformName.

Referenced by WsfTaskStatusMessage().

◆ GetAssignerProcessorName()

WsfStringId WsfTaskStatusMessage::GetAssignerProcessorName ( ) const
inline

Get the name of the processor on the assigner.

References mAssignerProcessorName.

Referenced by WsfTaskManager::ReceiveMessage(), and WsfTaskStatusMessage().

◆ GetObjectPlatformIndex()

size_t WsfTaskStatusMessage::GetObjectPlatformIndex ( ) const
inline

Returns the object platform index.

References mObjectPlatformIndex.

Referenced by WsfWeaponTaskManager::ProcessTaskStatusMessage().

◆ GetResourceName()

WsfStringId WsfTaskStatusMessage::GetResourceName ( ) const
inline

◆ GetScriptClassName()

const char * WsfTaskStatusMessage::GetScriptClassName ( ) const
override

◆ GetStatus()

◆ GetSubStatus()

WsfStringId WsfTaskStatusMessage::GetSubStatus ( ) const
inline

◆ GetTaskId()

unsigned int WsfTaskStatusMessage::GetTaskId ( ) const
inline

◆ GetTaskType()

◆ GetTrackId()

const WsfTrackId & WsfTaskStatusMessage::GetTrackId ( ) const
inline

◆ GetTypeId()

WsfStringId WsfTaskStatusMessage::GetTypeId ( )
static

◆ IsFromAssignee()

bool WsfTaskStatusMessage::IsFromAssignee ( ) const
inline

Returns true if the message was sent by the assignee.

References mIsFromAssignee.

Referenced by WsfTaskManager::ReceiveMessage().

◆ Serialize()

◆ SetAcknowledgeId()

void WsfTaskStatusMessage::SetAcknowledgeId ( unsigned int aAcknowledgeId)
inline

◆ SetAssigneePlatformIndex()

void WsfTaskStatusMessage::SetAssigneePlatformIndex ( size_t aPlatformIndex)
inline

Set the platform index of the assignee.

References mAssigneePlatformIndex.

Referenced by WsfXIO_AutoDisMapping::TranslateTaskStatusMessage().

◆ SetAssignerPlatformIndex()

void WsfTaskStatusMessage::SetAssignerPlatformIndex ( size_t aPlatformIndex)
inline

Set the platform index of the assigner.

References mAssignerPlatformIndex.

Referenced by WsfXIO_AutoDisMapping::TranslateTaskStatusMessage().

◆ SetIsFromAssignee()

void WsfTaskStatusMessage::SetIsFromAssignee ( bool aIsFromAssignee)
inline

Declare if the message is being sent by the assignee. This is only used to send the acknowledgment of a task complete message back to the assignee.

References mIsFromAssignee.

Referenced by WsfQuantumTaskerProcessor::ProcessTaskStatusMessage(), and WsfTaskManager::ProcessTaskStatusMessage().

◆ SetObjectPlatformIndex()

void WsfTaskStatusMessage::SetObjectPlatformIndex ( size_t aIndex)
inline

Sets the object platform index.

References mObjectPlatformIndex.

Referenced by WsfWeaponTaskManager::WeaponFired().

◆ SetResourceName() [1/2]

void WsfTaskStatusMessage::SetResourceName ( const std::string & aResourceName)
inline

Set the resource (string form).

References mResourceName.

◆ SetResourceName() [2/2]

void WsfTaskStatusMessage::SetResourceName ( WsfStringId aResourceName)
inline

Set the resource (ID form).

References mResourceName.

◆ SetStatus() [1/2]

void WsfTaskStatusMessage::SetStatus ( const std::string & aStatus)
inline

Set the status (string form).

References mStatus.

◆ SetStatus() [2/2]

void WsfTaskStatusMessage::SetStatus ( WsfStringId aStatus)
inline

Set the status (ID form).

References mStatus.

◆ SetSubStatus() [1/2]

void WsfTaskStatusMessage::SetSubStatus ( const std::string & aSubStatus)
inline

Set the sub-status (string form).

References mSubStatus.

◆ SetSubStatus() [2/2]

void WsfTaskStatusMessage::SetSubStatus ( WsfStringId aSubStatus)
inline

Set the sub-status (ID form).

References mSubStatus.

Referenced by WsfTaskManager::ReportTaskComplete(), and WsfTaskManager::ReportTaskProgress().

◆ SetTaskType() [1/2]

void WsfTaskStatusMessage::SetTaskType ( const std::string & aTaskType)
inline

Set the task type (string form).

References mTaskType.

◆ SetTaskType() [2/2]

void WsfTaskStatusMessage::SetTaskType ( WsfStringId aTaskType)
inline

Set the task type (ID form).

References mTaskType.

◆ SetTrackId()

void WsfTaskStatusMessage::SetTrackId ( const WsfTrackId & aTrackId)
inline

Set the task ID to which the message applies.

References mTrackId.

Member Data Documentation

◆ mAcknowledgeId

unsigned int WsfTaskStatusMessage::mAcknowledgeId
protected

The message serial number of the message that is being acknowledged by this message.

Referenced by GetAcknowledgeId(), Serialize(), SetAcknowledgeId(), WsfTaskStatusMessage(), WsfTaskStatusMessage(), and WsfTaskStatusMessage().

◆ mAssigneePlatformIndex

size_t WsfTaskStatusMessage::mAssigneePlatformIndex
protected

◆ mAssigneePlatformName

WsfStringId WsfTaskStatusMessage::mAssigneePlatformName
protected

◆ mAssigneeProcessorName

WsfStringId WsfTaskStatusMessage::mAssigneeProcessorName
protected

The name of the processor on the assignee.

Referenced by GetAssigneeProcessorName(), Serialize(), WsfTaskStatusMessage(), WsfTaskStatusMessage(), and WsfTaskStatusMessage().

◆ mAssignerPlatformIndex

size_t WsfTaskStatusMessage::mAssignerPlatformIndex
protected

◆ mAssignerPlatformName

WsfStringId WsfTaskStatusMessage::mAssignerPlatformName
protected

◆ mAssignerProcessorName

WsfStringId WsfTaskStatusMessage::mAssignerProcessorName
protected

The name of the processor on the assigner.

Referenced by GetAssignerProcessorName(), Serialize(), WsfTaskStatusMessage(), WsfTaskStatusMessage(), and WsfTaskStatusMessage().

◆ mIsFromAssignee

bool WsfTaskStatusMessage::mIsFromAssignee
protected

True if the message is from the assignee or false if from the assigner. By default a message is from the assignee. The only time this is from the assigner is if it is acknowledging the receipt of a task completion.

Referenced by IsFromAssignee(), Serialize(), SetIsFromAssignee(), WsfTaskStatusMessage(), WsfTaskStatusMessage(), and WsfTaskStatusMessage().

◆ mObjectPlatformIndex

size_t WsfTaskStatusMessage::mObjectPlatformIndex
protected

◆ mResourceName

WsfStringId WsfTaskStatusMessage::mResourceName
protected

◆ mStatus

WsfStringId WsfTaskStatusMessage::mStatus
protected

◆ mSubStatus

WsfStringId WsfTaskStatusMessage::mSubStatus
protected

◆ mTaskId

unsigned int WsfTaskStatusMessage::mTaskId
protected

◆ mTaskType

WsfStringId WsfTaskStatusMessage::mTaskType
protected

◆ mTrackId

WsfTrackId WsfTaskStatusMessage::mTrackId
protected

The track ID of the track associated with the task.

Referenced by GetTrackId(), Serialize(), SetTrackId(), WsfTaskStatusMessage(), WsfTaskStatusMessage(), and WsfTaskStatusMessage().


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