VR-Forces 4.1.1 Class Documentation
10.5 - Message Classes

Table of Contents

This section describes the following message classes and their functions:

The constants in the message classes are defined in msgTypes.h.

Note
Message objects do not have factories, because it is assumed that message creators know which message they want to send and will create it directly.

10.5.1 The DtSimMessage Class

DtSimMessage (simMsg.h) is an abstract base class that provides common functionality for DtSimInterfaceMessage and DtVrfObjectMessage. These classes are derived from DtSimMessage and implement interface messages and radio messages respectively.

10.5.2 The DtInterfaceMessageExecutive Class

DtInterfaceMessageExecutive (ifaceMsgExec.h) manages callbacks on interface messages. The member function indexType() extracts the interface message content type from a DtSimInterfaceMessage and returns it as a string.

10.5.3 The DtMessageExecutive Class

DtMessageExecutive (msgExec.h) is an abstract base class. Classes derived from DtMessageExecutive are used to manage callbacks on particular message types. For example, the radio message executive has a list of callback lists indexed by radio message type.

10.5.4 The DtAdminMessage Class

Entities use DtAdminMessage (adminMessage.h) to send administration message to each other, or to or from the GUI. These are messages that are not task, set requests, or reports, but which are used for administration of the simulation. The notify level and file logging options in the Object Console tab of the Entity Information dialog box use DtAdminMessages.

10.5.5 The DtVrfObjectMessageExecutive Class

The class DtVrfObjectMessageExecutive (vrfObjectMessageExecutive.h) is used to manage callbacks of DtVrfObjectMessages. Callbacks can be registered on specified message content types such as Move To Task, or on general message categories such as Task or Report.

10.5.6 The DtReportMessage Class

Entities use DtReportMessage (reportMsg.h) to send DtSimReports (simReport.h) to one another. The radioMessageType() for this kind of message is DtReportMessageType.

In VR-Forces, only the type DtTaskCompletedReportType of DtSimReport is implemented, however you can create your own reports by deriving from DtSimReport and implementing the clone() and type() functions. The DtTaskCompletedReportType report message is sent by DtSimLocalEntity::taskComplete() to notify either the entity's superior or the DtSimManager of task completion (depending on who issued the task in the first place).

10.5.7 The DtSetDataRequestMessage Class

Entities use DtSetDataRequestMessage (setDtaRqMsg.h) send DtSetDataRequests (setDataReq.h) to one another. The radioMessageType() for this kind of message is DtSetDataRequestMessageType. Classes derived from DtSetDataRequest are used to implement the messages for setting parameters, such as location.

DtSetDataRequestMessages are sent to entities:

10.5.8 The DtSimInterfaceMessage Class

Use DtSimInterfaceMessage (ifaceMsg.h) to send an interface message. It derives from a standard DtSimMessage, and returns DtInterfaceMessageType as its messageType(). It contains a pointer to a DtSimInterfaceContent (analogous to the DtTask in a DtTaskMessage).

Derived kinds of DtSimInterfaceContent can be categorized as follows:

The Remote Control API uses many of these messages to communicate with VR-Forces applications. Exchanging these messages happens transparently within the implementation of the Remote Control API. If you use the Remote Control API, you do not necessarily need to concern yourself with the specific messages to control remote VR-Forces applications. However, if you want to modify or extend the remote control API, you may need to know about some of the underlying messages.

10.5.9 The DtVrfObjectMessage Class

Messages sent to and from entities are sent using a DtVrfObjectMessage. VR-Forces implements four types of VRF Object Messages:

The DtVrfObjectMessage class contains the addressing information for a message between entities in the form of the name of the sending entity and the name of the receiver. If the receiver is specified to be "DtBroadcast" the message is considered to be addressed to any entity. Message subclasses contain the actual data of the message.

10.5.10 The DtTaskMessage Class

Entities use DtTaskMessage (taskMsg.h) to send DtSimTasks (simTask.h) to one another. The radioMessageType() for this kind of message is DtTaskMessageType. Classes derived from DtSimTask are used to implement task messages, for example, Move To.

DtTaskMessages are sent to entities:

[<< Creating New Interface Content] [Home] [Top of Page]


Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)