Open FFBoard
Open source force feedback firmware
AnalogSource Class Referenceabstract

#include <AnalogSource.h>

Inheritance diagram for AnalogSource:
ChoosableClass PersistentStorage ADS111X_AnalogSource CanAnalogBase LocalAnalog CanAnalog< AMOUNT >

Public Member Functions

 AnalogSource ()
 
virtual ~AnalogSource ()
 
virtual const ClassIdentifier getInfo ()=0
 
const ClassType getClassType () override
 returns the used classchooser selection id of this instance More...
 
virtual std::vector< int32_t > * getAxes ()
 
- Public Member Functions inherited from ChoosableClass
virtual ~ChoosableClass ()
 
uint16_t getSelectionID ()
 
- Public Member Functions inherited from PersistentStorage
 PersistentStorage ()
 
virtual ~PersistentStorage ()
 
virtual void saveFlash ()
 
virtual void restoreFlash ()
 
void restoreFlashDelayed ()
 

Static Public Member Functions

static bool isCreatable ()
 
- Static Public Member Functions inherited from ChoosableClass
static bool isCreatable ()
 
- Static Public Member Functions inherited from PersistentStorage
static std::vector< PersistentStorage * > & getFlashHandlers ()
 
static void restoreFlashStartupCb ()
 

Public Attributes

std::vector< int32_t > buf
 

Static Public Attributes

static ClassIdentifier info
 
static const std::vector< class_entry< AnalogSource > > all_analogsources
 
- Static Public Attributes inherited from ChoosableClass
static ClassIdentifier info
 

Additional Inherited Members

- Protected Attributes inherited from ChoosableClass
uint16_t selectionId
 Should only be written by ClassChooser during creation. More...
 
- Protected Attributes inherited from PersistentStorage
bool restoreDelayedFlag = false
 
- Static Protected Attributes inherited from PersistentStorage
static bool startupComplete = false
 

Detailed Description

Definition at line 19 of file AnalogSource.h.

Constructor & Destructor Documentation

◆ AnalogSource()

AnalogSource::AnalogSource ( )

Definition at line 16 of file AnalogSource.cpp.

◆ ~AnalogSource()

AnalogSource::~AnalogSource ( )
virtual

Definition at line 20 of file AnalogSource.cpp.

Member Function Documentation

◆ getAxes()

std::vector< int32_t > * AnalogSource::getAxes ( )
virtual

Reimplemented in ADS111X_AnalogSource, and LocalAnalog.

Definition at line 24 of file AnalogSource.cpp.

◆ getClassType()

const ClassType AnalogSource::getClassType ( )
inlineoverridevirtual

returns the used classchooser selection id of this instance

Type of this class. Mainclass, motordriver... Should be implemented by the parent class so it is not in the info struct

Reimplemented from ChoosableClass.

Reimplemented in ADS111X_AnalogSource, and LocalAnalog.

Definition at line 28 of file AnalogSource.h.

◆ getInfo()

virtual const ClassIdentifier AnalogSource::getInfo ( )
pure virtual

Implements ChoosableClass.

Implemented in ADS111X_AnalogSource, CanAnalogBase, and LocalAnalog.

◆ isCreatable()

static bool AnalogSource::isCreatable ( )
inlinestatic

Definition at line 27 of file AnalogSource.h.

Member Data Documentation

◆ all_analogsources

const std::vector< class_entry< AnalogSource > > AnalogSource::all_analogsources
static
Initial value:
=
{
#ifdef ANALOGAXES
add_class<LocalAnalog,AnalogSource>(0),
#endif
#ifdef CANANALOG
add_class<CanAnalog<8>,AnalogSource>(1),
#endif
#ifdef ADS111XANALOG
add_class<ADS111X_AnalogSource,AnalogSource>(2),
#endif
}

Definition at line 33 of file AnalogSource.h.

◆ buf

std::vector<int32_t> AnalogSource::buf

Definition at line 31 of file AnalogSource.h.

◆ info

ClassIdentifier AnalogSource::info
static
Initial value:
= {
.name = "NONE" ,
.id = CLSID_ANALOG_NONE,
}

Definition at line 26 of file AnalogSource.h.


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