WSF
WsfTask Class Reference

A class that defines a task to be performed. More...

#include <WsfTask.hpp>

Inheritance diagram for WsfTask:
Collaboration diagram for WsfTask:

Public Member Functions

 WsfTask ()
 WsfTask (const WsfTask &aSrc)
 WsfTask (const WsfTaskResource &aTaskResource)
WsfTaskoperator= (const WsfTask &aRhs)
 ~WsfTask () override=default
bool operator== (const WsfTask &aRhs) const
bool operator!= (const WsfTask &aRhs) const
const char * GetScriptClassName () const override
void Initialize (double aSimTime, unsigned long aTaskId, WsfProcessor *aAssignerPtr)
unsigned int GetTaskId () const
 Return the task ID assigned to the task.
const WsfTrackIdGetTrackId () const
void SetTrackId (const WsfTrackId &aTrackId)
const WsfTrackIdGetLocalTrackId () const
void SetLocalTrackId (const WsfTrackId &aLocalTrackId)
WsfStringId GetTaskType () const
void SetTaskType (WsfStringId aTaskType)
WsfStringId GetTargetName () const
void SetTargetName (WsfStringId aTargetName)
 Set the name of the target.
Public Member Functions inherited from WsfTaskData
 WsfTaskData ()
 WsfTaskData (const WsfTaskData &aSrc)
 WsfTaskData (const WsfTaskResource &aTaskResource)
WsfTaskDataoperator= (const WsfTaskData &aRhs)
virtual ~WsfTaskData ()
template<typename T>
void SerializeP (T &aBuff)
 For XIO (de)serialization.
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 void RegisterScriptTypes (UtScriptTypes *aScriptTypesPtr)

Assigner methods.

void SetAssigner (const WsfTask &aTask)
WsfStringId GetAssignerPlatformName () const
size_t GetAssignerPlatformIndex () const
WsfStringId GetAssignerProcessorName () const

Assignee methods.

void SetAssignee (WsfPlatform *aAssigneePtr)
WsfStringId GetAssigneePlatformName () const
size_t GetAssigneePlatformIndex () const
WsfStringId GetAssigneeProcessorName () const
void SetAssigneeProcessorName (WsfStringId aAssigneeProcessorName)

Resource methods.

WsfTaskResourceGetResource ()
const WsfTaskResourceGetResource () const
void SetResource (const WsfTaskResource &aResource)
WsfStringId GetResourceName () const
void SetResourceName (WsfStringId aResourceName)
int GetResourceType () const
bool IsResourceTypeOf (const int aResourceType) const
WsfStringId GetResourceMode () const
void SetResourceMode (WsfStringId aResourceMode)

Communications methods.

For an inter-platform assignment, this is the local name over which task messages are sent. For an intra-platform assignment, this is the name of the assigning processor.

WsfStringId GetCommName () const
void SetCommName (WsfStringId aCommName)

Update time methods.

Set or get the time when a status report was last sent.

void SetUpdateTime (double aUpdateTime)
double GetUpdateTime () const

Assignment time methods

Set or get the time when the task was assigned.

void SetAssignTime (double aAssignTime)
double GetAssignTime () const

Status methods

Set or get the task status string id.

void SetStatus (WsfStringId aStatusId)
WsfStringId GetStatus () const

SubStatus methods

Set or get the task status string id.

void SetSubStatus (WsfStringId aSubStatusId)
WsfStringId GetSubStatus () const

Object methods.

These methods are used to keep track of objects associated with this track.

int GetObjectsPending () const
 Return the number of objects that have been assigned but not yet in operation.
void SetObjectsPending (int aObjectsPending)
 Set the number of objects that have been assigned but not yet in operation.
void SetAssignerPlatformIndex (size_t aIndex)
void SetAssigneePlatformIndex (size_t aIndex)

Additional Inherited Members

Public Attributes inherited from WsfTaskData
unsigned int mTaskId
 The serial number of the task.
WsfTrackId mTrackId
WsfTrackId mLocalTrackId
WsfStringId mTaskType
 The task type (string ID).
WsfStringId mTargetName
 The name of the target (string ID) IF it is known.
WsfStringId mAssignerPlatformName
 The name of the assigning platform (string ID).
size_t mAssignerPlatformIndex
 The platform index of the assigning platform.
WsfStringId mAssignerProcessorName
 The name of the processor on the assigning platform (string ID).
WsfStringId mAssigneePlatformName
 The name of the assigned platform (string ID).
size_t mAssigneePlatformIndex
 The platform index of the assigned platform.
WsfStringId mAssigneeProcessorName
 The name of the processor on the assigned platform (string ID).
WsfTaskResourcemResourcePtr
 Attributes of the assigned resource.
WsfStringId mCommName
double mAssignTime
 The simulation time when the assignment was made.
double mUpdateTime
 The simulation time when an update was last sent or received.
int mObjectsPending
 The number of objects that are pending (requested but not yet in operation).
WsfStringId mTaskStatus
 Task status.
