VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
DtSimInternalCommunicationManager Class Reference

The manager for SimInternal messages on a single simulation engine. This class manages the passing of DtVrfObjectMessage instances between different DtSimInternalCommunicationInterface instances. A message is passed from the communication interface to this class, which then passes it out to the appropriate destination interfaces, if any. This class is also responsible for sending the messages onto the network to other instances of this class in other VRF simulation engines.

Public Member Functions

 DtSimInternalCommunicationManager (DtSimulationServices *simMgr)
 
virtual bool init ()
 
virtual ~DtSimInternalCommunicationManager ()
 
virtual void deliverMessage (const DtVrfObjectMessage *message)
 
virtual void tick ()
 
virtual void clearQueue ()
 
DtSimulationServicessimulationServices () const
 
virtual void deliverMessageLocally (const DtVrfObjectMessage *message)
 
virtual void deliverMessageRemotely (const DtVrfObjectMessage *message)
 
virtual void registerCommunicationInterface (DtSimInternalCommunicationInterface *commIf)
 
virtual void unregisterCommunicationInterface (DtSimInternalCommunicationInterface *commIf)
 

Protected Types

typedef boost::unordered_map
< DtUUID, std::set
< DtSimInternalCommunicationInterface * > > 
DtCommInterfaceList
 
typedef std::deque
< DtVrfObjectMessage * > 
DtMessageDeque
 
typedef tbb::spin_mutex Mutex
 

Protected Member Functions

virtual bool objectShouldReceiveMessage (DtLocalObject *vrfObj, const DtVrfObjectMessage *msg)
 
virtual void processUUIDChanged (const DtUUID &oldUUID, const DtUUID &newUUID)
 

Protected Attributes

DtSimulationServicesmySimulationServices
 
DtCommInterfaceList myCommInterfaceList
 
DtMessageDeque myMessagesToDeliver
 
Mutex myMessageMutex
 
tbb::spin_mutex myInterfaceMutex
 
boost::signals2::scoped_connection myUUIDChangedConnection
 

Private Member Functions

 DtSimInternalCommunicationManager ()
 
 DtSimInternalCommunicationManager (const DtSimInternalCommunicationManager &orig)
 
DtSimInternalCommunicationManageroperator= (const DtSimInternalCommunicationManager &orig)
 
static void deliverRadioMessageCallback (DtSimMessage *msg, void *usr)
 
virtual void processDeliverRadioMessage (DtSimMessage *msg)
 

Member Typedef Documentation

typedef tbb::spin_mutex DtSimInternalCommunicationManager::Mutex
protected

Constructor & Destructor Documentation

DtSimInternalCommunicationManager::DtSimInternalCommunicationManager ( )
private

Not Implemented.

DtSimInternalCommunicationManager::DtSimInternalCommunicationManager ( const DtSimInternalCommunicationManager orig)
private

Not Implemented.

DtSimInternalCommunicationManager::DtSimInternalCommunicationManager ( DtSimulationServices simMgr)
virtual DtSimInternalCommunicationManager::~DtSimInternalCommunicationManager ( )
virtual

Member Function Documentation

DtSimInternalCommunicationManager& DtSimInternalCommunicationManager::operator= ( const DtSimInternalCommunicationManager orig)
private

Not Implemented.

virtual bool DtSimInternalCommunicationManager::init ( )
virtual

Must call after creating.

virtual void DtSimInternalCommunicationManager::registerCommunicationInterface ( DtSimInternalCommunicationInterface commIf)
virtual

Add/remove a DtSimInternalCommunicationInterface from this manager. Only interfaces that are registered will be able to receive messages from this manager.

virtual void DtSimInternalCommunicationManager::unregisterCommunicationInterface ( DtSimInternalCommunicationInterface commIf)
virtual

Add/remove a DtSimInternalCommunicationInterface from this manager. Only interfaces that are registered will be able to receive messages from this manager.

virtual void DtSimInternalCommunicationManager::deliverMessage ( const DtVrfObjectMessage message)
virtual

Puts this message on the message delivery queue. The message will be cloned by this method.

virtual void DtSimInternalCommunicationManager::tick ( )
virtual

Delivers all messages currently on the delivery queue.

virtual void DtSimInternalCommunicationManager::clearQueue ( )
virtual

Clears all messages currently on the delivery queue without delivering them.

DtSimulationServices* DtSimInternalCommunicationManager::simulationServices ( ) const
inline
virtual void DtSimInternalCommunicationManager::deliverMessageLocally ( const DtVrfObjectMessage message)
virtual

Sends this message to any local interfaces that should receive the messages.

virtual void DtSimInternalCommunicationManager::deliverMessageRemotely ( const DtVrfObjectMessage message)
virtual

Sends this message to the network so other VRF sim engines can receive and process it.

static void DtSimInternalCommunicationManager::deliverRadioMessageCallback ( DtSimMessage msg,
void *  usr 
)
staticprotected

Callback for processing deliver radio message types of interface messages.

virtual void DtSimInternalCommunicationManager::processDeliverRadioMessage ( DtSimMessage msg)
protectedvirtual

Callback for processing deliver radio message types of interface messages.

virtual bool DtSimInternalCommunicationManager::objectShouldReceiveMessage ( DtLocalObject vrfObj,
const DtVrfObjectMessage msg 
)
protectedvirtual
Returns
True if the specified object should receive the message.
virtual void DtSimInternalCommunicationManager::processUUIDChanged ( const DtUUID oldUUID,
const DtUUID newUUID 
)
protectedvirtual

Member Data Documentation

DtSimulationServices* DtSimInternalCommunicationManager::mySimulationServices
protected
DtCommInterfaceList DtSimInternalCommunicationManager::myCommInterfaceList
protected
DtMessageDeque DtSimInternalCommunicationManager::myMessagesToDeliver
protected

Queue which stores messages that need to be delivered.

Mutex DtSimInternalCommunicationManager::myMessageMutex
mutableprotected
tbb::spin_mutex DtSimInternalCommunicationManager::myInterfaceMutex
mutableprotected
boost::signals2::scoped_connection DtSimInternalCommunicationManager::myUUIDChangedConnection
protected

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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)