WSF
WsfControlMessage Class Reference

#include <WsfControlMessage.hpp>

Inheritance diagram for WsfControlMessage:
Collaboration diagram for WsfControlMessage:

Public Member Functions

 WsfControlMessage ()
 Constructor, for XIO (de)serialization.
 WsfControlMessage (WsfPlatform *aPlatformPtr)
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 ()

Route methods.

A message may or may not have an associated route.

WsfTrackId mRequestId
WsfStringId mResourceId
 String ID of the resource.
WsfTrack mTrack
 The associated track.
WsfRoute mRoute
 The associated route.
const WsfRouteGetRoute () const
 Return the route (const form).
WsfRouteGetRoute ()
 Return the route (non-const form).
void SetRoute (const WsfRoute &aRoute)
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.
 WsfControlMessage (const WsfControlMessage &aSrc)
 Copy constructor.
WsfControlMessageoperator= (const WsfControlMessage &aRhs)

Message function methods.

The message function is a string ID that represents the function (or command) that is to be performed. The functions and their interpretation are defined by convention.

WsfStringId GetFunction () const
 Get the function (string form).
void SetFunction (WsfStringId aFunction)
 Set the function (string form).

Request ID methods.

A command typically has an associated request ID. These methods are concerned with the identifier of the request.

const WsfTrackIdGetRequestId () const
 Get the request ID to which the status applies.
void SetRequestId (const WsfTrackId &aRequestId)
 Set the request ID to which the status applies.

Resource methods.

A command may have an associated resource (sensor, etc.). The resource is a string ID of the required resource.

WsfStringId GetResourceId () const
std::string GetResource () const
 Get the resource (string form).
void SetResourceId (WsfStringId aResourceId)
 Set the resource (string ID form).
void SetResource (const std::string &aResource)
 Set the resource (string form).

Track methods.

A message may or may not have an associated track. The track may represent a target to be attacked, a sensor cue, etc.

const WsfTrackGetTrack () const
 Return the track (const form).
WsfTrackGetTrack ()
 Return the track (non-const form).
void SetTrack (const WsfTrack &aTrack)

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' provides the ability for a platform to direct another platform.

The 'control message' provides the ability of a platform to direct another platform (i.e.: issue an order for change-route, return-home, refuel, etc).

Constructor & Destructor Documentation

◆ WsfControlMessage() [1/3]

WsfControlMessage::WsfControlMessage ( )

Constructor, for XIO (de)serialization.

References GetTypeId(), mRequestId, mResourceId, mRoute, mTrack, and WsfMessage::WsfMessage().

Referenced by Clone(), operator=(), and WsfControlMessage().

◆ WsfControlMessage() [2/3]

WsfControlMessage::WsfControlMessage ( WsfPlatform * aPlatformPtr)

Constructor (create a control message)

Parameters
aPlatformPtrThe originator of the message.

References GetTypeId(), mRequestId, mResourceId, mRoute, mTrack, and WsfMessage::WsfMessage().

◆ WsfControlMessage() [3/3]

WsfControlMessage::WsfControlMessage ( const WsfControlMessage & aSrc)
protected

Member Function Documentation

◆ Clone()

WsfMessage * WsfControlMessage::Clone ( ) const
overridevirtual

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

◆ CreateScriptClass()

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

◆ GetFunction()

WsfStringId WsfControlMessage::GetFunction ( ) const

Get the function (string form).

References WsfMessage::GetSubType().

◆ GetRequestId()

const WsfTrackId & WsfControlMessage::GetRequestId ( ) const
inline

Get the request ID to which the status applies.

References mRequestId.

◆ GetResource()

std::string WsfControlMessage::GetResource ( ) const

Get the resource (string form).

References mResourceId.

◆ GetResourceId()

WsfStringId WsfControlMessage::GetResourceId ( ) const
inline

Get the resource (string ID form).

Returns
The string ID of the resource. The value will be 0 if no resource was supplied.

References mResourceId.

◆ GetRoute() [1/2]

WsfRoute & WsfControlMessage::GetRoute ( )
inline

Return the route (non-const form).

References mRoute.

◆ GetRoute() [2/2]

const WsfRoute & WsfControlMessage::GetRoute ( ) const
inline

Return the route (const form).

References mRoute.

◆ GetScriptClassName()

const char * WsfControlMessage::GetScriptClassName ( ) const
override

◆ GetTrack() [1/2]

WsfTrack & WsfControlMessage::GetTrack ( )
inline

Return the track (non-const form).

References mTrack.

◆ GetTrack() [2/2]

const WsfTrack & WsfControlMessage::GetTrack ( ) const
inline

Return the track (const form).

References mTrack.

◆ GetTypeId()

WsfStringId WsfControlMessage::GetTypeId ( )
static

Get the type ID associated with this message.

Returns
The string ID of this message.

Referenced by WsfXIO_MessageService::HandleMessage(), WsfControlMessage(), and WsfControlMessage().

◆ operator=()

WsfControlMessage & WsfControlMessage::operator= ( const WsfControlMessage & aRhs)
protected

◆ Serialize()

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

For XIO (de)serialization.

References mRequestId, mResourceId, mRoute, mTrack, and WsfMessage::Serialize().

◆ SetFunction()

void WsfControlMessage::SetFunction ( WsfStringId aFunction)

Set the function (string form).

References WsfMessage::SetSubType().

◆ SetRequestId()

void WsfControlMessage::SetRequestId ( const WsfTrackId & aRequestId)
inline

Set the request ID to which the status applies.

References mRequestId.

◆ SetResource()

void WsfControlMessage::SetResource ( const std::string & aResource)

Set the resource (string form).

References mResourceId.

◆ SetResourceId()

void WsfControlMessage::SetResourceId ( WsfStringId aResourceId)
inline

Set the resource (string ID form).

References mResourceId.

◆ SetRoute()

void WsfControlMessage::SetRoute ( const WsfRoute & aRoute)

Set the route.

A command may or may not have an associate route.

Parameters
aRouteThe route to be associated with the command.

References mRoute.

◆ SetTrack()

void WsfControlMessage::SetTrack ( const WsfTrack & aTrack)

Set the track to be associated with the message.

A command may or may not have an associated track.

Parameters
aTrackThe associated track.

References mTrack.

Member Data Documentation

◆ mRequestId

◆ mResourceId

WsfStringId WsfControlMessage::mResourceId
protected

◆ mRoute

WsfRoute WsfControlMessage::mRoute
protected

◆ mTrack

WsfTrack WsfControlMessage::mTrack
protected

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