VR-Forces 4.10 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 Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes
DtSimpleRadioCommModel Class Reference

An implementation of DtCommModel that models a simple radio model, using signal interaction as the network transport type. More...

Inheritance diagram for DtSimpleRadioCommModel:
Inheritance graph
[legend]

Public Member Functions

virtual ~DtSimpleRadioCommModel ()
 
virtual DtString type () const
 
virtual void registerRadio (DtVrfRadio *radio)
 Overridden from base to set the ReadyToSend status of the radio to true as soon as it registers. More...
 
virtual void sendMessage (DtVrfObjectMessage *message, DtVrfRadio *sendingRadio)
 Uses the transporter to send the message to the network. More...
 
- Public Member Functions inherited from DtCommModel
virtual ~DtCommModel ()
 
virtual void unregisterRadio (DtVrfRadio *radio)
 Removes a radio from the comm model. More...
 
virtual bool publishTransmitters () const
 Returns true if radios registered to this comm model should publish transmitters. More...
 

Static Public Member Functions

static DtCommModelcreate (DtCommModelCreationParams &params)
 Static creator function that can be registered with factories. More...
 
- Static Public Member Functions inherited from DtCommModel
static DtCommModelcreate (DtCommModelCreationParams &params)
 Static creator function that can be registered with factories. More...
 
static void setFactory (DtCommModelFactory *factory)
 Sets the static factory to the specified radio network factory. More...
 
static DtCommModelcreateCommModel (const DtString &typeString, DtSimManager *simManager, const DtCommModelDescriptor *descriptor)
 Uses the static factory to create a new DtCommModel subclass and returns it. More...
 

Protected Types

enum  ConnectionMode { ConnectionModeAll = 0, ConnectionModeAggregate = 1, ConnectionModeForce = 2 }
 
typedef std::deque
< DtVrfObjectMessageConstPtr
DtMessageQueue
 
- Protected Types inherited from DtCommModel
typedef std::multimap< DtUUID,
DtVrfRadio * > 
DtRadioMap
 

Protected Member Functions

 DtSimpleRadioCommModel (DtCommModelCreationParams &params)
 Use the create() method instead of calling the constructor. More...
 
virtual bool init ()
 Virtual init() called from the create() method. More...
 
virtual void tick ()
 Delivers any queued messages. More...
 
virtual void clearPendingRadioMessages ()
 Called to clear any pending radio messages in the comm model map that are waiting to be sent. More...
 
virtual
DtSignalMessageTransporter
createTransporter ()
 Creates and returns the transporter subclass that will be used for this DtSimpleRadioCommModel. More...
 
virtual bool checkRadioConnectivity (const DtVrfObject *sender, const DtVrfObject *receiver)
 Checks the connectivity of the radios for delivery of message. More...
 
virtual void deliverMessageToRecipients (const DtVrfObjectMessage *message)
 Overridden from base class to call checkRadioConnectivity() for each possible receiver of the message before delivering it. More...
 
virtual void processMessageReceived (DtSignalMessageTransporterCallbackParams *params)
 
- Protected Member Functions inherited from DtCommModel
 DtCommModel (DtCommModelCreationParams &params)
 Use the create() method instead of calling the constructor. More...
 
virtual DtVrfRadiofindRadio (const DtUUID &object, int radioId) const
 Finds a radio registered with this comm model by object UUID and radio ID. More...
 
virtual DtVrfRadiofindRadio (const DtEntityIdentifier &entityId, int radioId) const
 Finds a radio registered with this comm model by entity ID and radio ID. More...
 

Static Protected Member Functions

static void messageReceivedCallback (DtSignalMessageTransporterCallbackParams *params, void *usr)
 

Protected Attributes

DtSignalMessageTransportermyTransporter
 
DtMessageQueue myMessagesToDeliver
 
const
DtSimpleRadioCommModelDescriptor
mySimpleCommDescriptor
 
ConnectionMode myConnectionMode
 
- Protected Attributes inherited from DtCommModel
DtSimManagermySimManager
 
const DtCommModelDescriptormyDescriptor
 
DtRadioMap myRadios
 

Private Member Functions

 DtSimpleRadioCommModel ()
 Not implemented. More...
 
 DtSimpleRadioCommModel (const DtSimpleRadioCommModel &orig)
 
DtSimpleRadioCommModeloperator= (const DtSimpleRadioCommModel &orig)
 

