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

Public Types | |
| typedef bool(* | PluginInitMethod )(DtBroker *) |
Public Member Functions | |
| virtual | ~DtBroker () |
| Default DTOR. | |
| virtual DtPortalConnection * | portalConnection () const |
| Returns a pointer to the portal connection. | |
| 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 () |
| Returns 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 | |
| DtBroker () | |
| CTOR. | |
| virtual void | initialize (DtBrokerInitializer *init) |
| Initializes the broker using the given initializer. | |
| virtual void | logBrokerSettings (DtBrokerInitializer *init) |
| Output important broker settings to the log file on initialization. | |
| virtual void | initializeDebuggedAndDisabledFromInit () |
| Sets our disabled / debugged sets from the initializer. | |
| virtual void | initFileLogging (const DtString &logFileName) |
| Log all output to the filename logFileName. | |
| virtual void | obtainLock () |
| Checks lock file to determine if broker is already running. | |
| virtual void | loadBrokerPlugins () |
| Loads all plugins in the broker's plugin directory. | |
| virtual void | getLibrariesInDir (const std::string &dir, std::list< std::string > &files) const |
| Scans the given directory for libraries and returns them in a list. | |
| virtual void | initPortalConnection (const DtBrokerInitializer &init) |
| Initializes the Portal Connection. | |
| virtual void | initStatisticsManager (const DtBrokerInitializer &init) |
| Initialize the statistics manager. | |
| 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 | shutdownWithError (const DtString &error) |
| Sends an error message to the queue manager, then marks us for shutdown. | |
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 * | myPortalConn |
| DtBrokerInitializer * | myBrokerInitializer |
| std::set< DtString > | myDisabledTranslators |
| std::set< DtString > | myDebuggedTranslators |
| DtFilterManager | myFilterManager |
| DtStatisticsManager * | myStatisticsManager |
| DtPrinter * | myFilePrinter |
Static Protected Attributes | |
| static const char * | theVrxPluginInitMethod |
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
| typedef bool(* MAKVrExchange::DtBroker::PluginInitMethod)(DtBroker *) |
|
protected |
CTOR.
|
virtual |
Default DTOR.
|
private |
Class not copyable, not implemented.
|
protectedvirtual |
Initializes the broker using the given initializer.
Initializer should have already parsed its command line and config file.
|
protectedvirtual |
Output important broker settings to the log file on initialization.
Reimplemented in MAKVrExchange::DtTenaBroker::DtTenaBroker, MAKVrExchange::DtDisBroker::DtDisBroker, and MAKVrExchange::DtRprBroker::DtRprBroker.
|
virtual |
Returns a pointer to the portal connection.
|
pure virtual |
Function which is called when VR-Exchange wants a display launched for this broker.
Implemented in MAKVrExchange::DtTenaBroker::DtTenaBroker, MAKVrExchange::DtRprBroker::DtRprBroker, 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::DtRprBroker::DtRprBroker, and MAKVrExchange::DtDisBroker::DtDisBroker.
|
virtual |
Function used to make the broker reload its broker initialization settings.
Reimplemented in MAKVrExchange::DtTenaBroker::DtTenaBroker, MAKVrExchange::DtRprBroker::DtRprBroker, 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::DtRprBroker::DtRprBroker.
|
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 |
Returns 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::DtRprBroker::DtRprBroker, MAKVrExchange::DtDisBroker::DtDisBroker, and DtSimpleBroker.
|
virtual |
ProcessEvents should be called every frame. This should not be overrided.
Reimplemented in MAKVrExchange::DtTenaBroker::DtTenaBroker, MAKVrExchange::DtDisBroker::DtDisBroker, and MAKVrExchange::DtRprBroker::DtRprBroker.
|
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 |
Sets our disabled / debugged sets from the initializer.
Should only be done at startup and when user indicates they want to restart the broker.
|
protectedvirtual |
Log all output to the filename logFileName.
|
protectedvirtual |
Checks lock file to determine if broker is already running.
|
protectedvirtual |
Loads all plugins in the broker's plugin directory.
|
protectedvirtual |
Scans the given directory for libraries and returns them in a list.
|
protectedvirtual |
Initializes the Portal Connection.
|
protectedvirtual |
Initialize the statistics manager.
|
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 |
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.
|
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.
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by brokerInitializer(), brokerName(), and pollingInterval().
|
protected |
|
protected |
|
protected |
Referenced by objectFilters().
|
protected |
|
protected |