Dataflow Runtime API  3.0.3.0
Public Member Functions | Protected Member Functions | List of all members
imt::base::bsp::driver::DacDriver Class Reference

Driver to access a single DAC output. More...

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

Inheritance diagram for imt::base::bsp::driver::DacDriver:
imt::base::bsp::module::DriverAbs< imt::base::bsp::type::DriverType::DAC >

Public Member Functions

 DacDriver (const size_t indexModule, const size_t indexChannel)
 Constructor. More...
 
virtual ~DacDriver (void)
 Destructor. More...
 
uint32_t getValue (void) const
 Gets the last set value of the output. More...
 
imt::base::bsp::type::ErrorCode::Id write (uint32_t value)
 Writes the value to the output. More...
 
- Public Member Functions inherited from imt::base::bsp::module::DriverAbs< imt::base::bsp::type::DriverType::DAC >
 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 void onInitialize (void)
 
virtual void onEnable (void)
 
virtual imt::base::bsp::type::ErrorCode::Id onStart (void)
 
virtual imt::base::bsp::type::ErrorCode::Id onStop (void)
 

Additional Inherited Members

- Static Public Attributes inherited from imt::base::bsp::module::DriverAbs< imt::base::bsp::type::DriverType::DAC >
static const imt::base::bsp::type::DriverType::Id Type
 Constant holding the driver type. More...
 

Detailed Description

Driver to access a single DAC output.

Constructor & Destructor Documentation

◆ DacDriver()

imt::base::bsp::driver::DacDriver::DacDriver ( const size_t  indexModule,
const size_t  indexChannel 
)
explicit

Constructor.

Parameters
indexModuleIndex of the module (starting at 0).
indexChannelIndex of the channel (starting at 0).

◆ ~DacDriver()

virtual imt::base::bsp::driver::DacDriver::~DacDriver ( void  )
virtual

Destructor.

Member Function Documentation

◆ getValue()

uint32_t imt::base::bsp::driver::DacDriver::getValue ( void  ) const

Gets the last set value of the output.

Returns
Last set value or 0 if it has never been set.

◆ onEnable()

virtual void imt::base::bsp::driver::DacDriver::onEnable ( void  )
protectedvirtual

◆ onInitialize()

virtual void imt::base::bsp::driver::DacDriver::onInitialize ( void  )
protectedvirtual

◆ onStart()

virtual imt::base::bsp::type::ErrorCode::Id imt::base::bsp::driver::DacDriver::onStart ( void  )
protectedvirtual

◆ onStop()

virtual imt::base::bsp::type::ErrorCode::Id imt::base::bsp::driver::DacDriver::onStop ( void  )
protectedvirtual

◆ write()

imt::base::bsp::type::ErrorCode::Id imt::base::bsp::driver::DacDriver::write ( uint32_t  value)

Writes the value to the output.

Parameters
valueThe raw DAC counts.
Returns
OK Value could be written. UNINITIALIZED Output is not a valid DAC. INVALID_STATE Driver is not started.

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