Dataflow Runtime API  3.0.3.0
Public Types | Public Member Functions | Protected Member Functions | List of all members
imt::base::bsp::driver::ConfigurableDriverAbs< TypeId, ConfigurationType > Class Template Referenceabstract

Base class for configurable drivers in the BSP. More...

#include <Imt.Base.BSP/Driver/ConfigurableDriverAbs.h>

Inheritance diagram for imt::base::bsp::driver::ConfigurableDriverAbs< TypeId, ConfigurationType >:
imt::base::bsp::module::DriverAbs< TypeId >

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...
 
- Public Member Functions inherited from imt::base::bsp::module::DriverAbs< TypeId >
 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...
 
- Protected Member Functions inherited from imt::base::bsp::module::DriverAbs< TypeId >
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 Public Attributes inherited from imt::base::bsp::module::DriverAbs< TypeId >
static const imt::base::bsp::type::DriverType::Id Type = TypeId
 Constant holding the driver type. More...
 

Detailed Description

template<imt::base::bsp::type::DriverType::Id TypeId, typename ConfigurationType>
class imt::base::bsp::driver::ConfigurableDriverAbs< TypeId, ConfigurationType >

Base class for configurable drivers in the BSP.

Member Typedef Documentation

◆ Configuration

template<imt::base::bsp::type::DriverType::Id TypeId, typename ConfigurationType >
typedef ConfigurationType imt::base::bsp::driver::ConfigurableDriverAbs< TypeId, ConfigurationType >::Configuration

The type of the driver configuration.

Constructor & Destructor Documentation

◆ ConfigurableDriverAbs()

template<imt::base::bsp::type::DriverType::Id TypeId, typename ConfigurationType >
imt::base::bsp::driver::ConfigurableDriverAbs< TypeId, ConfigurationType >::ConfigurableDriverAbs ( const size_t  indexModule,
const size_t  indexPin 
)
inline

Constructor.

Parameters
indexModuleIndex of the module (starting at 0).
indexPinIndex of the driver (starting at 0).

◆ ~ConfigurableDriverAbs()

template<imt::base::bsp::type::DriverType::Id TypeId, typename ConfigurationType >
virtual imt::base::bsp::driver::ConfigurableDriverAbs< TypeId, ConfigurationType >::~ConfigurableDriverAbs ( void  )
inlinevirtual

Destructor.

Member Function Documentation

◆ configure()

template<imt::base::bsp::type::DriverType::Id TypeId, typename ConfigurationType >
imt::base::bsp::type::ErrorCode::Id imt::base::bsp::driver::ConfigurableDriverAbs< TypeId, ConfigurationType >::configure ( const ConfigurationType &  configuration)
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.

Parameters
configurationThe configuration.
Returns
OK Configuration is changed. error code Invalid configuration.

◆ getConfiguration()

template<imt::base::bsp::type::DriverType::Id TypeId, typename ConfigurationType >
const ConfigurationType& imt::base::bsp::driver::ConfigurableDriverAbs< TypeId, ConfigurationType >::getConfiguration ( void  ) const
inline

Gets the last accepted configuration.

Returns
Last accepted configuration or hardware default.

◆ onReconfigure()

template<imt::base::bsp::type::DriverType::Id TypeId, typename ConfigurationType >
virtual imt::base::bsp::type::ErrorCode::Id imt::base::bsp::driver::ConfigurableDriverAbs< TypeId, ConfigurationType >::onReconfigure ( const ConfigurationType &  configuration)
protectedpure virtual

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