![]() |
VR-Forces 4.2 Class Documentation
|
A DtTaskMsg is a DtRadioMsg with a pointer to a task. More...

Public Member Functions | |
| DtTaskMessage () | |
| default constructor | |
| DtTaskMessage (const DtTaskMessage &orig) | |
| virtual | ~DtTaskMessage () |
| Destructor; does not destroy task, unless it created it (copy constructor; assignment operator; or setFromNet()). | |
| virtual DtSimTask * | task () const |
| Returns a pointer to the task this message is conveying. | |
| virtual void | setTask (DtSimTask *task) |
| N.B. | |
| virtual bool | independentlyTasked () const |
| Indicates whether task issued intended to be executed independently by the recipient, or as part of an aggregate. | |
| virtual void | setIndependentlyTasked (bool yesNo) |
| virtual int | contentCategoryType () const |
| Returns the string type identifier for the message type, DtTaskMessageType (defined in taskTypes.h). | |
| virtual const DtSimTaskMessageType & | contentType () const |
| virtual DtSimMessage * | clone () const |
| Required override. | |
| virtual int | netRepSize () const |
| Overrides the base class DtVrfObjectMessage netRepSize(). | |
| virtual bool | setFromNet (const char *networkBuffer, unsigned contentSize) |
| Extracts the task type, creates the task (using the task factory), and then tells the task to fill itself in from the network buffer. | |
| virtual bool | setToNet () |
| Fill in our task type, tell the task to fill itself out, and then copy its buffer into ours. | |
| virtual void | printDataToString (DtString &str) |
| Print message. | |
| virtual void | setTaskId (int id) |
| Identifier used to associated task complete the original task message. | |
| virtual int | taskId () const |
| Identifier used to associated task complete the original task message. | |
| virtual void | setSubtaskId (int id) |
| virtual int | subtaskId () const |
| virtual void | setTaskTrackingNumber (int n) |
| This value is the same as the taskTrackingNumber passed in the original task message that started the task. | |
| virtual int | taskTrackingNumber () const |
| This value is the same as the taskTrackingNumber passed in the original task message that started the task. | |
Static Public Member Functions | |
| static DtVrfObjectMessage * | creator () |
Protected Member Functions | |
| const DtTaskMessage & | operator= (DtTaskMessage &orig) |
Protected Attributes | |
| DtSimTask * | myTask |
| bool | myOwnTask |
| bool | myIndependentlyTasked |
| int | myTaskId |
| int | myTaskTrackingNumber |
| This is a number that may be provided by the sender of the task, and is then included in the task complete message. | |
Additional Inherited Members |
A DtTaskMsg is a DtRadioMsg with a pointer to a task.
The type of the taskMsg is just the type of the task.
| DtTaskMessage::DtTaskMessage | ( | ) |
default constructor
| DtTaskMessage::DtTaskMessage | ( | const DtTaskMessage & | orig | ) |
|
virtual |
Destructor; does not destroy task, unless it created it (copy constructor; assignment operator; or setFromNet()).
|
protected |
|
virtual |
Returns a pointer to the task this message is conveying.
|
virtual |
N.B.
: This function USED TO clone the task passed as an argument. However, for performance reasons, it has been modified to just keep a pointer to the task. This means that it is the caller's responsibility to ensure that the lifetime of the task goes beyond the lifetime of the message. For example, this previously acceptable code will now FAIL:
DtSimTask* task = new DtMoveToTask; DtTaskMessage* message = new DtTaskMessage; task->setControlPtName("A Waypoint"); message->setTask(task); delete task; vrfObject()->radio()->sendToNet(message); ...
|
virtual |
Indicates whether task issued intended to be executed independently by the recipient, or as part of an aggregate.
|
virtual |
|
virtual |
Identifier used to associated task complete the original task message.
Each task gets a task ID when it starts being executed. The user should never have to set this manually.
|
virtual |
Identifier used to associated task complete the original task message.
Each task gets a task ID when it starts being executed. The user should never have to set this manually.
|
virtual |
|
virtual |
|
virtual |
This value is the same as the taskTrackingNumber passed in the original task message that started the task.
This is designed for uses such as an aggregate starting issuing tasks to a subordinate, and providing unique identifiers to the tasks so their completion can be tracked.
|
virtual |
This value is the same as the taskTrackingNumber passed in the original task message that started the task.
This is designed for uses such as an aggregate starting issuing tasks to a subordinate, and providing unique identifiers to the tasks so their completion can be tracked.
|
virtual |
Returns the string type identifier for the message type, DtTaskMessageType (defined in taskTypes.h).
If you override this class, you should override this member function to return its own unique string type.
Implements DtVrfObjectMessage.
|
virtual |
|
virtual |
Required override.
Clones itself and the task it points to. Returns a newly created copy of itself. The contents of the class are cloned from this instance, including the task it contains. Derived classes should override this member function to return a cloned copy of the derived type.
Implements DtSimMessage.
|
virtual |
Overrides the base class DtVrfObjectMessage netRepSize().
This calls down to the base class to get the size of the header created by the base, and then adds any task, set data, or report contents.
Reimplemented from DtVrfObjectMessage.
|
virtual |
Extracts the task type, creates the task (using the task factory), and then tells the task to fill itself in from the network buffer.
Reimplemented from DtVrfObjectMessage.
|
virtual |
Fill in our task type, tell the task to fill itself out, and then copy its buffer into ours.
Reimplemented from DtVrfObjectMessage.
|
virtual |
Print message.
Reimplemented from DtVrfObjectMessage.
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
This is a number that may be provided by the sender of the task, and is then included in the task complete message.