VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | 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]

Public Member Functions

 DtSetDataRequestMessage ()
 default constructor More...
 
 DtSetDataRequestMessage (const DtSetDataRequestMessage &orig)
 
virtual ~DtSetDataRequestMessage ()
 destructor More...
 
virtual DtSetDataRequestsetDataRequest () const
 Returns a pointer to the DtSetDataRequest object in the message. More...
 
virtual void setSetDataRequest (DtSetDataRequest *request)
 N.B. More...
 
virtual int contentCategoryType () const
 The radioMessageType() for this kind of message is “set-data-request” (DtSetDataRequestMessageType). More...
 
virtual const DtSetMessageTypecontentType () const
 
virtual DtSimMessageclone () const
 Required override. Clones itself and the setDataRequest it points to. More...
 
virtual int netRepSize () const
 Overrides the base class DtVrfObjectMessage netRepSize(). More...
 
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. More...
 
virtual bool setToNet ()
 Fill in our task type, tell the task to fill itself out, and then copy its buffer into ours. More...
 
virtual void printDataToString (DtString &str)
 Print message. More...
 
- Public Member Functions inherited from DtVrfObjectMessage
 DtVrfObjectMessage ()
 default constructor More...
 
 DtVrfObjectMessage (const DtVrfObjectMessage &orig)
 copy constructor: shallow; copies values only. More...
 
const DtVrfObjectMessageoperator= (const DtVrfObjectMessage &orig)
 assignment operator: shallow; assigns values only. More...
 
virtual ~DtVrfObjectMessage ()
 destructor More...
 
virtual int messageType () const
 
virtual int radioMessageType () const
 
virtual charnetRep ()
 Returns a pointer to the simulation network representation of this message. More...
 
virtual int scenarioRunId () const
 If used, the scenario run id of the scenario that sent this message. More...
 
virtual void setScenarioRunId (int)
 
virtual void setReceiver (const DtUUID &receiver)
 Note that sending/receiving by echelon id is no longer supported. More...
 
virtual const DtUUIDreceiver () const
 
virtual void setRecipient (const DtUUID &receiver)
 
virtual const DtUUIDrecipient () const
 
virtual void setTransmitter (const DtUUID &transmitter)
 Note that sending/receiving by echelon id is no longer supported. More...
 
virtual const DtUUIDtransmitter () const
 
virtual void setSender (const DtUUID &transmitter)
 
virtual const DtUUIDsender () const
 
- Public Member Functions inherited from DtSimMessage
 DtSimMessage ()
 default constructor More...
 
 DtSimMessage (const DtSimMessage &orig)
 copy constructor More...
 
const DtSimMessageoperator= (const DtSimMessage &orig)
 assignment operator More...
 
virtual ~DtSimMessage ()
 destructor More...
 
virtual std::string debugText () const
 Leak detector output. More...
 

Static Public Member Functions

static DtVrfObjectMessagecreator ()
 
- Static Public Member Functions inherited from DtVrfObjectMessage
static DtVrfObjectMessagecreateVrfObjectMessage (int type)
 Creates a new DtVrfObjectMessage subclass using the static factory. More...
 
static DtVrfObjectMessagecreateRadioMessage (int type)
 
static void addVrfObjectMessageCreatorFcn (int type, DtVrfObjectMessageCreatorFcn fcn)
 Adds a new creator function to the DtVrfObjectMessageFactory. More...
 
static void addRadioMessageCreatorFcn (int type, DtVrfObjectMessageCreatorFcn fcn)
 
static void setFactory (DtVrfObjectMessageFactory *factory)
 
static DtVrfObjectMessageFactoryfactory ()
 
- Static Public Member Functions inherited from DtObjectDebugger< DtSimMessage >
static DtObjectCounter::CounterType ObjectCount ()
 
static const DtObjectContainer * ObjectContainer ()
 

Protected Member Functions

const DtSetDataRequestMessageoperator= (DtSetDataRequestMessage &orig)
 
- Protected Member Functions inherited from DtVrfObjectMessage
virtual charcreateNetworkBuffer ()
 
- Protected Member Functions inherited from DtObjectDebugger< DtSimMessage >
 DtObjectDebugger ()
 
 DtObjectDebugger (const DtObjectDebugger &)
 
 ~DtObjectDebugger ()
 

Protected Attributes

DtSetDataRequestmySetDataRequest
 
bool myOwnSetDataRequest
 
- Protected Attributes inherited from DtVrfObjectMessage
DtUUID myTransmitter
 
DtUUID myReceiver
 
charmyNetRep
 
int myScenarioRunId
 

Additional Inherited Members

- Static Protected Attributes inherited from DtVrfObjectMessage
static DtVrfObjectMessageFactorymyFactory
 

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

DtSetDataRequestMessage::DtSetDataRequestMessage ( )

default constructor

DtSetDataRequestMessage::DtSetDataRequestMessage ( const DtSetDataRequestMessage orig)
virtual DtSetDataRequestMessage::~DtSetDataRequestMessage ( )
virtual

destructor

Member Function Documentation

const DtSetDataRequestMessage& DtSetDataRequestMessage::operator= ( DtSetDataRequestMessage orig)
protected
virtual DtSetDataRequest* DtSetDataRequestMessage::setDataRequest ( ) const
virtual

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 const DtSetMessageType& DtSetDataRequestMessage::contentType ( ) const
virtual
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 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 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.

static DtVrfObjectMessage* DtSetDataRequestMessage::creator ( )
static

Member Data Documentation

DtSetDataRequest* DtSetDataRequestMessage::mySetDataRequest
protected
bool DtSetDataRequestMessage::myOwnSetDataRequest
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)