Arduino Sim Racing Library v1.1.5
Loading...
Searching...
No Matches
SimRacing::Peripheral Class Referenceabstract

Abstract class for all peripherals. More...

#include <SimRacing.h>

Inheritance diagram for SimRacing::Peripheral:
SimRacing::Handbrake SimRacing::Pedals SimRacing::Shifter SimRacing::ThreePedals SimRacing::TwoPedals SimRacing::AnalogShifter SimRacing::LogitechPedals SimRacing::LogitechDrivingForceGT_Pedals SimRacing::LogitechShifter

Public Member Functions

virtual void begin ()
 Initialize the hardware (if necessary)
 
virtual bool update ()=0
 Perform a poll of the hardware to refresh the class state.
 
virtual bool isConnected () const
 Check if the device is physically connected to the board.
 

Detailed Description

Abstract class for all peripherals.

Definition at line 249 of file SimRacing.h.

Member Function Documentation

◆ begin()

virtual void SimRacing::Peripheral::begin ( )
inlinevirtual

Initialize the hardware (if necessary)

Reimplemented in SimRacing::AnalogShifter, SimRacing::Handbrake, and SimRacing::Pedals.

Definition at line 254 of file SimRacing.h.

◆ isConnected()

virtual bool SimRacing::Peripheral::isConnected ( ) const
inlinevirtual

Check if the device is physically connected to the board.

That means it is both present and detected long enough to be considered 'stable'.

Returns
'true' if the device is connected, 'false' otherwise

Reimplemented in SimRacing::AnalogShifter, SimRacing::Handbrake, and SimRacing::Pedals.

Definition at line 264 of file SimRacing.h.

◆ update()

virtual bool SimRacing::Peripheral::update ( )
pure virtual

Perform a poll of the hardware to refresh the class state.

Returns
'true' if device state changed, 'false' otherwise

Implemented in SimRacing::AnalogShifter, SimRacing::Handbrake, and SimRacing::Pedals.


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