VR-Engage  2.3
Loading...
Searching...
No Matches
DtVortexInterface Class Reference

Detailed Description

Provides functionality for creating and managing the connection between VR-Forces ports and Vortex interfaces. Handles both input and output ports.

#include <vortexInterface.h>

Public Member Functions

 DtVortexInterface (makVre::DtVortexInterfaceDescriptor *desc, const VxSim::VxWeakInterface< VxSim::VxVHLInterface > &iface=nullptr)
 
virtual ~DtVortexInterface ()
 
virtual DtInputPortGroup * inputPortGroup ()
 
virtual DtOutputPortGroup * outputPortGroup ()
 
virtual void updateInputs ()
 
virtual void updateOutputs ()
 
virtual void updateOutputStateRepository (DtVrfObjectStateRepository *esr)
 
virtual void setInterface (VxSim::VxWeakInterface< VxSim::VxVHLInterface > iface)
 
virtual void connectPortsToInterface ()
 
virtual DtVortexInterfaceBaseElement * getInputElement (const std::string &name)
 
virtual DtVortexInterfaceBaseElement * getOutputElement (const std::string &name)
 
virtual VxData::DelegateConnection addInputElementObserver (const std::string &name, const DtVortexInterfaceFieldCallback &callback)
 
virtual VxData::DelegateConnection addOutputElementObserver (const std::string &name, const DtVortexInterfaceFieldCallback &callback)
 
virtual std::string getInterfaceName ()
 

Protected Member Functions

virtual void createPorts (makVre::DtVortexInterfaceDescriptor *desc)
 

Protected Attributes

VxSim::VxWeakInterface< VxSim::VxVHLInterface > myInterface
 
std::string myInterfaceName
 
DtInputPortGroup * myInputPortGroup
 
DtOutputPortGroup * myOutputPortGroup
 
std::vector< DtVortexInterfaceBaseElement * > myInputElements
 
std::vector< DtVortexInterfaceBaseElement * > myOutputElements
 

Constructor & Destructor Documentation

◆ DtVortexInterface()

DtVortexInterface::DtVortexInterface ( makVre::DtVortexInterfaceDescriptor * desc,
const VxSim::VxWeakInterface< VxSim::VxVHLInterface > & iface = nullptr )

Constructor.

Creates ports based on the descriptor and optionally connects them to the Vortex interface.

Parameters
descDescriptor containing interface configuration
ifaceOptional Vortex interface to connect to

◆ ~DtVortexInterface()

virtual DtVortexInterface::~DtVortexInterface ( )
virtual

Destructor.

Cleans up resources.

Member Function Documentation

◆ inputPortGroup()

virtual DtInputPortGroup * DtVortexInterface::inputPortGroup ( )
virtual

Gets the input port group.

Provides access to all input ports.

Returns
Pointer to the input port group

◆ outputPortGroup()

virtual DtOutputPortGroup * DtVortexInterface::outputPortGroup ( )
virtual

Gets the output port group.

Provides access to all output ports.

Returns
Pointer to the output port group

◆ updateInputs()

virtual void DtVortexInterface::updateInputs ( )
virtual

Updates all input elements.

Transfers data from input ports to Vortex fields.

◆ updateOutputs()

virtual void DtVortexInterface::updateOutputs ( )
virtual

Updates all output elements.

Transfers data from Vortex fields to output ports.

◆ updateOutputStateRepository()

virtual void DtVortexInterface::updateOutputStateRepository ( DtVrfObjectStateRepository * esr)
virtual

Updates the object state repository with output values.

Transfers data from output ports to the state repository.

Parameters
esrPointer to the object state repository

◆ setInterface()

virtual void DtVortexInterface::setInterface ( VxSim::VxWeakInterface< VxSim::VxVHLInterface > iface)
virtual

Sets the Vortex interface.

Parameters
ifaceVortex interface to connect to

◆ connectPortsToInterface()

virtual void DtVortexInterface::connectPortsToInterface ( )
virtual

Connects ports to the Vortex interface.

Associates each port with the corresponding Vortex field.

◆ getInputElement()

virtual DtVortexInterfaceBaseElement * DtVortexInterface::getInputElement ( const std::string & name)
virtual

Gets an input element by name.

Parameters
nameName of the input element
Returns
Pointer to the input element, or nullptr if not found

◆ getOutputElement()

virtual DtVortexInterfaceBaseElement * DtVortexInterface::getOutputElement ( const std::string & name)
virtual

Gets an output element by name.

Parameters
nameName of the output element
Returns
Pointer to the output element, or nullptr if not found

◆ addInputElementObserver()

virtual VxData::DelegateConnection DtVortexInterface::addInputElementObserver ( const std::string & name,
const DtVortexInterfaceFieldCallback & callback )
virtual

Adds an observer to an input element's Vortex field.

Parameters
nameName of the input element
callbackFunction called when the field changes
Returns
Delegate connection that can disconnect or destroy the observer

◆ addOutputElementObserver()

virtual VxData::DelegateConnection DtVortexInterface::addOutputElementObserver ( const std::string & name,
const DtVortexInterfaceFieldCallback & callback )
virtual

Adds an observer to an output element's Vortex field.

Parameters
nameName of the output element
callbackFunction called when the field changes
Returns
Delegate connection that can disconnect or destroy the observer

◆ getInterfaceName()

virtual std::string DtVortexInterface::getInterfaceName ( )
virtual

Gets the interface name.

Returns
The name of the interface

◆ createPorts()

virtual void DtVortexInterface::createPorts ( makVre::DtVortexInterfaceDescriptor * desc)
protectedvirtual

Creates ports based on the descriptor.

Creates input and output ports of appropriate types according to the descriptor.

Parameters
descDescriptor containing interface configuration

Member Data Documentation

◆ myInterface

VxSim::VxWeakInterface<VxSim::VxVHLInterface> DtVortexInterface::myInterface
protected

Vortex interface.

◆ myInterfaceName

std::string DtVortexInterface::myInterfaceName
protected

Interface name.

◆ myInputPortGroup

DtInputPortGroup* DtVortexInterface::myInputPortGroup
protected

Input port group.

◆ myOutputPortGroup

DtOutputPortGroup* DtVortexInterface::myOutputPortGroup
protected

Output port group.

◆ myInputElements

std::vector<DtVortexInterfaceBaseElement*> DtVortexInterface::myInputElements
protected

Vector of input elements.

◆ myOutputElements

std::vector<DtVortexInterfaceBaseElement*> DtVortexInterface::myOutputElements
protected

Vector of output elements.


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