![]() |
VR-Forces Developer's Guide
|
The command interaction translator is capable of translating interactions into messages to be sent to specific entities, via events. It was designed for the interactions defined in the NETN ETR FOM module, which are supported in HLA only. These interactions can generally be translated into a VR-Forces task and/or one ore more set request. By registering a conversion function with this translator, you can specify how such a translation should be performed. You can add your own interaction classes, as well, but they must be implemented as a subclass of the VR-Link DtInteraction class before a new converter can be registered.

Classes | |
| class | InteractionConverter |
| class | InteractionConverterBase |
Public Types | |
| using | EventPtr = std::unique_ptr< makVrfEvents::DtEvent > |
| using | EventList = std::vector< EventPtr > |
| using | ConverterFcn = std::function< EventList(const DtInteraction *, DtCommunicationManager *commMgr)> |
Protected Types | |
| using | ConverterPtr = std::unique_ptr< InteractionConverterBase > |
| using | ConverterList = std::vector< ConverterPtr > |
Protected Member Functions | |
| virtual bool | processEvent (const makVrfEvents::DtEvent &) override |
Protected Attributes | |
| ConverterList | myConverters |
Protected Attributes inherited from makVrf::DtVrlinkEventTranslator | |
| DtVrlinkNetworkInterface * | myNetworkInterface |
| bool | myInitialized = false |
Additional Inherited Members | |
Public Attributes inherited from makVrf::DtVrlinkEventTranslator | |
| boost::signals2::signal< void(const makVrfEvents::DtEvent &)> | signal_receivedEvent |
| using makVrf::DtVrlinkCommandInteractionTranslator::EventPtr = std::unique_ptr<makVrfEvents::DtEvent> |
| using makVrf::DtVrlinkCommandInteractionTranslator::EventList = std::vector<EventPtr> |
| using makVrf::DtVrlinkCommandInteractionTranslator::ConverterFcn = std::function<EventList(const DtInteraction*, DtCommunicationManager* commMgr)> |
The format for a converter function. Takes the incoming interaction and a pointer to communication manager and outputs a vector of DtEvents, generally a DtTaskEvent and/or one or more DtSetEvent.
|
protected |
|
protected |
| makVrf::DtVrlinkCommandInteractionTranslator::DtVrlinkCommandInteractionTranslator | ( | ) |
constructor
|
overridevirtual |
destructor
|
overridevirtual |
Performs initialization and calls registerDefaultConversions().
Reimplemented from makVrf::DtVrlinkEventTranslator.
| void makVrf::DtVrlinkCommandInteractionTranslator::addConversionFunction | ( | ConverterFcn | fcn | ) |
Register a conversion function for the specified interaction type. There can only be one conversion function per interaction type. Calling this when another conversion function is already specified for the given interaction type will replace the existing one.
| void makVrf::DtVrlinkCommandInteractionTranslator::removeConversionFunction | ( | ) |
Remove a registered conversion function for a specific interaction.
|
virtual |
Registers default conversion functions.
|
virtual |
Clears all of the registered conversion functions, unregistering them.
|
virtual |
The network interface that manages this interaction converter.
|
virtual |
Default conversion function for the NETN ETR MoveToLocation interaction. Creates a VRF Move to task. NETN ETR interactions are only supported in HLA.
|
virtual |
Default conversion function for the NETN ETR MagicMove interaction. Creates VRF Set Location and Set Heading requests. NETN ETR interactions are only supported in HLA.
|
virtual |
Default conversion function for the NETN ETR MagicResource interaction. Creates a VRF Set Resource request. NETN ETR interactions are only supported in HLA.
|
virtual |
Default conversion function for the NETN ETR FireAtEntity interaction. Creates a VRF Fire At task. NETN ETR interactions are only supported in HLA.
|
virtual |
Default conversion function for the NETN ETR FireAtLocation interaction. Creates a VRF Fire At task. NETN ETR interactions are only supported in HLA.
|
virtual |
Default conversion function for the NETN ETR Mount interaction. Creates a VRF Embark task. NETN ETR interactions are only supported in HLA.
|
virtual |
Default conversion function for the NETN ETR Dismount interaction. Creates a VRF Disembark task. NETN ETR interactions are only supported in HLA.
|
virtual |
Default conversion function for the NETN ETR Set Ordered Speed interaction. Creates a VRF Set Ordered Speed request. NETN ETR interactions are only supported in HLA.
|
virtual |
Default conversion function for the NETN ETR Set Ordered Altitude interaction. Creates a VRF Set Ordered Altitude request. NETN ETR interactions are only supported in HLA.
|
virtual |
Default conversion function for the NETN ETR Set Rules of Engagement interaction. Creates a VRF Set Rules of Engagement request. NETN ETR interactions are only supported in HLA.
|
inlineoverrideprotectedvirtual |
This translator only translates incoming messages, not outgoing. Therefore this method does nothing.
Implements makVrf::DtVrlinkEventTranslator.
|
protected |