![]() |
VR-Forces 5.0.1 Developer's Guide
|
The DtEventManager handles the sending and receipt of system events (fire, detonate, command, etc). It provides a thread-safe way for the sim engine to send and receive such events, between both components within this sim engine and other remote applications.

Public Types | |
| typedef boost::signals2::signal< void(const DtEvent &)> | EventSignal |
Static Public Member Functions | |
| static void | setEventManagerCreatorFcn (DtEventManagerCreatorFcn fcn) |
| static DtEventManager * | createEventManager () |
Protected Types | |
| typedef std::map < DtEvent::EventType, EventSignal * > | EventCallbackMap |
Protected Member Functions | |
| virtual void | processEvent (const DtEvent &) |
| virtual bool | wantsToProcessEvent (const DtEvent &) const |
| virtual void | addEvent (const DtEvent &, bool &selfReflecting) |
Protected Attributes | |
| tbb::spin_mutex | myMutex |
| std::vector< DtEvent * > | myEvents |
| tbb::spin_mutex | myCallbackMutex |
| EventCallbackMap | myEventCallbackMap |
| bool | myProcessEventsImmediately |
| std::set< unsigned int > | myDoNotSelfReflect |
| DtNetworkInterfaceManager * | myNetworkManager |
| bool | myProcessNetworkEventsLocally |
Static Protected Attributes | |
| static DtEventManagerCreatorFcn | theEventManagerCreatorFcn |
Private Member Functions | |
| DtEventManager (const DtEventManager &) | |
| DtEventManager & | operator= (const DtEventManager &) |
| typedef boost::signals2::signal<void (const DtEvent&)> makVrfEvents::DtEventManager::EventSignal |
|
protected |
|
private |
Not implemented.
| makVrfEvents::DtEventManager::DtEventManager | ( | ) |
|
virtual |
|
private |
Not implemented.
|
virtual |
Reimplemented in DtClientEventManagerTCP, and DtServerEventManagerTCP.
|
virtual |
Adds an event to be processed, passing it to the appropriate network managers to be sent on the network if needed.
|
virtual |
Pass-thru to send event directly to network manager. Override if want to not send to network manager (see eventManagerTCP example)
Reimplemented in DtEventManagerTCP.
|
static |
Factory method for creating this class. If no factory method defined the default DtEventManager is created.
|
static |
Factory method for creating this class. If no factory method defined the default DtEventManager is created.
|
virtual |
Whether or not to put the messages onto a tickable queue (false) or process them immediately (true). The process immediately may not be thread safe, so, use the flag appropriately. The default is false.
|
inline |
|
virtual |
If want to also send events onto the network, attach a network manager to pass the events down to.
|
inline |
|
virtual |
Clears the event queue.
|
virtual |
Normally events that are sent on the network are also added to the local event queue. If this flag is false they will only be sent on the network.
|
inline |
|
virtual |
Returns a signal for a particular event type that you will use to connect/disconnect with in order to be notified of that event being received.
| EventSignal& makVrfEvents::DtEventManager::signalForFireEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForDetonationEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForDataEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForCommentEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForSignalEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForSensorFieldOfViewControlEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForSimControlEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalDiGuyActionEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForInfluenceEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForInitiateTakeEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForTransferRequestEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForTransferResponseEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForOwnershipAcquisitionRejectedEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForOwnershipAcquisitionAcquiredEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForTransferAcquisitionRequestEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForTransferAcquisitionResponseEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForCollisionEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForServiceRequestEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForResupplyOfferEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForResupplyReceivedEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
| EventSignal& makVrfEvents::DtEventManager::signalForResupplyCancelEvent | ( | ) |
Convenience functions. Connect to these signals to be notified when these types of events have occurred. For example, to register a callback for a fire event:
Whether or not to self reflect the given VRF data interaction messages (default is to self reflect all messages)
Returns true if this message wants to be self reflected.
|
virtual |
Puts the event into the queue.
|
protectedvirtual |
|
protectedvirtual |
Return true to self reflect this VRF message (if it is one)
|
protectedvirtual |
Called from addEvent, set the selfReflecting flag to true if the event should not also be posted on the event queue.
Reimplemented in DtEventManagerTCP.
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |