VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Attributes
DtTaskCompleteReport Class Reference

DtTaskCompleteReport represents a report from an entity that it has completed the last task assigned to it. More...

Inheritance diagram for DtTaskCompleteReport:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtTaskCompleteReport ()
 default constructor
 DtTaskCompleteReport (const DtString &writeName, DtReaderWriterRegistry *parentRegistry=0)
 constructor If you have a task 'put' itself, the writeName will preface the task.
 DtTaskCompleteReport (const DtString &writeName, const DtTaskCompleteReport &orig, DtReaderWriterRegistry *parentRegistry=0)
 copy constructor
const DtTaskCompleteReportoperator= (const DtTaskCompleteReport &orig)
 assignment operator
virtual ~DtTaskCompleteReport ()
virtual int type () const
 What kind of report am I? Returns a character string representing the kind of report.
virtual int taskCompleted () const
 The string name of the task (task type) completed by the entity.
virtual void setTaskCompleted (int taskCompleted)
virtual DtSimReportclone (const DtString &name, DtReaderWriterRegistry *parentRegistry=0) const
 Creates a copy of this report.
virtual int netRepSize () const
virtual bool setFromNet (const char *contentBuffer, unsigned contentSize)
virtual bool setToNet ()
virtual DtString stringRep () const
virtual void setTaskId (int id)
 Identifier used to associate task complete report with a particular DtSimTask.
virtual int taskId () const
 Identifier used to associate task complete report with a particular DtSimTask.
virtual void setSubtaskId (int id)
virtual int subtaskId () const
virtual void setSuccess (bool b)
 Indicates whether the task was completed successfully or not.
virtual bool success () const
 Indicates whether the task was completed successfully or not.

Static Public Member Functions

static DtSimReportcreator ()

Protected Attributes

DtRwInt myTaskCompleted
DtRwInt myTaskId
DtRwBoolean mySuccess

Detailed Description

DtTaskCompleteReport represents a report from an entity that it has completed the last task assigned to it.

The task name is part of the report. Task Complete reports are generated and sent automatically. Local entities have a taskComplete() member function, in which a DtTaskCompleteReport message gets created and sent to the sender of the task. For a retask operation sent by a user from the GUI, the task complete report gets sent to the Simulation Manager. If the task was originally issued by the entity’s superior, then the Task Complete report gets sent to the superior. It places the report (addressed to the entity’s superior) on the entity’s radio net. The DtSimLocalEntity::taskComplete() member function gets called by the task controller that is handling the task in the DtTaskControllerComponent::taskComplete() member function. In derived task controllers, you should make sure you call the taskComplete() member function when you are finished performing the task. This ensures that a DtTaskCompleteReport gets created and sent to the sender of the task.

task-type: DtTaskCompletedReportType

parameters: task completed - The integer of the task (task type) completed by the entity. See radioMsgTypes.h for a list all task types.


Constructor & Destructor Documentation

default constructor

DtTaskCompleteReport::DtTaskCompleteReport ( const DtString writeName,
DtReaderWriterRegistry parentRegistry = 0 
)

constructor If you have a task 'put' itself, the writeName will preface the task.

DtTaskCompleteReport::DtTaskCompleteReport ( const DtString writeName,
const DtTaskCompleteReport orig,
DtReaderWriterRegistry parentRegistry = 0 
)

copy constructor


Member Function Documentation

const DtTaskCompleteReport& DtTaskCompleteReport::operator= ( const DtTaskCompleteReport orig)

assignment operator

virtual int DtTaskCompleteReport::type ( ) const [virtual]

What kind of report am I? Returns a character string representing the kind of report.

Derived classes must implement this function, returning a string that uniquely represents the kind of report it is. The definitions for report types used in VR-Forces are in radioMsgTypes.h.

Implements DtSimReport.

virtual int DtTaskCompleteReport::taskCompleted ( ) const [virtual]

The string name of the task (task type) completed by the entity.

See taskTypes.h for a list all task types.

virtual void DtTaskCompleteReport::setTaskCompleted ( int  taskCompleted) [virtual]
virtual void DtTaskCompleteReport::setTaskId ( int  id) [virtual]

Identifier used to associate task complete report with a particular DtSimTask.

virtual int DtTaskCompleteReport::taskId ( ) const [virtual]

Identifier used to associate task complete report with a particular DtSimTask.

virtual void DtTaskCompleteReport::setSubtaskId ( int  id) [virtual]
Deprecated:
As of VRF 3.12. Use setTaskId() and taskId() instead.
virtual int DtTaskCompleteReport::subtaskId ( ) const [virtual]
Deprecated:
As of VRF 3.12. Use setTaskId() and taskId() instead.
virtual void DtTaskCompleteReport::setSuccess ( bool  b) [virtual]

Indicates whether the task was completed successfully or not.

A task complete report with success being false indicates that the task has failed and is no longer being processed.

Note:
Defaults to True.
virtual bool DtTaskCompleteReport::success ( ) const [virtual]

Indicates whether the task was completed successfully or not.

A task complete report with success being false indicates that the task has failed and is no longer being processed.

Note:
Defaults to True.
virtual DtSimReport* DtTaskCompleteReport::clone ( const DtString name,
DtReaderWriterRegistry parentRegistry = 0 
) const [virtual]

Creates a copy of this report.

Implements DtSimReport.

virtual int DtTaskCompleteReport::netRepSize ( ) const [virtual]

Implements DtSimReport.

virtual bool DtTaskCompleteReport::setFromNet ( const char *  contentBuffer,
unsigned  contentSize 
) [virtual]

Implements DtSimReport.

virtual bool DtTaskCompleteReport::setToNet ( ) [virtual]

Implements DtSimReport.

virtual DtString DtTaskCompleteReport::stringRep ( ) const [virtual]

Reimplemented from DtSimReport.


Member Data Documentation


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)