VR-Engage  2.2
Loading...
Searching...
No Matches
FwlCgfVrf::DtVreFwlJoyController Class Reference

Detailed Description

This class manages joystick input for fixed-wing aircraft and converts it into appropriate control surface movements. It handles various input devices and maps their values to aircraft control ports, providing a bridge between the physical joystick and the aircraft flight model.

#include <vreFwlJoyController.h>

Inheritance diagram for FwlCgfVrf::DtVreFwlJoyController:
[legend]

Public Member Functions

 DtVreFwlJoyController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtVreFwlJoyController () override
 
virtual bool init () override
 
virtual void tick () override
 
virtual void calcAndSetPortValues (const DtString &functionGroup, const DtString &function, double value, bool repeat) override
 
virtual bool createPorts () override
 
virtual const char * type () const override
 
virtual void disable () override
 
virtual void enable () override
 
virtual void setIsEnabled (bool yes) override
 
- Public Member Functions inherited from makVre::DtFixedWingJoyFlightController
 DtFixedWingJoyFlightController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtFixedWingJoyFlightController () override
 
- Public Member Functions inherited from vreRtd::DtVreRtdTraitJoyControllerExtension
 DtVreRtdTraitJoyControllerExtension ()
 
virtual ~DtVreRtdTraitJoyControllerExtension ()
 
virtual void tick (bool myJoystickEnabled)
 
virtual bool createJoystickEnabledPort ()
 
virtual void processSetJoyDeviceSwitch (DtSimMessage *msg)
 

Static Public Member Functions

static DtSimComponent * creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
- Static Public Member Functions inherited from makVre::DtFixedWingJoyFlightController
static DtSimComponent * creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 

Private Member Functions

 DtVreFwlJoyController (const DtVreFwlJoyController &orig)
 
DtVreFwlJoyControlleroperator= (const DtVreFwlJoyController &orig)
 

Private Attributes

const DtVreFwlJoyControllerDescriptormyDesc
 
DtBooleanOutputPort * myLandingGearOutputPort
 
DtIntegerOutputPort * myFlapSettingOutputPort
 
DtAnalogOutputPort * myAirBrakeOutputPort
 
DtAnalogOutputPort * myWheelBrakeOutputPort
 
bool myLandingGearStateChanged
 
DtConstrainedDualAxisAnalogOutputPort * myStickOutputPort
 
DtConstrainedAnalogOutputPort * myPedalOutputPort
 
DtConstrainedAnalogOutputPort * myThrottleOutputPort
 
makVrf::DtArticulatedPartStateRepository * myXPartRep
 
makVrf::DtArticulatedPartStateRepository * myYPartRep
 

Additional Inherited Members

- Protected Member Functions inherited from makVre::DtFixedWingJoyFlightController
virtual void joystickConnected () override
 
virtual void joystickDisconnected () override
 
- Protected Attributes inherited from vreRtd::DtVreRtdTraitJoyControllerExtension
DtBooleanOutputPort * myJoystickEnabledPort
 
bool myFirstTick
 
bool myPreviousJoystickState
 

Constructor & Destructor Documentation

◆ DtVreFwlJoyController() [1/2]

FwlCgfVrf::DtVreFwlJoyController::DtVreFwlJoyController ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = 0,
DtReaderWriterRegistry * parentRegistry = 0 )

Constructor.

Parameters
nameThe name of the component
ownerThe local object this component belongs to
simManagerThe simulation services manager
descComponent descriptor containing configuration
parentRegistryParent registry for reader/writer functionality

Initializes a new fixed-wing joystick controller component for VREngage control.

Referenced by DtVreFwlJoyController(), and operator=().

◆ ~DtVreFwlJoyController()

virtual FwlCgfVrf::DtVreFwlJoyController::~DtVreFwlJoyController ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the joystick controller component.

◆ DtVreFwlJoyController() [2/2]

FwlCgfVrf::DtVreFwlJoyController::DtVreFwlJoyController ( const DtVreFwlJoyController & orig)
private

Copy constructor (not implemented)

Parameters
origThe source object

References DtVreFwlJoyController().

Member Function Documentation

◆ init()

virtual bool FwlCgfVrf::DtVreFwlJoyController::init ( )
overridevirtual

Initializes the joystick controller.

Returns
True if initialization was successful

Performs initial setup of the joystick controller, including configuration loading and port initialization.

◆ tick()

virtual void FwlCgfVrf::DtVreFwlJoyController::tick ( )
overridevirtual

Performs per-frame processing.

Called once per simulation frame to calculate new control values based on current joystick input and update the output ports.

◆ calcAndSetPortValues()

virtual void FwlCgfVrf::DtVreFwlJoyController::calcAndSetPortValues ( const DtString & functionGroup,
const DtString & function,
double value,
bool repeat )
overridevirtual

