Arduino Sim Racing Library v1.1.3
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 ()
 
virtual bool update ()=0
 
virtual bool isConnected () const
 

Detailed Description

Abstract class for all peripherals.

Definition at line 237 of file SimRacing.h.

Member Function Documentation

◆ begin()

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

Initialize the hardware (if necessary)

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

Definition at line 242 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::Pedals, SimRacing::AnalogShifter, and SimRacing::Handbrake.

Definition at line 252 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::Pedals, SimRacing::AnalogShifter, and SimRacing::Handbrake.


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