![]() |
Dataflow Runtime API
3.0.3.0
|
Base class for configurable drivers in the BSP. More...
#include <Imt.Base.BSP/Driver/ConfigurableDriverAbs.h>
Public Types | |
typedef ConfigurationType | Configuration |
The type of the driver configuration. More... | |
Public Member Functions | |
ConfigurableDriverAbs (const size_t indexModule, const size_t indexPin) | |
Constructor. More... | |
virtual | ~ConfigurableDriverAbs (void) |
Destructor. More... | |
imt::base::bsp::type::ErrorCode::Id | configure (const ConfigurationType &configuration) |
Configures the driver. More... | |
const ConfigurationType & | getConfiguration (void) const |
Gets the last accepted configuration. More... | |
![]() | |
DriverAbs (const size_t indexModule, const size_t indexDriver) | |
Constructor. More... | |
virtual | ~DriverAbs (void) |
Destructor. More... | |
void | initialize (void) |
Initialize the driver. More... | |
void | enable (void) |
Enable the driver. More... | |
imt::base::bsp::type::ErrorCode::Id | start (void) |
Starts the driver. More... | |
imt::base::bsp::type::ErrorCode::Id | stop (void) |
Stops the driver. More... | |
size_t | getIndexDriver (void) const |
Gets the index of the driver inisde the module. More... | |
size_t | getIndexModule (void) const |
Gets the index of the module the driver is part of. More... | |
imt::base::bsp::type::DriverType::Id | getType (void) const |
Gets the type of the driver. More... | |
bool | isInitialized (void) const |
Gets if the driver has been initialzied. More... | |
bool | isEnabled (void) const |
Gets if the driver has been enabled. More... | |
bool | isStarted (void) const |
Gets if the driver has been started. More... | |
Protected Member Functions | |
virtual imt::base::bsp::type::ErrorCode::Id | onReconfigure (const ConfigurationType &configuration)=0 |
Called whenever the configuration of the driver is changed. More... | |
![]() | |
virtual void | onInitialize ()=0 |
Called when the driver is initialized. More... | |
virtual void | onEnable ()=0 |
Called when the driver is enabled. More... | |
virtual imt::base::bsp::type::ErrorCode::Id | onStart ()=0 |
Called whenever the driver is started. More... | |
virtual imt::base::bsp::type::ErrorCode::Id | onStop ()=0 |
Called whenever the driver is stopped. More... | |
Additional Inherited Members | |
![]() | |
static const imt::base::bsp::type::DriverType::Id | Type = TypeId |
Constant holding the driver type. More... | |
Base class for configurable drivers in the BSP.
typedef ConfigurationType imt::base::bsp::driver::ConfigurableDriverAbs< TypeId, ConfigurationType >::Configuration |
The type of the driver configuration.
|
inline |
Constructor.
indexModule | Index of the module (starting at 0). |
indexPin | Index of the driver (starting at 0). |
|
inlinevirtual |
Destructor.
|
inline |
Configures the driver.
Used to change the driver configuration. The configuration is applied only if it is valid, otherwise the old configuration remains active.
configuration | The configuration. |
|
inline |
Gets the last accepted configuration.
|
protectedpure virtual |
Called whenever the configuration of the driver is changed.
Implemented in imt::base::bsp::driver::UsartDriver, imt::base::bsp::driver::SpiDriver, imt::base::bsp::driver::PwmDriver, imt::base::bsp::driver::I2CDriver, imt::base::bsp::driver::GpioDriver, and imt::base::bsp::driver::CanDriver.