Calculates and sets port values for a specific joystick function.

Parameters
functionGroupThe function group of the joystick input
functionThe specific function within the group
valueThe input value from the joystick
repeatWhether this is a repeated input

Maps joystick inputs to the appropriate aircraft control outputs.

Reimplemented from makVre::DtFixedWingJoyFlightController.

◆ createPorts()

virtual bool FwlCgfVrf::DtVreFwlJoyController::createPorts ( )
overridevirtual

Creates component ports.

Returns
True if port creation was successful

Creates output ports for stick, pedals, throttle, landing gear, flaps, and other aircraft controls.

◆ type()

virtual const char * FwlCgfVrf::DtVreFwlJoyController::type ( ) const
overridevirtual

Gets the component type.

Returns
The type string for this component

Returns TS_JoyController as the component type identifier.

Reimplemented from makVre::DtFixedWingJoyFlightController.

◆ disable()

virtual void FwlCgfVrf::DtVreFwlJoyController::disable ( )
overridevirtual

Disables the joystick controller.

Disables joystick input processing, usually when player control is deactivated.

Reimplemented from vreRtd::DtVreRtdTraitJoyControllerExtension.

◆ enable()

virtual void FwlCgfVrf::DtVreFwlJoyController::enable ( )
overridevirtual

Enables the joystick controller.

Enables joystick input processing, usually when player control is activated.

Reimplemented from vreRtd::DtVreRtdTraitJoyControllerExtension.

◆ setIsEnabled()

virtual void FwlCgfVrf::DtVreFwlJoyController::setIsEnabled ( bool yes)
overridevirtual

Sets the enabled state of the joystick controller.

Parameters
yesTrue to enable the controller, false to disable

Directly sets the enabled state of the joystick controller.

Reimplemented from vreRtd::DtVreRtdTraitJoyControllerExtension.

◆ creator()

static DtSimComponent * FwlCgfVrf::DtVreFwlJoyController::creator ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = 0,
DtReaderWriterRegistry * parentRegistry = 0 )
static

Component factory function.

Parameters
nameThe name for the new component
ownerThe local object the component will belong to
simManagerThe simulation services manager
descComponent descriptor containing configuration
parentRegistryParent registry for reader/writer functionality
Returns
Pointer to the newly created component

Static factory function used for component creation through the component registry.

◆ operator=()

DtVreFwlJoyController & FwlCgfVrf::DtVreFwlJoyController::operator= ( const DtVreFwlJoyController & orig)
private

Assignment operator (not implemented)

Parameters
origThe source object
Returns
Reference to this object

References DtVreFwlJoyController().

Member Data Documentation

◆ myDesc

const DtVreFwlJoyControllerDescriptor* FwlCgfVrf::DtVreFwlJoyController::myDesc
private

Component descriptor containing configuration parameters.

◆ myLandingGearOutputPort

DtBooleanOutputPort* FwlCgfVrf::DtVreFwlJoyController::myLandingGearOutputPort
private

Output port for landing gear control.

◆ myFlapSettingOutputPort

DtIntegerOutputPort* FwlCgfVrf::DtVreFwlJoyController::myFlapSettingOutputPort
private

Output port for flap setting.

◆ myAirBrakeOutputPort

DtAnalogOutputPort* FwlCgfVrf::DtVreFwlJoyController::myAirBrakeOutputPort
private

Output port for air brake control.

◆ myWheelBrakeOutputPort

DtAnalogOutputPort* FwlCgfVrf::DtVreFwlJoyController::myWheelBrakeOutputPort
private

Output port for wheel brake control.

◆ myLandingGearStateChanged

bool FwlCgfVrf::DtVreFwlJoyController::myLandingGearStateChanged
private

Flag tracking whether landing gear state has changed.

◆ myStickOutputPort

DtConstrainedDualAxisAnalogOutputPort* FwlCgfVrf::DtVreFwlJoyController::myStickOutputPort
private

Output port for control stick (pitch/roll)

◆ myPedalOutputPort

DtConstrainedAnalogOutputPort* FwlCgfVrf::DtVreFwlJoyController::myPedalOutputPort
private

Output port for rudder pedals (yaw)

◆ myThrottleOutputPort

DtConstrainedAnalogOutputPort* FwlCgfVrf::DtVreFwlJoyController::myThrottleOutputPort
private

Output port for throttle control.

◆ myXPartRep

makVrf::DtArticulatedPartStateRepository* FwlCgfVrf::DtVreFwlJoyController::myXPartRep
private

State repository for X-axis articulation.

◆ myYPartRep

makVrf::DtArticulatedPartStateRepository* FwlCgfVrf::DtVreFwlJoyController::myYPartRep
private

State repository for Y-axis articulation.


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