Delegation wrapper that adapts Tmc9660Handler::Adc for external ownership.
More...
#include <Tmc9660AdcWrapper.h>
|
| | Tmc9660AdcWrapper (Tmc9660Handler &handler) noexcept |
| | Construct the ADC delegation wrapper.
|
| |
| | ~Tmc9660AdcWrapper () noexcept override=default |
| | Default destructor. Does not affect the handler or its ADC.
|
| |
| | Tmc9660AdcWrapper (const Tmc9660AdcWrapper &)=delete |
| | Non-copyable, non-movable (reference semantics – cannot rebind handler_).
|
| |
| Tmc9660AdcWrapper & | operator= (const Tmc9660AdcWrapper &)=delete |
| |
| | Tmc9660AdcWrapper (Tmc9660AdcWrapper &&)=delete |
| |
| Tmc9660AdcWrapper & | operator= (Tmc9660AdcWrapper &&)=delete |
| |
|
Each method delegates directly to handler_.adc().Method().
|
| bool | Initialize () noexcept override |
| |
| bool | Deinitialize () noexcept override |
| |
| hf_u8_t | GetMaxChannels () const noexcept override |
| |
| bool | IsChannelAvailable (hf_channel_id_t channel_id) const noexcept override |
| |
| hf_adc_err_t | ReadChannelV (hf_channel_id_t channel_id, float &channel_reading_v, hf_u8_t numOfSamplesToAvg=1, hf_time_t timeBetweenSamples=0) noexcept override |
| |
| hf_adc_err_t | ReadChannelCount (hf_channel_id_t channel_id, hf_u32_t &channel_reading_count, hf_u8_t numOfSamplesToAvg=1, hf_time_t timeBetweenSamples=0) noexcept override |
| |
| hf_adc_err_t | ReadChannel (hf_channel_id_t channel_id, hf_u32_t &channel_reading_count, float &channel_reading_v, hf_u8_t numOfSamplesToAvg=1, hf_time_t timeBetweenSamples=0) noexcept override |
| |
| hf_adc_err_t | ReadMultipleChannels (const hf_channel_id_t *channel_ids, hf_u8_t num_channels, hf_u32_t *readings, float *voltages) noexcept override |
| |
| hf_adc_err_t | GetStatistics (hf_adc_statistics_t &statistics) noexcept override |
| |
| hf_adc_err_t | GetDiagnostics (hf_adc_diagnostics_t &diagnostics) noexcept override |
| |
| hf_adc_err_t | ResetStatistics () noexcept override |
| |
| hf_adc_err_t | ResetDiagnostics () noexcept override |
| |
Delegation wrapper that adapts Tmc9660Handler::Adc for external ownership.
This is a pure delegation class. Every BaseAdc method simply calls the corresponding method on the Tmc9660Handler's internal Adc instance via handler_.adc(). It exists solely to allow AdcManager to own a std::unique_ptr<BaseAdc> that refers to TMC9660 ADC functionality without transferring ownership of the handler's internal objects.
- Note
- This class does NOT own or manage the Tmc9660Handler. The handler must outlive all Tmc9660AdcWrapper instances that reference it.
- See also
- Tmc9660Handler::Adc Inner class with the actual implementation.
◆ Tmc9660AdcWrapper() [1/3]
Construct the ADC delegation wrapper.
- Parameters
-
- Warning
- The handler must remain valid for the lifetime of this wrapper.
◆ ~Tmc9660AdcWrapper()
| Tmc9660AdcWrapper::~Tmc9660AdcWrapper |
( |
| ) |
|
|
overridedefaultnoexcept |
Default destructor. Does not affect the handler or its ADC.
◆ Tmc9660AdcWrapper() [2/3]
Non-copyable, non-movable (reference semantics – cannot rebind handler_).
◆ Tmc9660AdcWrapper() [3/3]
◆ Deinitialize()
| bool Tmc9660AdcWrapper::Deinitialize |
( |
| ) |
|
|
overridenoexcept |
◆ GetDiagnostics()
| hf_adc_err_t Tmc9660AdcWrapper::GetDiagnostics |
( |
hf_adc_diagnostics_t & | diagnostics | ) |
|
|
overridenoexcept |
◆ GetMaxChannels()
| hf_u8_t Tmc9660AdcWrapper::GetMaxChannels |
( |
| ) |
const |
|
overridenoexcept |
◆ GetStatistics()
| hf_adc_err_t Tmc9660AdcWrapper::GetStatistics |
( |
hf_adc_statistics_t & | statistics | ) |
|
|
overridenoexcept |
◆ Initialize()
| bool Tmc9660AdcWrapper::Initialize |
( |
| ) |
|
|
overridenoexcept |
◆ IsChannelAvailable()
| bool Tmc9660AdcWrapper::IsChannelAvailable |
( |
hf_channel_id_t | channel_id | ) |
const |
|
overridenoexcept |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ ReadChannel()
| hf_adc_err_t Tmc9660AdcWrapper::ReadChannel |
( |
hf_channel_id_t | channel_id, |
|
|
hf_u32_t & | channel_reading_count, |
|
|
float & | channel_reading_v, |
|
|
hf_u8_t | numOfSamplesToAvg = 1, |
|
|
hf_time_t | timeBetweenSamples = 0 ) |
|
overridenoexcept |
◆ ReadChannelCount()
| hf_adc_err_t Tmc9660AdcWrapper::ReadChannelCount |
( |
hf_channel_id_t | channel_id, |
|
|
hf_u32_t & | channel_reading_count, |
|
|
hf_u8_t | numOfSamplesToAvg = 1, |
|
|
hf_time_t | timeBetweenSamples = 0 ) |
|
overridenoexcept |
◆ ReadChannelV()
| hf_adc_err_t Tmc9660AdcWrapper::ReadChannelV |
( |
hf_channel_id_t | channel_id, |
|
|
float & | channel_reading_v, |
|
|
hf_u8_t | numOfSamplesToAvg = 1, |
|
|
hf_time_t | timeBetweenSamples = 0 ) |
|
overridenoexcept |
◆ ReadMultipleChannels()
| hf_adc_err_t Tmc9660AdcWrapper::ReadMultipleChannels |
( |
const hf_channel_id_t * | channel_ids, |
|
|
hf_u8_t | num_channels, |
|
|
hf_u32_t * | readings, |
|
|
float * | voltages ) |
|
overridenoexcept |
◆ ResetDiagnostics()
| hf_adc_err_t Tmc9660AdcWrapper::ResetDiagnostics |
( |
| ) |
|
|
overridenoexcept |
◆ ResetStatistics()
| hf_adc_err_t Tmc9660AdcWrapper::ResetStatistics |
( |
| ) |
|
|
overridenoexcept |
◆ handler_
Reference to the TMC9660 handler (not owned).
The documentation for this class was generated from the following files: