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

A DtSetDataRequestMessage is a DtRadioMsg with a pointer to a setDataRequest. More...

Inheritance diagram for DtSetDataRequestMessage:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtSetDataRequestMessage ()
 default constructor
 DtSetDataRequestMessage (const DtSetDataRequestMessage &orig)
virtual ~DtSetDataRequestMessage ()
 destructor
virtual DtSetDataRequestsetDataRequest () const
 Returns a pointer to the DtSetDataRequest object in the message.
virtual void setSetDataRequest (DtSetDataRequest *request)
 N.B.
virtual int contentCategoryType () const
 The radioMessageType() for this kind of message is “set-data-request” (DtSetDataRequestMessageType).
virtual int contentType () const
virtual DtSimMessageclone () const
 Required override. Clones itself and the setDataRequest it points to.
virtual int netRepSize () const
 Overrides the base class DtSimRadioMessage 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.

Static Public Member Functions

static DtSimRadioMessagecreator ()

Protected Member Functions

const DtSetDataRequestMessageoperator= (DtSetDataRequestMessage &orig)

Protected Attributes

DtSetDataRequestmySetDataRequest
bool myOwnSetDataRequest

Detailed Description

A DtSetDataRequestMessage is a DtRadioMsg with a pointer to a setDataRequest.

The type of the DtSetDataRequestMessage is just the type of the setDataRequest. Classes derived from DtSetDataRequest are used to implement the messages for setting parameters, such as location. DtSetDataRequestMessages are sent to entities by their superiors, by Set statements in a DtPlan, and by the user from the GUI.


Constructor & Destructor Documentation

default constructor

destructor


Member Function Documentation

const DtSetDataRequestMessage& DtSetDataRequestMessage::operator= ( DtSetDataRequestMessage orig) [protected]

Returns a pointer to the DtSetDataRequest object in the message.

virtual void DtSetDataRequestMessage::setSetDataRequest ( DtSetDataRequest request) [virtual]

N.B.

: This function USED TO clone the request passed as an argument. However, for performance reasons, it has been modified to just keep a pointer to the request. This means that it is the caller's responsibility to ensure that the lifetime of the request goes beyond the lifetime of the message. For example, this previously acceptable code will now FAIL:

DtSetDataRequest* request = new DtSetHeadingRequest; DtSetDataRequestMessage* message = new DtSetDataRequestMessage; request->setHeading(0.); message->setSetDataRequest(request); delete request; vrfObject()->radio()->sendToNet(message); ...

virtual int DtSetDataRequestMessage::contentCategoryType ( ) const [virtual]

The radioMessageType() for this kind of message is “set-data-request” (DtSetDataRequestMessageType).

Implements DtVrfObjectMessage.

virtual int DtSetDataRequestMessage::contentType ( ) const [virtual]
Returns:
The content type of this message. This is the type of the task, report, set data etc. that is contained in this message.

Implements DtVrfObjectMessage.

virtual DtSimMessage* DtSetDataRequestMessage::clone ( ) const [virtual]

Required override. Clones itself and the setDataRequest it points to.

Implements DtSimMessage.

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

Overrides the base class DtSimRadioMessage 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 bool DtSetDataRequestMessage::setFromNet ( const char *  networkBuffer,
unsigned  contentSize 
) [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 bool DtSetDataRequestMessage::setToNet ( ) [virtual]

Fill in our task type, tell the task to fill itself out, and then copy its buffer into ours.

Reimplemented from DtVrfObjectMessage.

virtual void DtSetDataRequestMessage::printDataToString ( DtString str) [virtual]

Print message.

Reimplemented from DtVrfObjectMessage.


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)