![]() |
Dataflow Runtime API
3.0.3.0
|
Interface for all modules in the BSP. More...
#include <Imt.Base.BSP/Module/ModuleAbs.h>
Public Member Functions | |
ModuleAbs (const size_t indexModule, const size_t numberOfModules, const size_t numberOfDrivers) | |
Constructor. More... | |
virtual | ~ModuleAbs (void) |
Destructor. More... | |
void | initialize (void) |
Initialize the module and all drivers. More... | |
void | enable (void) |
Enable the module (but not its drivers). More... | |
imt::base::bsp::type::ErrorCode::Id | start (void) |
Starts the module. More... | |
imt::base::bsp::type::ErrorCode::Id | stop (void) |
Stops the module. More... | |
Driver * | getDriver (const size_t indexDriver) |
Gets the given driver. More... | |
size_t | getIndexModule (void) const |
Gets the index of the module. More... | |
size_t | getNumberOfDrivers (void) const |
Gets the number of drivers provided by this module. More... | |
imt::base::bsp::type::DriverType::Id | getType (void) const |
Gets the type of the module. More... | |
bool | isInitialized (void) const |
Gets if the module has been initialzied. More... | |
bool | isEnabled (void) const |
Gets if the module has been enabled. More... | |
bool | isStarted (void) const |
Gets if the module has been started. More... | |
Static Public Attributes | |
static const imt::base::bsp::type::DriverType::Id | Type = TypeId |
Constant holding the driver type. More... | |
Protected Member Functions | |
virtual void | onInitialize ()=0 |
Called when the module is initialized. More... | |
virtual void | onEnable ()=0 |
Called when the module is enabled. More... | |
virtual imt::base::bsp::type::ErrorCode::Id | onStart ()=0 |
Called whenever the module is started. More... | |
virtual imt::base::bsp::type::ErrorCode::Id | onStop ()=0 |
Called whenever the driver is stopped. More... | |
Interface for all modules in the BSP.
How to use: Initialize System clock before initialize module. 1) initialize()
|
inlineexplicit |
Constructor.
indexModule | Index of the module (starting at 0). |
numberOfModules | Total number of modules of this type. |
numberOfDrivers | Total number of drivers in this module. |
|
inlinevirtual |
Destructor.
|
inline |
Enable the module (but not its drivers).
This includes enabling of required interrupts and clocks. This method is called once before the runtime is started.
|
inline |
Gets the given driver.
indexDriver | The index of the driver. |
|
inline |
Gets the index of the module.
|
inline |
Gets the number of drivers provided by this module.
|
inline |
Gets the type of the module.
|
inline |
Initialize the module and all drivers.
This includes configuration of all pins this module uses as well as any interrupts and other configurations. This method is called once when the BSP is intitalized.
|
inline |
Gets if the module has been enabled.
|
inline |
Gets if the module has been initialzied.
|
inline |
Gets if the module has been started.
|
protectedpure virtual |
Called when the module is enabled.
Implemented in imt::base::bsp::module::UsartModule, imt::base::bsp::module::SpiModule, imt::base::bsp::module::PwmModule, imt::base::bsp::module::I2CModule, imt::base::bsp::module::HighLevelModule, imt::base::bsp::module::GpioModule, imt::base::bsp::module::DacModule, imt::base::bsp::module::CanModule, and imt::base::bsp::module::AdcModule.
|
protectedpure virtual |
Called when the module is initialized.
Implemented in imt::base::bsp::module::UsartModule, imt::base::bsp::module::SpiModule, imt::base::bsp::module::PwmModule, imt::base::bsp::module::I2CModule, imt::base::bsp::module::HighLevelModule, imt::base::bsp::module::GpioModule, imt::base::bsp::module::DacModule, imt::base::bsp::module::CanModule, and imt::base::bsp::module::AdcModule.
|
protectedpure virtual |
Called whenever the module is started.
Implemented in imt::base::bsp::module::UsartModule, imt::base::bsp::module::SpiModule, imt::base::bsp::module::PwmModule, imt::base::bsp::module::I2CModule, imt::base::bsp::module::HighLevelModule, imt::base::bsp::module::GpioModule, imt::base::bsp::module::DacModule, imt::base::bsp::module::CanModule, and imt::base::bsp::module::AdcModule.
|
protectedpure virtual |
Called whenever the driver is stopped.
Implemented in imt::base::bsp::module::UsartModule, imt::base::bsp::module::SpiModule, imt::base::bsp::module::PwmModule, imt::base::bsp::module::I2CModule, imt::base::bsp::module::HighLevelModule, imt::base::bsp::module::GpioModule, imt::base::bsp::module::DacModule, imt::base::bsp::module::CanModule, and imt::base::bsp::module::AdcModule.
|
inline |
Starts the module.
This method may be called during runtime. This will NOT call start on each driver !
|
inline |
Stops the module.
This method may be called during runtime. This will NOT call stop on each driver !
|
static |
Constant holding the driver type.