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

Public Member Functions | |
| Dt_DEF_TRANSLATOR_NAME ("SetData") | |
| 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 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, const DtString &name, DtPortalMessageKind kind) | |
| CTOR. | |
| virtual | ~DtInteractionTranslator () |
| Virtual DTOR. | |
| virtual void | printIncomingOutgoingInteractions (const DtPortalInteraction &incoming, const DtInteraction &outgoing) const |
| Prints incoming and outgoing interactions (before and after translation) to DtInfo. | |
| virtual void | printIncomingOutgoingInteractions (const DtInteraction &incoming, const DtPortalInteraction &outgoing) const |
| Prints incoming and outgoing interactions (before and after translation) to DtInfo. | |
| virtual unsigned int | numInteractions () const |
| Returns the number of interactions received. | |
| virtual void | setNumInteractions (unsigned int num) |
| Sets the interaction count - mainly used for zeroing it. | |
Public Member Functions inherited from MAKVrExchange::DtTranslator | |
| DtTranslator (DtBroker *broker, const DtString &name, DtPortalMessageKind kind) | |
| CTOR. | |
| virtual | ~DtTranslator () |
| Virtual DTOR. | |
| virtual DtString | name () const |
| Accessor for the translator's name. | |
| virtual void | tick () |
| Needs to be implemented for every translator, this is called every frame to allow the translator to do any needed processing. | |
| DtBroker * | broker () const |
| Broker Accessor. | |
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. | |
Additional Inherited Members | |
Protected Attributes inherited from MAKVrExchange::DtDisBroker::DtInteractionTranslator | |
| unsigned int | myNumInteractions |
| DtDisBroker * | myDisBroker |
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,
| ModSetDataInteractionTranslator::Dt_DEF_TRANSLATOR_NAME | ( | "SetData" | ) |
|
virtual |
enables or disables this translator.
Reimplemented from MAKVrExchange::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.