VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrf::DtVrlinkCommandInteractionTranslator Class Reference

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.

Inheritance diagram for makVrf::DtVrlinkCommandInteractionTranslator:
Inheritance graph
[legend]

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)>
 

Public Member Functions

 DtVrlinkCommandInteractionTranslator ()
 
virtual ~DtVrlinkCommandInteractionTranslator () override
 
virtual void init (DtVrlinkNetworkInterface *) override
 
template<typename InteractionType >
void addConversionFunction (ConverterFcn fcn)
 
template<typename InteractionType >
void removeConversionFunction ()
 
virtual void registerDefaultConversions ()
 
virtual void clearConversionFunctions ()
 
virtual DtVrlinkNetworkInterfacenetworkInterface ()
 
virtual EventList defaultNetnEtrMoveToLocationConverter (const DtInteraction *inter, DtCommunicationManager *commMgr)
 
virtual EventList defaultNetnEtrMagicMoveConverter (const DtInteraction *inter, DtCommunicationManager *commMgr)
 
virtual EventList defaultNetnEtrMagicResourceConverter (const DtInteraction *inter, DtCommunicationManager *commMgr)
 
virtual EventList defaultNetnEtrFireAtEntityConverter (const DtInteraction *inter, DtCommunicationManager *commMgr)
 
virtual EventList defaultNetnEtrFireAtLocationConverter (const DtInteraction *inter, DtCommunicationManager *commMgr)
 
virtual EventList defaultNetnEtrMountConverter (const DtInteraction *inter, DtCommunicationManager *commMgr)
 
virtual EventList defaultNetnEtrDismountConverter (const DtInteraction *inter, DtCommunicationManager *commMgr)
 
virtual EventList defaultNetnEtrSetOrderedSpeedConverter (const DtInteraction *inter, DtCommunicationManager *commMgr)
 
virtual EventList defaultNetnEtrSetOrderedAltitudeConverter (const DtInteraction *inter, DtCommunicationManager *commMgr)
 
virtual EventList defaultNetnEtrSetRulesOfEngagementConverter (const DtInteraction *inter, 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
 

Additional Inherited Members

Member Typedef Documentation

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.

Constructor & Destructor Documentation

makVrf::DtVrlinkCommandInteractionTranslator::DtVrlinkCommandInteractionTranslator ( )

constructor

virtual makVrf::DtVrlinkCommandInteractionTranslator::~DtVrlinkCommandInteractionTranslator ( )
overridevirtual

destructor

Member Function Documentation

virtual void makVrf::DtVrlinkCommandInteractionTranslator::init ( DtVrlinkNetworkInterface )
overridevirtual

Performs initialization and calls registerDefaultConversions().

Reimplemented from makVrf::DtVrlinkEventTranslator.

template<typename InteractionType >
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.

template<typename InteractionType >
void makVrf::DtVrlinkCommandInteractionTranslator::removeConversionFunction ( )

Remove a registered conversion function for a specific interaction.

virtual void makVrf::DtVrlinkCommandInteractionTranslator::registerDefaultConversions ( )
virtual

Registers default conversion functions.

virtual void makVrf::DtVrlinkCommandInteractionTranslator::clearConversionFunctions ( )
virtual

Clears all of the registered conversion functions, unregistering them.

virtual DtVrlinkNetworkInterface* makVrf::DtVrlinkCommandInteractionTranslator::networkInterface ( )
virtual

The network interface that manages this interaction converter.

virtual EventList makVrf::DtVrlinkCommandInteractionTranslator::defaultNetnEtrMoveToLocationConverter ( const DtInteraction inter,
DtCommunicationManager commMgr 
)
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 EventList makVrf::DtVrlinkCommandInteractionTranslator::defaultNetnEtrMagicMoveConverter ( const DtInteraction inter,
DtCommunicationManager commMgr 
)
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 EventList makVrf::DtVrlinkCommandInteractionTranslator::defaultNetnEtrMagicResourceConverter ( const DtInteraction inter,
DtCommunicationManager commMgr 
)
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 EventList makVrf::DtVrlinkCommandInteractionTranslator::defaultNetnEtrFireAtEntityConverter ( const DtInteraction inter,
DtCommunicationManager commMgr 
)
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 EventList makVrf::DtVrlinkCommandInteractionTranslator::defaultNetnEtrFireAtLocationConverter ( const DtInteraction inter,
DtCommunicationManager commMgr 
)
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 EventList makVrf::DtVrlinkCommandInteractionTranslator::defaultNetnEtrMountConverter ( const DtInteraction inter,
DtCommunicationManager commMgr 
)
virtual

Default conversion function for the NETN ETR Mount interaction. Creates a VRF Embark task. NETN ETR interactions are only supported in HLA.

virtual EventList makVrf::DtVrlinkCommandInteractionTranslator::defaultNetnEtrDismountConverter ( const DtInteraction inter,
DtCommunicationManager commMgr 
)
virtual

Default conversion function for the NETN ETR Dismount interaction. Creates a VRF Disembark task. NETN ETR interactions are only supported in HLA.

virtual EventList makVrf::DtVrlinkCommandInteractionTranslator::defaultNetnEtrSetOrderedSpeedConverter ( const DtInteraction inter,
DtCommunicationManager commMgr 
)
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 EventList makVrf::DtVrlinkCommandInteractionTranslator::defaultNetnEtrSetOrderedAltitudeConverter ( const DtInteraction inter,
DtCommunicationManager commMgr 
)
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 EventList makVrf::DtVrlinkCommandInteractionTranslator::defaultNetnEtrSetRulesOfEngagementConverter ( const DtInteraction inter,
DtCommunicationManager commMgr 
)
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.

virtual bool makVrf::DtVrlinkCommandInteractionTranslator::processEvent ( const makVrfEvents::DtEvent )
inlineoverrideprotectedvirtual

This translator only translates incoming messages, not outgoing. Therefore this method does nothing.

Implements makVrf::DtVrlinkEventTranslator.

Member Data Documentation

ConverterList makVrf::DtVrlinkCommandInteractionTranslator::myConverters
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)