Kodi Development  20.0
for Binary and Script based Add-Ons

Detailed Description

Wrapper class for peripheral events
To handle data of change events between add-on and Kodi.

Used on kodi::addon::CInstancePeripheral::GetEvents() and kodi::addon::CInstancePeripheral::SendEvent().


The following table contains values that can be set with class PeripheralEvent :

Name Type Set call Get call
Peripheral event type PERIPHERAL_EVENT_TYPE SetType Type
Peripheral index unsigned int SetPeripheralIndex PeripheralIndex
Peripheral event driver index unsigned int SetDriverIndex DriverIndex
Peripheral event button state JOYSTICK_STATE_BUTTON SetButtonState ButtonState
Peripheral event hat state JOYSTICK_STATE_HAT SetHatState HatState
Peripheral event axis state JOYSTICK_STATE_AXIS (float) SetAxisState AxisState
Peripheral event motor state JOYSTICK_STATE_MOTOR (float) SetMotorState MotorState

Further are several class constructors with values included.

Modules

 Value Help
 

Function Documentation

◆ PeripheralEvent() [1/4]

PeripheralEvent ( )
default

Constructor.

◆ PeripheralEvent() [2/4]

PeripheralEvent ( unsigned int  peripheralIndex,
unsigned int  buttonIndex,
JOYSTICK_STATE_BUTTON  state 
)
inline

Constructor.

Parameters
[in]peripheralIndexPeripheral index
[in]buttonIndexButton index
[in]stateJoystick state button

◆ PeripheralEvent() [3/4]

PeripheralEvent ( unsigned int  peripheralIndex,
unsigned int  hatIndex,
JOYSTICK_STATE_HAT  state 
)
inline

Constructor.

Parameters
[in]peripheralIndexPeripheral index
[in]hatIndexHat index
[in]stateJoystick state hat

◆ PeripheralEvent() [4/4]

PeripheralEvent ( unsigned int  peripheralIndex,
unsigned int  axisIndex,
JOYSTICK_STATE_AXIS  state 
)
inline

Constructor.

Parameters
[in]peripheralIndexPeripheral index
[in]axisIndexAxis index
[in]stateJoystick state axis

◆ Type()

PERIPHERAL_EVENT_TYPE Type ( void  ) const
inline

Get type of event.

Returns
Type defined with PERIPHERAL_EVENT_TYPE

◆ PeripheralIndex()

unsigned int PeripheralIndex ( void  ) const
inline

Get peripheral index.

Returns
Peripheral index number

◆ DriverIndex()

unsigned int DriverIndex ( void  ) const
inline

Get driver index.

Returns
Driver index number

◆ ButtonState()

JOYSTICK_STATE_BUTTON ButtonState ( void  ) const
inline

Get button state.

Returns
Button state as JOYSTICK_STATE_BUTTON

◆ HatState()

JOYSTICK_STATE_HAT HatState ( void  ) const
inline

Get hat state.

Returns
Hat state

◆ AxisState()

JOYSTICK_STATE_AXIS AxisState ( void  ) const
inline

Get axis state.

Returns
Axis state

◆ MotorState()

JOYSTICK_STATE_MOTOR MotorState ( void  ) const
inline

Get motor state.

Returns
Motor state

◆ SetType()

void SetType ( PERIPHERAL_EVENT_TYPE  type)
inline

Set type of event.

Parameters
[in]typeType defined with PERIPHERAL_EVENT_TYPE

◆ SetPeripheralIndex()

void SetPeripheralIndex ( unsigned int  index)
inline

Set peripheral index.

Parameters
[in]indexPeripheral index number

◆ SetDriverIndex()

void SetDriverIndex ( unsigned int  index)
inline

Set driver index.

Parameters
[in]indexDriver index number

◆ SetButtonState()

void SetButtonState ( JOYSTICK_STATE_BUTTON  state)
inline

Set button state.

Parameters
[in]stateButton state as JOYSTICK_STATE_BUTTON

◆ SetHatState()

void SetHatState ( JOYSTICK_STATE_HAT  state)
inline

Set hat state.

Parameters
[in]stateHat state as JOYSTICK_STATE_HAT (float)

◆ SetAxisState()

void SetAxisState ( JOYSTICK_STATE_AXIS  state)
inline

Set axis state.

Parameters
[in]stateAxis state as JOYSTICK_STATE_AXIS (float)

◆ SetMotorState()

void SetMotorState ( JOYSTICK_STATE_MOTOR  state)
inline

Set motor state.

Parameters
[in]stateMotor state as JOYSTICK_STATE_MOTOR (float)