VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simInternalCommunicationManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2007 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: simInternalCommunicationManager.h,v $ $Revision: 1.1 $ $State: Exp $
7 *******************************************************************************/
8 
11 
13 
14 #ifndef simInternalCommunicationManager_h
15 #define simInternalCommunicationManager_h
16 
18 #include <list>
20 #include <deque>
21 #include <tbb/spin_mutex.h>
22 
23 class DtSimManager;
25 class DtVrfObject;
26 
35 {
36 private:
43 
44 public:
47  static DtSimInternalCommunicationManager* create(DtSimManager* simMgr);
48 
49  typedef tbb::spin_mutex Mutex;
50 
51 protected:
55  virtual bool init();
56 
57 public:
59 
63 
64  virtual void registerCommunicationInterface(DtSimInternalCommunicationInterface* commIf);
65  virtual void unregisterCommunicationInterface(DtSimInternalCommunicationInterface* commIf);
67 
70  virtual void deliverMessage(const DtVrfObjectMessage* message);
71 
73  virtual void tick();
74 
76  virtual void clearQueue();
77 
78 protected:
80 
81  static void deliverRadioMessageCallback(DtSimMessage* msg, void* usr);
82  virtual void processDeliverRadioMessage(DtSimMessage* msg);
84 
87  virtual void deliverMessageLocally(const DtVrfObjectMessage* message);
88 
91  virtual void deliverMessageRemotely(const DtVrfObjectMessage* message);
92 
94  virtual bool objectShouldReceiveMessage(DtVrfObject* vrfObj, const DtVrfObjectMessage* msg);
95 
96 protected:
97 
99  typedef std::list<DtSimInternalCommunicationInterface*> DtCommInterfaceList;
101 
102  typedef std::deque<DtVrfObjectMessage*> DtMessageDeque;
105 
107 };
108 
109 #endif
DtSimManager * mySimManager
Definition: simInternalCommunicationManager.h:98
std::deque< DtVrfObjectMessage * > DtMessageDeque
Definition: simInternalCommunicationManager.h:102
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
The handler for all SimInternal messages that are sent to and from a specified DtVrfObject.
Definition: simInternalCommunicationInterface.h:29
The manager for SimInternal messages on a single simulation engine.
Definition: simInternalCommunicationManager.h:34
DtCommInterfaceList myCommInterfaceList
Definition: simInternalCommunicationManager.h:100
DtMessageDeque myMessagesToDeliver
Queue which stores messages that need to be delivered.
Definition: simInternalCommunicationManager.h:104
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
std::list< DtSimInternalCommunicationInterface * > DtCommInterfaceList
Definition: simInternalCommunicationManager.h:99
File: simMsg.h.
Definition: simMessage.h:35
The base class for all messages to/from a specific DtVrfObject.
Definition: vrfObjectMessage.h:30
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
tbb::spin_mutex Mutex
Definition: simInternalCommunicationManager.h:49
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102
Mutex myMessageMutex
Definition: simInternalCommunicationManager.h:106

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)