![]() |
VR-Forces 5.0.3 Developer's Guide
|
The DtAgentManager manages the distributed scene object framework. This includes the objects and updates as well as the drivers used to control the objects.

Classes | |
| struct | AsynchronousInterfaceEntry |
| struct | MessageParcel |
Public Attributes | |
| boost::signalslib::signal < void(DtUniqueID id)> | signal_objectCreated |
Protected Types | |
| typedef std::vector < MessageParcel > | MessageParcelVector |
| typedef std::vector< DtMessage * > | MessageList |
| typedef boost::function< void(DtAgentManagerInterface *) > | AgentManagerInterfaceFunction |
| typedef DtLockedBufferedQueue < AgentManagerInterfaceFunction > | AsynchronousAgentManagerInterfaceFunctionQueue |
| typedef boost::unordered_map < DtUniqueID, AsynchronousInterfaceEntry > | NamespaceMap |
| typedef boost::unordered_map < DtUniqueID, DtAgentUpdateResolverInterface * > | UpdaterMap |
| typedef std::vector< DtAgent * > | DriverVector |
Protected Types inherited from makVrv::DtAgentManagerInterface | |
| typedef std::list < IndexedMessage, tbb::tbb_allocator < IndexedMessage > > | OrderedCallList |
| typedef std::list< DtAgent * > | AgentList |
Protected Member Functions | |
| virtual unsigned char | acquireNamespaceId (DtAsynchronousAgentManager *sceneManagerInterface, const std::string &ownerName) |
| virtual void | releaseNamespaceId (unsigned char nsId) |
| virtual void | addAsynchronousUpdateMessages (MessageParcelVector &messages) |
| void | distributeAndUpdate (MessageList &masterMessages, MessageList &distributedMessages) |
| virtual void | localEncodeAndUpdateScene () |
| virtual void | createObject (const std::string &className, DtUniqueID id) |
| virtual void | updateObject (DtUniqueID id, DtMessage &msg, unsigned int updatesize) |
| virtual void | destroyObject (DtUniqueID id) |
Protected Member Functions inherited from makVrv::DtAgentManagerInterface | |
| void | deleteObject (DtAgent *) |
| void | queueObjectForUpdate (DtAgent *object) |
Protected Attributes | |
| DtDe & | myDe |
| UpdaterMap | myUpdaterMap |
| std::pair< DtUniqueID, DtAgentUpdateResolverInterface * > | myLastObjectCache |
| DtSceneProctor * | mySceneProctor |
| DtLockedBufferedQueue < MessageParcel > | myAsynchronousMessageQueue |
| NamespaceMap | myNamespaceMap |
| unsigned char | myNextValidNamespaceIdGuess |
| boost::detail::atomic_count | myAtomicWaitingCount |
| boost::condition | myRequestIgCondition |
| boost::condition | myReleaseIgCondition |
| boost::mutex | myMonitor |
| bool | myForceCheckAysncMessages |
Protected Attributes inherited from makVrv::DtAgentManagerInterface | |
| DtUniqueID | myNamespaceId |
| DtUniqueID | myFreeID |
| unsigned int | myUpdateCallIndex |
| AgentList | myUpdatedObjects |
| AgentList | myToBeDeletedObjects |
| const DtAgentFactory * | myDriverFactory |
| OrderedCallList | myMasterList |
Friends | |
| class | DtAsynchronousAgentManager |
Additional Inherited Members | |
Static Public Member Functions inherited from makVrv::DtAgentManagerInterface | |
| static unsigned char | namespaceFromUniqueId (DtUniqueID id) |
Static Public Attributes inherited from makVrv::DtAgentManagerInterface | |
| static const double | IgnoreSimulationTime |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| makVrv::DtAgentManager::DtAgentManager | ( | DtDe & | ) |
CTOR.
|
virtual |
DTOR.
|
virtual |
Cleans up the agent manager. Should be called prior to deletion. This is not called from the destructor, so call this to clean up any outstanding messages before deleting the manager.
|
virtual |
Tick the scene manager. This will generate a message and deliver that message to the slaves (if the IG is the master) and handle the message.
Implements makVrv::DtAgentManagerInterface.
|
virtual |
Update the scene from an update message.
|
virtual |
Find the update handler for a particular object id.
Referenced by makVrv::Cast< DesiredType >::toFunctionType().
| DtElementID makVrv::DtAgentManager::findElementId | ( | DtUniqueID | id | ) |
Attempt to find the element ID for a scene object id.
|
virtual |
Return true if the given element is visible in the first available model set. Will not check element data, only the state of the scene object.
|
virtual |
Create a new DtAsynchronousAgentManager. An asynchronous interface is required if a Driver will be executing in a separate thread. The Interface returned should be deallocated by the Sim Driver when it is finished with it.
| void makVrv::DtAgentManager::checkForIgLock | ( | bool | forceLock = false | ) |
An internal function the scene manager calls to allow for asynchronous scene managers to use the DtDe& reference.
|
virtual |
Get the locked de. The calling thread will get the de instance. which will be thread safe. This will stall the main thread and possibly other threads as well. Use only when necessary and release when possible. This should only be called by a separate thread.
|
virtual |
Release the locked de, the de reference is now invalid to be used in the thread. This should only be called by a separate thread. This must be called after acquireLockedIg or the entire process will be in deadlock.
|
inline |
Get the scene manager's Ig object.
| void makVrv::DtAgentManager::clear | ( | ) |
Forcibly clear the scene. This function normally should not be called. It is called in the case when a slave losses it's connection to the master.
|
protectedvirtual |
Acquire a namespace. Namespace ids are used by additional SceneManagerInterfaces to ensure there are not id collisions. There are a total of 255 namespaces (0 is reserved for the SceneManager). Once a namespace is acquired it must be released due to the possibility of running out. The DtAsynchronousAgentManager automatically releases its id when it is destroyed.
| DtCorruptedState | if all available namspaces are in use. |
Release a namespace id, this should be called by a SceneManagerInterface DTOR.
|
protectedvirtual |
Add asynchronous update messages. This function is thread-safe and reentrant, which allows it to be called by DtAsynchronousSceneManagerInterfaces in separate threads. This function does not need to be called by any other classes. Ownership of the memory is transfered to the main thread.
| DtInvalidInput | if the message pointer is null. |
|
protected |
Implementation of updating via message and sending it if necessary.
|
protectedvirtual |
Special update scene function used to update only the local scene from the internal objects. This is automatically called by tick if there is only a single master IG.
|
protectedvirtual |
Create an object.
|
protectedvirtual |
Update an object.
|
protectedvirtual |
Destroy an Object by it's ID.
|
friend |
| boost::signalslib::signal<void (DtUniqueID id)> makVrv::DtAgentManager::signal_objectCreated |
Signal for creation of actual objects (represented by their unique id).
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |