Loading...
Searching...
No Matches
JoystickDeviceHandler Interface Reference
Inheritance diagram for JoystickDeviceHandler:
InputDeviceHandler

Public Member Functions

proto external bool IsJoystickConnected (int iSlotIndex)
 
proto external int GetJoystickVendorId (int iSlotIndex)
 Retrieves the USB vendor ID of the joystick on the given slot.
 
proto external int GetJoystickProductId (int iSlotIndex)
 Retrieves the USB product ID of the joystick on the given slot.
 
proto external string GetJoystickProductName (int iSlotIndex)
 Returns the human-readable name of the joystick.
 
proto external bool StartFFEffectConstantForce (int iSlotIndex, int iEffectIndex, JoystickFFEffectType eEffectType, float fMagnitude, int iDurationMs=-1)
 Starts a constant force feedback effect on the joystick.
 
proto external bool StartFFEffectRamp (int iSlotIndex, int iEffectIndex, JoystickFFEffectType eEffectType, float fStart, float fEnd, int iDurationMs=-1)
 Starts a ramp force feedback effect on the joystick.
 
proto external bool StartFFEffectPeriodic (int iSlotIndex, int iEffectIndex, JoystickFFEffectType eEffectType, float fMagnitude, float fFrequencyHz=50, float fOffset=0, float fPhase=0, int iDurationMs=-1)
 Starts a periodic force feedback effect on the joystick.
 
proto external bool StartFFEffectCondition (int iSlotIndex, int iEffectIndex, JoystickFFEffectType eEffectType, float fPositiveCoefficient, float fNegativeCoefficient, float fOffset=0, float fDeadBand=0, int iDurationMs=-1)
 Starts a condition-based force feedback effect on the joystick.
 
proto external void StopForceFeedbackEffect (int iSlotIndex, int iEffectIndex=-1)
 Stops a force feedback effect.
 

Member Function Documentation

◆ GetJoystickProductId()

proto external int JoystickDeviceHandler.GetJoystickProductId ( int iSlotIndex)

Retrieves the USB product ID of the joystick on the given slot.

Parameters
iSlotIndexIndex of the joystick slot.
Returns
USB Product ID.

◆ GetJoystickProductName()

proto external string JoystickDeviceHandler.GetJoystickProductName ( int iSlotIndex)

Returns the human-readable name of the joystick.

Parameters
iSlotIndexIndex of the joystick slot.
Returns
Product name as a string.

◆ GetJoystickVendorId()

proto external int JoystickDeviceHandler.GetJoystickVendorId ( int iSlotIndex)

Retrieves the USB vendor ID of the joystick on the given slot.

Parameters
iSlotIndexIndex of the joystick slot.
Returns
USB Vendor ID.

◆ IsJoystickConnected()

proto external bool JoystickDeviceHandler.IsJoystickConnected ( int iSlotIndex)

◆ StartFFEffectCondition()

proto external bool JoystickDeviceHandler.StartFFEffectCondition ( int iSlotIndex,
int iEffectIndex,
JoystickFFEffectType eEffectType,
float fPositiveCoefficient,
float fNegativeCoefficient,
float fOffset = 0,
float fDeadBand = 0,
int iDurationMs = -1 )

Starts a condition-based force feedback effect on the joystick.

Parameters
iSlotIndexIndex of the joystick slot.
iEffectIndexEffect slot. Valid values are <0, 3>.
eEffectTypeType of force feedback condition effect.
Note
Supported values: SPRING, DAMPER, INERTIA, FRICTION.
Parameters
fPositiveCoefficientCoefficient for positive force direction.
fNegativeCoefficientCoefficient for negative force direction.
fOffsetCenter offset.
fDeadBandDeadband amount.
iDurationMsDuration in milliseconds. -1 for infinite duration.
Returns
true if successful, false otherwise.

◆ StartFFEffectConstantForce()

proto external bool JoystickDeviceHandler.StartFFEffectConstantForce ( int iSlotIndex,
int iEffectIndex,
JoystickFFEffectType eEffectType,
float fMagnitude,
int iDurationMs = -1 )

Starts a constant force feedback effect on the joystick.

Parameters
iSlotIndexIndex of the joystick slot.
iEffectIndexEffect slot. Valid values are <0, 3>.
eEffectTypeType of force feedback effect.
Note
Only CONSTANT_FORCE is supported.
Parameters
fMagnitudeForce magnitude.
iDurationMsDuration in milliseconds. -1 for infinite duration.
Returns
true if successful, false otherwise.

◆ StartFFEffectPeriodic()

proto external bool JoystickDeviceHandler.StartFFEffectPeriodic ( int iSlotIndex,
int iEffectIndex,
JoystickFFEffectType eEffectType,
float fMagnitude,
float fFrequencyHz = 50,
float fOffset = 0,
float fPhase = 0,
int iDurationMs = -1 )

Starts a periodic force feedback effect on the joystick.

Parameters
iSlotIndexIndex of the joystick slot.
iEffectIndexEffect slot. Valid values are <0, 3>.
eEffectTypeType of force feedback periodic effect.
Note
Supported values: SQUARE, SINE, TRIANGLE, SAWTOOTH_UP, SAWTOOTH_DOWN.
Parameters
fMagnitudeMagnitude of the force.
fFrequencyHzFrequency in Hz (default 50Hz).
fOffsetOffset value.
fPhasePhase shift value.
iDurationMsDuration in milliseconds. -1 for infinite duration.
Returns
true if successful, false otherwise.

◆ StartFFEffectRamp()

proto external bool JoystickDeviceHandler.StartFFEffectRamp ( int iSlotIndex,
int iEffectIndex,
JoystickFFEffectType eEffectType,
float fStart,
float fEnd,
int iDurationMs = -1 )

Starts a ramp force feedback effect on the joystick.

Parameters
iSlotIndexIndex of the joystick slot.
iEffectIndexEffect slot. Valid values are <0, 3>.
eEffectTypeType of force feedback effect.
Note
Only RAMP_FORCE is supported.
Parameters
fStartStart magnitude.
fEndEnd magnitude.
iDurationMsDuration in milliseconds. -1 for infinite duration.
Returns
true if successful, false otherwise.

◆ StopForceFeedbackEffect()

proto external void JoystickDeviceHandler.StopForceFeedbackEffect ( int iSlotIndex,
int iEffectIndex = -1 )

Stops a force feedback effect.

Parameters
iSlotIndexIndex of the joystick slot.
iEffectIndexEffect slot. Valid values are <0, 3>. Use -1 to stop all effects.

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