WSF
WsfTaskControlMessage Class Reference

#include <WsfTaskControlMessage.hpp>

Inheritance diagram for WsfTaskControlMessage:
Collaboration diagram for WsfTaskControlMessage:

Public Member Functions

 WsfTaskControlMessage ()
 Constructor, for XIO (de)serialization.
 WsfTaskControlMessage (WsfProcessor *aXmtrPtr, WsfPlatform *aRcvrPtr)
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 ()

Level methods.

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 mName
 The name of the condition or status whose operating level is being changed.
int mLevel
 The level to which the condition or status is being changed.
int GetLevel () const
 Get the operating level.
void SetLevel (int aLevel)
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.

Assigner methods.

WsfPlatformGetAssigner () const
size_t GetAssignerPlatformIndex () const
 Get the platform index of the assigner.
void SetAssignerPlatformIndex (size_t aIndex)
 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 aIndex)
 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.

Name methods.

WsfStringId GetName () const
 Get the name of the operating condition or status whose level is being changed.
void SetName (WsfStringId aName)
 Set the name of the operating condition or status whose level is being changed (ID form).
void SetName (const std::string &aName)
 Set the name of the operating condition or status whose level is being changed (string form).

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 'control message' is used to change the operating level of a subordinate.

This message is sent by a commander to a subordinate to change its 'operating level' with respect to a particlar 'operating condition or status'. An 'operating condition or status' can represent anything such as an alert status and the 'operating level' represents a particular level of alert.

See also
WsfTaskManager

Constructor & Destructor Documentation

◆ WsfTaskControlMessage() [1/2]

WsfTaskControlMessage::WsfTaskControlMessage ( )

◆ WsfTaskControlMessage() [2/2]

WsfTaskControlMessage::WsfTaskControlMessage ( WsfProcessor * aXmtrPtr,
WsfPlatform * aRcvrPtr )

Constructor

Parameters
aXmtrPtrThe processor that is sending the control message.
aRcvrPtrThe platform that is to receive the control message.

References GetTypeId(), mAssigneePlatformIndex, mAssigneePlatformName, mAssigneeProcessorName, mAssignerPlatformIndex, mAssignerPlatformName, mAssignerProcessorName, mLevel, mName, and WsfMessage::WsfMessage().

Member Function Documentation

◆ Clone()

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

◆ CreateScriptClass()

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

◆ GetAssignee()

WsfPlatform * WsfTaskControlMessage::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 WsfTaskControlMessage::GetAssigneePlatformIndex ( ) const
inline

Get the platform index of the assignee.

References mAssigneePlatformIndex.

Referenced by WsfTaskManager::ReceiveMessage(), and WsfXIO_AutoDisMapping::TranslateTaskControlMessage().

◆ GetAssigneePlatformName()

WsfStringId WsfTaskControlMessage::GetAssigneePlatformName ( ) const
inline

Get the name of the assignee.

References mAssigneePlatformName.

◆ GetAssigneeProcessorName()

WsfStringId WsfTaskControlMessage::GetAssigneeProcessorName ( ) const
inline

Get the name of the processor on the assignee.

References mAssigneeProcessorName.

Referenced by WsfTaskManager::ReceiveMessage().

◆ GetAssigner()

WsfPlatform * WsfTaskControlMessage::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()

size_t WsfTaskControlMessage::GetAssignerPlatformIndex ( ) const
inline

Get the platform index of the assigner.

References mAssignerPlatformIndex.

Referenced by WsfXIO_AutoDisMapping::TranslateTaskControlMessage().

◆ GetAssignerPlatformName()

WsfStringId WsfTaskControlMessage::GetAssignerPlatformName ( ) const
inline

Get the name of the assigner.

References mAssignerPlatformName.

◆ GetAssignerProcessorName()

WsfStringId WsfTaskControlMessage::GetAssignerProcessorName ( ) const
inline

Get the name of the processor on the assigner.

References mAssignerProcessorName.

◆ GetLevel()

int WsfTaskControlMessage::GetLevel ( ) const
inline

Get the operating level.

References mLevel.

Referenced by WsfTaskManager::ProcessTaskControlMessage().

◆ GetName()

WsfStringId WsfTaskControlMessage::GetName ( ) const
inline

Get the name of the operating condition or status whose level is being changed.

References mName.

Referenced by WsfTaskManager::ProcessTaskControlMessage().

◆ GetScriptClassName()

const char * WsfTaskControlMessage::GetScriptClassName ( ) const
override

◆ GetTypeId()

WsfStringId WsfTaskControlMessage::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(), WsfTaskControlMessage(), and WsfTaskControlMessage().

◆ Serialize()

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

◆ SetAssigneePlatformIndex()

void WsfTaskControlMessage::SetAssigneePlatformIndex ( size_t aIndex)
inline

Set the platform index of the assignee.

References mAssigneePlatformIndex.

Referenced by WsfXIO_AutoDisMapping::TranslateTaskControlMessage().

◆ SetAssignerPlatformIndex()

void WsfTaskControlMessage::SetAssignerPlatformIndex ( size_t aIndex)
inline

Set the platform index of the assigner.

References mAssignerPlatformIndex.

Referenced by WsfXIO_AutoDisMapping::TranslateTaskControlMessage().

◆ SetLevel()

void WsfTaskControlMessage::SetLevel ( int aLevel)
inline

References mLevel.

Referenced by WsfTaskManager::ChangeOperatingLevel().

◆ SetName() [1/2]

void WsfTaskControlMessage::SetName ( const std::string & aName)
inline

Set the name of the operating condition or status whose level is being changed (string form).

References mName.

◆ SetName() [2/2]

void WsfTaskControlMessage::SetName ( WsfStringId aName)
inline

Set the name of the operating condition or status whose level is being changed (ID form).

References mName.

Referenced by WsfTaskManager::ChangeOperatingLevel().

Member Data Documentation

◆ mAssigneePlatformIndex

size_t WsfTaskControlMessage::mAssigneePlatformIndex
protected

◆ mAssigneePlatformName

WsfStringId WsfTaskControlMessage::mAssigneePlatformName
protected

◆ mAssigneeProcessorName

WsfStringId WsfTaskControlMessage::mAssigneeProcessorName
protected

The name of the processor on the assignee.

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

◆ mAssignerPlatformIndex

size_t WsfTaskControlMessage::mAssignerPlatformIndex
protected

◆ mAssignerPlatformName

WsfStringId WsfTaskControlMessage::mAssignerPlatformName
protected

◆ mAssignerProcessorName

WsfStringId WsfTaskControlMessage::mAssignerProcessorName
protected

The name of the processor on the assigner.

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

◆ mLevel

int WsfTaskControlMessage::mLevel
protected

The level to which the condition or status is being changed.

Referenced by GetLevel(), Serialize(), SetLevel(), WsfTaskControlMessage(), and WsfTaskControlMessage().

◆ mName

WsfStringId WsfTaskControlMessage::mName
protected

The name of the condition or status whose operating level is being changed.

Referenced by GetName(), Serialize(), SetName(), SetName(), WsfTaskControlMessage(), and WsfTaskControlMessage().


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