Additional Inherited Members

- Static Protected Attributes inherited from DtCommModel
static DtCommModelFactorytheFactory
 

Detailed Description

An implementation of DtCommModel that models a simple radio model, using signal interaction as the network transport type.

Messages sent using this radio model are received immediately by the receiver entities. Radios connected to this comm model are always ready to send, as this model never blocks sending of messages.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
ConnectionModeAll 
ConnectionModeAggregate 
ConnectionModeForce 

Constructor & Destructor Documentation

DtSimpleRadioCommModel::DtSimpleRadioCommModel ( )
private

Not implemented.

DtSimpleRadioCommModel::DtSimpleRadioCommModel ( const DtSimpleRadioCommModel orig)
private
DtSimpleRadioCommModel::DtSimpleRadioCommModel ( DtCommModelCreationParams params)
protected

Use the create() method instead of calling the constructor.

virtual DtSimpleRadioCommModel::~DtSimpleRadioCommModel ( )
virtual

Member Function Documentation

DtSimpleRadioCommModel& DtSimpleRadioCommModel::operator= ( const DtSimpleRadioCommModel orig)
private
virtual bool DtSimpleRadioCommModel::init ( )
protectedvirtual

Virtual init() called from the create() method.

Calls createTransporter() to set myTransporter.

Reimplemented from DtCommModel.

Reimplemented in MyCommModel.

virtual void DtSimpleRadioCommModel::tick ( )
protectedvirtual

Delivers any queued messages.

Reimplemented from DtCommModel.

virtual void DtSimpleRadioCommModel::clearPendingRadioMessages ( )
protectedvirtual

Called to clear any pending radio messages in the comm model map that are waiting to be sent.

This method is called when a scenario is being rolled back/rewound

Reimplemented from DtCommModel.

static DtCommModel* DtSimpleRadioCommModel::create ( DtCommModelCreationParams params)
static

Static creator function that can be registered with factories.

Calls the constructor, and init() on the new instance before returning it.

virtual DtString DtSimpleRadioCommModel::type ( ) const
virtual
Returns
DtSimpleRadioCommModelType. Type strings for DtSimpleRadioCommModel subclasses are defined in commModelTypes.h.

Reimplemented from DtCommModel.

Reimplemented in MyCommModel.

virtual void DtSimpleRadioCommModel::registerRadio ( DtVrfRadio radio)
virtual

Overridden from base to set the ReadyToSend status of the radio to true as soon as it registers.

Reimplemented from DtCommModel.

Reimplemented in MyCommModel.

virtual void DtSimpleRadioCommModel::sendMessage ( DtVrfObjectMessage message,
DtVrfRadio sendingRadio 
)
virtual

Uses the transporter to send the message to the network.

Reimplemented from DtCommModel.

virtual DtSignalMessageTransporter* DtSimpleRadioCommModel::createTransporter ( )
protectedvirtual

Creates and returns the transporter subclass that will be used for this DtSimpleRadioCommModel.

virtual bool DtSimpleRadioCommModel::checkRadioConnectivity ( const DtVrfObject sender,
const DtVrfObject receiver 
)
protectedvirtual

Checks the connectivity of the radios for delivery of message.

Returns
True if the message is allowed to be delivered, or false of the sender/receiver radios are not connected. Results will vary, depending on the current connection mode specified in the descriptor.

Reimplemented in MyCommModel.

virtual void DtSimpleRadioCommModel::deliverMessageToRecipients ( const DtVrfObjectMessage message)
protectedvirtual

Overridden from base class to call checkRadioConnectivity() for each possible receiver of the message before delivering it.

Reimplemented from DtCommModel.

static void DtSimpleRadioCommModel::messageReceivedCallback ( DtSignalMessageTransporterCallbackParams params,
void *  usr 
)
staticprotected
virtual void DtSimpleRadioCommModel::processMessageReceived ( DtSignalMessageTransporterCallbackParams params)
protectedvirtual

Member Data Documentation

DtSignalMessageTransporter* DtSimpleRadioCommModel::myTransporter
protected
DtMessageQueue DtSimpleRadioCommModel::myMessagesToDeliver
protected
const DtSimpleRadioCommModelDescriptor* DtSimpleRadioCommModel::mySimpleCommDescriptor
protected
ConnectionMode DtSimpleRadioCommModel::myConnectionMode
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)