#include <Actuator.h>
Inheritance diagram for Actuator:
Note: this class is intentionally not written as a purely abstract class. For simple methods, such as getType() it's not prudent to consume the extra vtable and call sequence overhead in order to allow anyone to subclass how getType() works. Should this become a problem, it can certainly be altered, but the intention is to keep it 'featherweight'.
Public Types | |
enum | ActuatorType { INJECTOR, IDLE_AIR_CONTROLLER, FUEL_PUMP, INDICATOR, COIL } |
enum | Status { OK, FAILED } |
Public Member Functions | |
ActuatorType | getType () |
Returns the type of Actuator. | |
char | getChannel () |
Returns the channel number. | |
virtual Status | setState (int state)=0 |
Sets the current state of the actuator. | |
virtual int | getState ()=0 |
Gets the current state of the actuator. | |
virtual | ~Actuator () |
virtual destructor | |
Protected Member Functions | |
Actuator (ActuatorType t, char ch) | |
Constructor, requires the ActuatorType is passed during initialization. | |
Protected Attributes | |
const ActuatorType | type |
A constant to hold the actuator type. | |
const char | channel |
A constant to hold the channel. |
|
|
|
|
|
virtual destructor
|
|
Constructor, requires the ActuatorType is passed during initialization.
|
|
Returns the channel number.
|
|
Gets the current state of the actuator.
Implemented in LEDActuator. |
|
Returns the type of Actuator.
|
|
Sets the current state of the actuator.
Implemented in LEDActuator. |
|
A constant to hold the channel.
|
|
A constant to hold the actuator type.
|