![]() |
VR-Exchange 2.1 API Documentation
|
Base class for all broker objects. More...

Public Member Functions | |
| DtBroker (DtBrokerInitializer *init) | |
| Default constructor. | |
| virtual | ~DtBroker () |
| Default DTOR. | |
| virtual DtPortalConnection * | portalConnection () const |
| Returns a pointer to the portalConnection. | |
| virtual void | launchGui ()=0 |
| Function which is called when VR-Exchange wants a display launched for this broker. | |
| virtual void | launchInfoGui () |
| Override of the pure virtual function from DtBroker. | |
| virtual void | reloadBrokerSettings () |
| Function used to make the broker reload its broker initialization settings. | |
| virtual void | reloadFilterSettings () |
| Function used to make the broker reload its filter settings. | |
| virtual const DtString | brokerName () const |
| Returns the brokers name. | |
| virtual DtU16 | brokerId () const |
| Returns the brokers ID. | |
| virtual DtTime | simTime () const |
| Returns the current simulation time. | |
| virtual void | updateSimTime () const |
| Called to advance the simTime. | |
| virtual bool | isTimeToQuit () const |
| Indicates this broker needs to shutdown. | |
| virtual bool | isTranslatorDebuggingOn (const DtString &name) const |
| Returns true if the translator name is set for debugging. | |
| virtual bool | isTranslatorDisabled (const DtString &name) const |
| Returns true if the translator name is disabled. | |
| virtual DtTime | pollingInterval () |
| the amount of time that the broker is asking to be polled. | |
| virtual DtBrokerInitializer * | brokerInitializer () const |
| Returns the brokerInitializer object used to create this broker. | |
| virtual void | tick ()=0 |
| Tick is called by processEvents, brokers should override to do any periodic processing. | |
| virtual void | processEvents () |
| ProcessEvents should be called every frame. This should not be overrided. | |
| virtual DtFilterManager & | objectFilters () |
| Accessor for the broker's object filter manager. | |
| virtual const DtFilterManager & | objectFilters () const |
| Accessor for the broker's object filter manager (const). | |
| virtual void | setBrokerId (int id) |
| Set the internal broker ID values of this broker. | |
Protected Member Functions | |
| virtual void | stopFileLogging () |
| Cleanup this broker's members. | |
| virtual void | processShutdownRequest (const DtPortalBrokerShutdownRequestMessage &obj) |
| Called by the static method shutdownRequestCb to notify this broker to stop. | |
| virtual void | processRestartRequest (bool shouldEnableOneToOne) |
| Called by the restart request callback to notify this broker to restart. | |
| virtual void | initPortalConnection (const DtBrokerInitializer &init) |
| Initializes the Portal Connection, called from the CTOR. | |
| virtual void | initFileLogging (const DtString &logFileName) |
| Log all output to the filename logFileName, called from the CTOR. | |
| virtual void | shutdownWithError (const DtString &error) |
| Sends an error message to the queue manager, then marks us for shutdown. | |
| virtual void | initializeDebuggedAndDisabledFromInit () |
| Sets our disabled / debugged sets from the initializer. | |
Static Protected Member Functions | |
| static void | shutdownRequestCb (const DtPortalBrokerShutdownRequestMessage &obj, void *usr) |
| Portal Connection Callback, registered in the CTOR. | |
| static void | processDisableOneToOneCb (const DtPortalBrokerDisableOneToOneMessage &msg, void *usr) |
| Portal broker process disable One to One mapping callback. | |
| static void | processEnableOneToOneCb (const DtPortalBrokerEnableOneToOneMessage &msg, void *usr) |
| Portal broker process enable One to One mapping callback. | |
| static void | launchGuiRequestCb (const DtBrokerLaunchGuiRequest &obj, void *usr) |
| Portal Connection Callback, registered in the CTOR. | |
Protected Attributes | |
| DtU16 | myBrokerId |
| bool | myShutdownRequestedFlag |
| DtPortalConnection * | myPConn |
| DtBrokerInitializer * | myBrokerInitializer |
| std::set< DtString > | myDisabledTranslators |
| std::set< DtString > | myDebuggedTranslators |
| DtFilterManager | myFilterManager |
| DtPrinter * | myFilePrinter |
Private Member Functions | |
| DtBroker (const DtBroker &other) | |
| Class not copyable, not implemented. | |
| DtBroker & | operator= (const DtBroker &other) |
| Class not copyable, not implemented. | |
Filtering methods. | |
| virtual void | filterObjectCallback (const DtFilterObjectMessage &object) |
| Processes DtFilterObjectMessage messages. | |
| static void | filterObjectCallback (const DtFilterObjectMessage &object, void *userData) |
| Callback method for processing DtFilterObjectMessage messages. | |
Base class for all broker objects.
A Broker object is the central component in broker applications. It manages the portal data exchange interface by creating a DtPortalConnection and initializing it in a consistent way using an MTL file and command line arguments. The DtBrokerInstance registers for control messages from the Portal and will report quit events, as well as open the UI upon request. This class is defined in libBroker
| MAKVrExchange::DtBroker::DtBroker | ( | DtBrokerInitializer * | init | ) |
Default constructor.
Takes a DtBrokerInitializer instance. init should have already parsed its command line and its .mtl file by calling init.parseCmdLine() and init.loadMtlFile().
| [in] | init | Initialization information. |
init is expected to have already called DtBrokerInitializer::parseCmdLine(), and DtBrokerInitializer::loadMtlFile().
|
virtual |
Default DTOR.
|
private |
Class not copyable, not implemented.
|
virtual |
Returns a pointer to the portalConnection.
|
pure virtual |
Function which is called when VR-Exchange wants a display launched for this broker.
Implemented in MAKVrExchange::DtTenaBroker::DtTenaBroker, MAKVrExchange::DtHlaBroker::DtHlaBroker, MAKVrExchange::DtDisBroker::DtDisBroker, and DtSimpleBroker.
|
virtual |
Override of the pure virtual function from DtBroker.
This function is called when VR-Exchange wants us to launch a Dialog Box but is not connected to the internet
Reimplemented in MAKVrExchange::DtTenaBroker::DtTenaBroker, MAKVrExchange::DtHlaBroker::DtHlaBroker, and MAKVrExchange::DtDisBroker::DtDisBroker.
|
virtual |
Function used to make the broker reload its broker initialization settings.
Reimplemented in MAKVrExchange::DtTenaBroker::DtTenaBroker, MAKVrExchange::DtHlaBroker::DtHlaBroker, and MAKVrExchange::DtDisBroker::DtDisBroker.
|
virtual |
Function used to make the broker reload its filter settings.
|
inlinevirtual |
Returns the brokers name.
References MAKVrExchange::DtBrokerInitializer::brokerName(), and myBrokerInitializer.
|
virtual |
Returns the brokers ID.
|
virtual |
Returns the current simulation time.
This is associated with the PConnection clock and is not synchronized beyond this broker.
Reimplemented in MAKVrExchange::DtTenaBroker::DtTenaBroker.
|
virtual |
Called to advance the simTime.
Reimplemented in MAKVrExchange::DtDisBroker::DtDisBroker, and MAKVrExchange::DtHlaBroker::DtHlaBroker.
|
virtual |
Indicates this broker needs to shutdown.
|
virtual |
Returns true if the translator name is set for debugging.
Indicates whether name could be found in myDebuggedTranslators which is assembled from DtBrokerInitializer.
| [in] | name | Name of a translator. |
true If name is found in myDebuggedTranslators false Otherwise
|
virtual |
Returns true if the translator name is disabled.
Indicates whether name could be found in myDisabledTranslators which is assembled from DtBrokerInitializer.
| [in] | name | Name of a translator. |
true If name is found in myDisabledTranslators false Otherwise
|
inlinevirtual |
the amount of time that the broker is asking to be polled.
References myBrokerInitializer, and MAKVrExchange::DtBrokerInitializer::pollingInterval().
|
inlinevirtual |
Returns the brokerInitializer object used to create this broker.
References myBrokerInitializer.
|
pure virtual |
Tick is called by processEvents, brokers should override to do any periodic processing.
Implemented in MAKVrExchange::DtTenaBroker::DtTenaBroker, MAKVrExchange::DtHlaBroker::DtHlaBroker, MAKVrExchange::DtDisBroker::DtDisBroker, and DtSimpleBroker.
|
virtual |
ProcessEvents should be called every frame. This should not be overrided.
|
inlinevirtual |
Accessor for the broker's object filter manager.
References myFilterManager.
|
inlinevirtual |
Accessor for the broker's object filter manager (const).
References myFilterManager.
|
virtual |
Set the internal broker ID values of this broker.
In previous VR-Exchange versions, this was set by the user, now it is set by an internal TCP stream between the Portal and the DIS broker.
|
protectedvirtual |
Cleanup this broker's members.
|
protectedvirtual |
Called by the static method shutdownRequestCb to notify this broker to stop.
|
protectedvirtual |
Called by the restart request callback to notify this broker to restart.
|
protectedvirtual |
Initializes the Portal Connection, called from the CTOR.
|
protectedvirtual |
Log all output to the filename logFileName, called from the CTOR.
|
protectedvirtual |
Sends an error message to the queue manager, then marks us for shutdown.
This is not virtual so that it can be called from the CTOR.
|
protectedvirtual |
Sets our disabled / debugged sets from the initializer.
Should only be done at startup and when user indicates they want to restart the broker.
|
staticprotected |
Portal Connection Callback, registered in the CTOR.
|
staticprotected |
Portal broker process disable One to One mapping callback.
|
staticprotected |
Portal broker process enable One to One mapping callback.
|
staticprotected |
Portal Connection Callback, registered in the CTOR.
|
staticprotected |
Callback method for processing DtFilterObjectMessage messages.
Note: Calls the virtual filterObjectCallback(..) method.
|
protectedvirtual |
Processes DtFilterObjectMessage messages.
Calls filterObjectByName or filterObjectByType depending on the filter type specified in the DtFilterObjectMessage message.
Class not copyable, not implemented.
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by brokerInitializer(), brokerName(), and pollingInterval().
|
protected |
|
protected |
|
protected |
Referenced by objectFilters().
|
protected |