WsfStringId mTaskSubStatus
 Task sub status reported by assignee. (User Defined).
Static Public Attributes inherited from WsfAuxDataEnabled
static UtCallbackListN< void(const WsfAuxDataEnabled *)> AuxDataAccessed
static UtCallbackListN< void(const WsfAuxDataEnabled *)> AuxDataDestroyed

Detailed Description

A class that defines a task to be performed.

Constructor & Destructor Documentation

◆ WsfTask() [1/3]

◆ WsfTask() [2/3]

WsfTask::WsfTask ( const WsfTask & aSrc)
inline

◆ WsfTask() [3/3]

WsfTask::WsfTask ( const WsfTaskResource & aTaskResource)
inline

◆ ~WsfTask()

WsfTask::~WsfTask ( )
overridedefault

Member Function Documentation

◆ GetAssigneePlatformIndex()

◆ GetAssigneePlatformName()

◆ GetAssigneeProcessorName()

WsfStringId WsfTask::GetAssigneeProcessorName ( ) const
inline

◆ GetAssignerPlatformIndex()

◆ GetAssignerPlatformName()

WsfStringId WsfTask::GetAssignerPlatformName ( ) const
inline

◆ GetAssignerProcessorName()

◆ GetAssignTime()

double WsfTask::GetAssignTime ( ) const
inline

◆ GetCommName()

◆ GetLocalTrackId()

◆ GetObjectsPending()

int WsfTask::GetObjectsPending ( ) const
inline

Return the number of objects that have been assigned but not yet in operation.

References WsfTaskData::mObjectsPending.

◆ GetResource() [1/2]

◆ GetResource() [2/2]

const WsfTaskResource & WsfTask::GetResource ( ) const
inline

◆ GetResourceMode()

WsfStringId WsfTask::GetResourceMode ( ) const
inline

◆ GetResourceName()

◆ GetResourceType()

◆ GetScriptClassName()

const char * WsfTask::GetScriptClassName ( ) const
inlineoverride

◆ GetStatus()

WsfStringId WsfTask::GetStatus ( ) const
inline

◆ GetSubStatus()

WsfStringId WsfTask::GetSubStatus ( ) const
inline

◆ GetTargetName()

◆ GetTaskId()

◆ GetTaskType()

◆ GetTrackId()

◆ GetUpdateTime()

double WsfTask::GetUpdateTime ( ) const
inline

◆ Initialize()

◆ IsResourceTypeOf()

◆ operator!=()

bool WsfTask::operator!= ( const WsfTask & aRhs) const
inline

References operator==(), and WsfTask().

◆ operator=()

WsfTask & WsfTask::operator= ( const WsfTask & aRhs)
inline

◆ operator==()

bool WsfTask::operator== ( const WsfTask & aRhs) const
inline

◆ RegisterScriptTypes()

void WsfTask::RegisterScriptTypes ( UtScriptTypes * aScriptTypesPtr)
static

Register the types ('class' objects) for the scripting systems.

This is invoked once by WsfScriptManager to create the 'class' objects that are implemented by this file.

Referenced by WsfScriptManager::RegisterTypes().

◆ SetAssignee()

◆ SetAssigneePlatformIndex()

◆ SetAssigneeProcessorName()

void WsfTask::SetAssigneeProcessorName ( WsfStringId aAssigneeProcessorName)
inline

◆ SetAssigner()

void WsfTask::SetAssigner ( const WsfTask & aTask)

Copy the assigner from another task. This is used to transfer an assignment.

References WsfTaskData::mAssignerPlatformIndex, WsfTaskData::mAssignerPlatformName, WsfTaskData::mAssignerProcessorName, and WsfTask().

◆ SetAssignerPlatformIndex()

◆ SetAssignTime()

void WsfTask::SetAssignTime ( double aAssignTime)
inline

◆ SetCommName()

◆ SetLocalTrackId()

◆ SetObjectsPending()

void WsfTask::SetObjectsPending ( int aObjectsPending)
inline

Set the number of objects that have been assigned but not yet in operation.

References WsfTaskData::mObjectsPending.

Referenced by WsfWeaponTaskManager::AcquireResource().

◆ SetResource()

void WsfTask::SetResource ( const WsfTaskResource & aResource)

◆ SetResourceMode()

void WsfTask::SetResourceMode ( WsfStringId aResourceMode)
inline

References GetResource().

◆ SetResourceName()

void WsfTask::SetResourceName ( WsfStringId aResourceName)
inline

◆ SetStatus()

◆ SetSubStatus()

◆ SetTargetName()

void WsfTask::SetTargetName ( WsfStringId aTargetName)
inline

Set the name of the target.

References WsfTaskData::mTargetName.

Referenced by WsfTaskManager::AssignTask(), and WsfQuantumTask::WsfQuantumTask().

◆ SetTaskType()

◆ SetTrackId()

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

◆ SetUpdateTime()

void WsfTask::SetUpdateTime ( double aUpdateTime)
inline

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