![]() |
VR-Exchange 2.1 API Documentation
|
A class that translates between the Portal SetData Interaction and the DIS Set Data PDU. More...

Public Member Functions | |
| ModSetDataInteractionTranslator (DtDisBrokerNamespace::DtDisBroker *broker) | |
| Registers the function callback receiveDisInteraction() with VR-Link; and receivePortalInteraction() with the Portal. | |
| virtual | ~ModSetDataInteractionTranslator () |
| Removes the function callbacks receiveDisInteraction() and receivePortalInteraction() from VR-Link and the Portal respectively. | |
| virtual const char * | virtualTranslatorName () const |
| Returns the DIS interaction translator's name. | |
| virtual void | enableTranslator (bool enabled) |
| enables or disables this translator. | |
| virtual MAKVrExchange::DtPortalSetDataInteraction * | translate (MAKVrExchange::DtPortalSetDataInteraction *destination, const DtSetDataInteraction &source) |
| Translates a DIS VR-Link Set Data interaction into a VR-Exchange Portal Set Data interaction. | |
| virtual DtSetDataInteraction * | translate (DtSetDataInteraction *destination, const MAKVrExchange::DtPortalSetDataInteraction &source) |
| Translates a VR-Exchange Portal Set Data interaction into a DIS VR-Link Set Data interaction. | |
Public Member Functions inherited from MAKVrExchange::DtDisBroker::DtInteractionTranslator | |
| DtInteractionTranslator (DtDisBroker *broker) | |
| Constructor that passes broker down to the base class DtTranslator. | |
| virtual | ~DtInteractionTranslator () |
| Destructor. | |
| virtual void | printIncomingOutgoingInteractions (const DtPortalInteraction &incoming, const DtInteraction &outgoing, const DtString &interName) const |
| Prints the contents of an incoming portal interaction and an outgoing DIS interaction to a log file. | |
| virtual void | printIncomingOutgoingInteractions (const DtInteraction &incoming, const DtPortalInteraction &outgoing, const DtString &interName) const |
| Prints the contents of an incoming portal DIS and an outgoing Portal interaction to a log file. | |
Public Member Functions inherited from MAKVrExchange::DtDisBroker::DtTranslator | |
| DtTranslator (DtDisBroker *broker) | |
| Constructor sets myBroker to the broker passed in. | |
| virtual | ~DtTranslator () |
| Destructor does not free myBroker. | |
| DtDisBroker * | broker () const |
| returns a pointer to the broker, this is called in CTORs and DTORS | |
Static Public Member Functions | |
| static const char * | translatorName () |
| Returns the DIS interaction translator's name. | |
Protected Member Functions | |
| virtual void | createDisInteraction (const MAKVrExchange::DtPortalSetDataInteraction &incoming) |
| Sends a DIS interaction. | |
| virtual void | createPortalInteraction (const DtSetDataInteraction &incoming) |
| Sends a Portal interaction. | |
Static Protected Member Functions | |
| static void | receiveDisInteraction (DtSetDataInteraction *interaction, void *userData) |
| The callback function registered by the constructor and used by VR-Link. | |
| static void | receivePortalInteraction (const MAKVrExchange::DtPortalSetDataInteraction &interaction, void *userData) |
| The callback function registered by the constructor and used by the Portal. | |
Private Member Functions | |
| ModSetDataInteractionTranslator (const ModSetDataInteractionTranslator &) | |
| private copy constructor prevents pass-by-value, | |
| ModSetDataInteractionTranslator & | operator= (const ModSetDataInteractionTranslator &) |
| private assignment operator prevents assignment. | |
| int | operator== (const ModSetDataInteractionTranslator &) |
| private compare operators prevents comparisons. | |
| int | operator!= (const ModSetDataInteractionTranslator &) |
| private compare operators prevents comparisons. | |
Static Private Attributes | |
| static const char | thisTranslatorName [] |
| Translator name. | |
Additional Inherited Members | |
Protected Attributes inherited from MAKVrExchange::DtDisBroker::DtTranslator | |
| DtDisBroker * | myBroker |
| Manages data across all translators. | |
A class that translates between the Portal SetData Interaction and the DIS Set Data PDU.
Because this is written to VR-Link's protocol independent API much of this example will apply to both DIS, HLA and TENA.
This example is almost exactly the same as the code found in the DIS Broker. However, any bug fixes we find with the "real" translator may not be fixed here, so users should beware.
| ModSetDataInteractionTranslator::ModSetDataInteractionTranslator | ( | DtDisBrokerNamespace::DtDisBroker * | broker | ) |
Registers the function callback receiveDisInteraction() with VR-Link; and receivePortalInteraction() with the Portal.
|
virtual |
Removes the function callbacks receiveDisInteraction() and receivePortalInteraction() from VR-Link and the Portal respectively.
|
private |
private copy constructor prevents pass-by-value,
|
inlinestatic |
Returns the DIS interaction translator's name.
Returns a simple name for the interaction being translated.
Reimplemented from MAKVrExchange::DtDisBroker::DtInteractionTranslator.
References thisTranslatorName.
Referenced by virtualTranslatorName().
|
inlinevirtual |
Returns the DIS interaction translator's name.
Just calls translatorName().
Implements MAKVrExchange::DtDisBroker::DtTranslator.
References translatorName().
|
virtual |
enables or disables this translator.
Implements MAKVrExchange::DtDisBroker::DtTranslator.
|
virtual |
Translates a DIS VR-Link Set Data interaction into a VR-Exchange Portal Set Data interaction.
Takes the information found in source and produces a comparable DtPortalSetDataInteraction message found in destination. This function is overloaded to provide translation in the opposite direction.
| [out] | destination | A VR-Exchange Portal Set Data interaction. |
| [in] | source | A DIS VR-Link Set Data interaction. |
|
virtual |
Translates a VR-Exchange Portal Set Data interaction into a DIS VR-Link Set Data interaction.
Takes the information found in source and produces a comparable DIS VR-Link interaction. This function is overloaded to provide translation in the opposite direction.
| [out] | destination | A DIS VR-Link Set Data interaction. |
| [in] | source | A VR-Exchange Portal Set Data interaction. |
|
protectedvirtual |
Sends a DIS interaction.
Takes incoming as a Portal Interaction, translates it to a DIS Interaction, then sends this DIS Interaction through myBroker.
| [in] | incoming | Received Portal Interaction |
|
protectedvirtual |
Sends a Portal interaction.
Takes incoming as a DIS Interaction, translates it to a Portal Interaction, then sends this Portal Interaction though myBroker.
| [in] | incoming | Received DIS VR-Link Interaction. |
|
staticprotected |
The callback function registered by the constructor and used by VR-Link.
This function is called when a DIS VR-Link Data interaction occurs. Calls createPortalInteraction() to send the DIS interaction to the Portal.
| [in] | interaction | DIS Interaction to be sent. |
| [in] | userData | ModSetDataInteractionTranslator object. |
|
staticprotected |
The callback function registered by the constructor and used by the Portal.
This function is called when a Portal Data interaction occurs. Calls createDisInteration() to send the Portal interaction to DIS VR-Link.
| [in] | interaction | Portal Data Interaction to be sent. |
| [in] | userData | ModSetDataInteractionTranslator object. |
|
private |
private assignment operator prevents assignment.
|
private |
private compare operators prevents comparisons.
|
private |
private compare operators prevents comparisons.
|
staticprivate |
Translator name.
Referenced by translatorName().