![]() |
VR-Forces 5.0.3 Developer's Guide
|
The DtCommunicationManager class is a convenience class that will create both the DtNetworkInterfaceManager and the DtEventManager as well as provide methods to access them and pass information to them. You can still use the individual classes (and should for registering callbacks), however, where at all possible, use this higher level interface to access broader functionality.

Public Types | |
| typedef boost::function < double(double &dt)> | SimTimeProvideFcn |
Static Public Member Functions | |
| static void | setCommunicationManagerCreatorFcn (DtCommunicationManagerCreatorFcn fcn) |
| static DtCommunicationManager * | createCommunicationManager (const DtSimulationAddress &, makVrf::DtStateDataManager *sm=0, int threadPoolSize=-1) |
Public Attributes | |
| boost::signals2::signal< void()> | signal_aboutToAdvanceFrame |
| boost::signals2::signal< void(makVrf::DtStateDataManager *)> | signal_stateDataManagerChanged |
| boost::signals2::signal< void()> | signal_frameAdvanced |
| boost::signals2::signal< void(double simTime, double dT)> | signal_beginFrame |
| boost::signals2::signal< void(DtNetworkManagerInterface *)> | signal_interfaceAdded |
| boost::signals2::signal< void(DtNetworkManagerInterface *)> | signal_interfaceRemoved |
Protected Member Functions | |
| virtual void | slot_interfaceAdded (DtNetworkManagerInterface *) |
| virtual void | slot_interfaceRemoved (DtNetworkManagerInterface *) |
| void | initialize () |
Static Protected Attributes | |
| static DtCommunicationManagerCreatorFcn | theCommunicationManagerCreatorFcn |
| typedef boost::function<double (double& dt)> DtCommunicationManager::SimTimeProvideFcn |
| DtCommunicationManager::DtCommunicationManager | ( | const DtSimulationAddress & | , |
| makVrf::DtStateDataManager * | sm = 0, |
||
| int | threadPoolSize = -1 |
||
| ) |
Creates the network manager, state data manager (if not supplied) and event manager from their creator functions. The simulation address is the unique identifier of the communication address of this instance. If threadPoolSize is not -1 and this class creates the state data manager, use the number of threads for the legion thread pool update.
|
virtual |
|
static |
Factory method for creating this class. If no factory method defined the default DtCommunicationManager is created.
|
static |
Factory method for creating this class. If no factory method defined the default DtCommunicationManager is created.
|
virtual |
When set, this class will take ownership of the supplied manager.
|
inline |
|
virtual |
| const DtSimulationAddress& DtCommunicationManager::simulationAddress | ( | ) | const |
|
inline |
|
virtual |
When set this class will take ownership of the supplied manager.
|
inline |
|
virtual |
|
inline |
|
virtual |
If the network thread supports it, the number of threads to use the network.
|
virtual |
Returns true if the entity type is publishable by this connection.
|
virtual |
Sets the coordinate system to use with this scenario.
|
virtual |
Starts the beginning of the frame. The return value of this is the new simulation time as determined by the network interface.
|
virtual |
Tells all network interfaces the frame wants to be advaned. Returns true if the frame was advanced (myInFrame counter is 0) If supply preAdvanceFrameTime, returns the time spent in the preAdvanceFrame call.
|
virtual |
Since the network interfaces will be walked in order to see if one wants to put it on the network to prevent other interfaces from also publishing on the network, insert this at the beginning to give it priority. This class will take ownership of the mananger. If the manager type already exists, existing type is deleted.
|
virtual |
This class will take ownership of the manager. If the manager type already exists, existing type is deleted.
|
virtual |
Returns the network manager by type.
|
virtual |
Removes and deletes the manager.
|
virtual |
Adds an event to the event manager. If the event manager has an associated network manager will also send via the network manager.
|
virtual |
Posts an event to the event manager only. Will not send over the network.
|
virtual |
Sends the event over the network only. Does not post to the event manager.
|
virtual |
Wether or not created clock should use performance counter (default is true for windows)
|
virtual |
Fire/detonate (and other) pdus/interactions can be tied with an event id. This routine will return the event id in a protocol dependent way based on the communication interface. Pass in the optional entity id of the entity causing the event.
|
virtual |
Sets the id of this session. Used to filter data network traffic.
|
inline |
|
virtual |
@ { Time routines
|
virtual |
Puts the simulation into run mode by letting the network connections know.
|
virtual |
Puts the simulation into pause mode by letting the network connections know.
|
virtual |
Scenario is about to rewind.
|
virtual |
Resets the simulation.
|
virtual |
Sets the current simulation time.
|
virtual |
Sets the mode for the exercise clock.
|
virtual |
Sets the current time multiplier.
|
virtual |
Start day/date time of the exercise.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
inlinevirtual |
|
inline |
|
inline |
|
virtual |
Returns true if there are no registered connections.
|
virtual |
Called when all objects are being deleted, will indiciate that all remotes will eventually need to be rediscovered.
|
virtual |
Calls down to the state data manager to reserve a number of entities. This reservation will be cumulative, so, if a previous reserve reserved 1000 entitie, and this reserves 1000, the total will be 2000.
|
virtual |
If any connection returns false do not run.
|
virtual |
Returns true if any of the connections are self reflecting.
|
virtual |
Sets all connections (if supported) to self reflecting. This will only apply to current handlers, not ones that are added after this is called.
|
virtual |
|
virtual |
|
inline |
|
virtual |
This is a destructive call in that it will remove all the state data and then tell the network connections to recreate the state data from the remote entities. This call assumes that this would not be made unless the simulation model set has been changed after remote entities have been discovered This operation could take a significant amount of time depending on the amount of objects that are in the system. Returns true if there are remote objects to rediscover.
|
protectedvirtual |
|
protectedvirtual |
|
protected |
Called from constructor. Creates event and network managers.
| boost::signals2::signal<void ()> DtCommunicationManager::signal_aboutToAdvanceFrame |
Sent before the state data manager advances its frame.
| boost::signals2::signal<void (makVrf::DtStateDataManager*)> DtCommunicationManager::signal_stateDataManagerChanged |
Sent if a network manager is assigned with a different state data manager in it.
| boost::signals2::signal<void ()> DtCommunicationManager::signal_frameAdvanced |
Can be called by outside holders of this class if the frame cannot be advanced, however, other classes connect to this to be signaled for a post communication advance event. Will also be called from advanceFrame.
Signal sent right before beginFrame is returned.
| boost::signals2::signal<void (DtNetworkManagerInterface*)> DtCommunicationManager::signal_interfaceAdded |
Signal sent when an interface is added.
| boost::signals2::signal<void (DtNetworkManagerInterface*)> DtCommunicationManager::signal_interfaceRemoved |
Signal sent when an interface is removed.
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
Backup for simulation time (absRealTime) if no network manager.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |