|
HF-Core Platform 0.1.0-dev
Hardware-Agnostic Handler Layer & RTOS Utilities for HardFOC
|
BaseTemperature adapter for the TMC9660 internal chip temperature sensor. More...
#include <Tmc9660Handler.h>
Public Member Functions | |
| Temperature (Tmc9660Handler &parent) | |
| Construct the temperature wrapper. | |
| ~Temperature () noexcept override=default | |
| Default destructor. | |
BaseTemperature Interface Implementation | |
| bool | Initialize () noexcept override |
| Initialize (verifies parent driver is ready). | |
| bool | Deinitialize () noexcept override |
| Deinitialize (no-op). | |
| hf_temp_err_t | ReadTemperatureCelsiusImpl (float *temperature_celsius) noexcept override |
| Read the chip temperature in degrees Celsius. | |
| hf_temp_err_t | GetSensorInfo (hf_temp_sensor_info_t *info) const noexcept override |
| Get sensor information (type, range, resolution, accuracy). | |
| hf_u32_t | GetCapabilities () const noexcept override |
| Get sensor capabilities flags. | |
Private Member Functions | |
| hf_temp_err_t | UpdateStatistics (hf_temp_err_t result, uint64_t start_time_us) noexcept |
| Update operation timing statistics. | |
| uint64_t | GetCurrentTimeUs () const noexcept |
| Get current time in microseconds. | |
| void | UpdateDiagnostics (hf_temp_err_t error) noexcept |
| Update error diagnostics. | |
Private Attributes | |
| Tmc9660Handler & | parent_ |
| Owning handler. | |
| RtosMutex | mutex_ |
| Thread-safety for statistics. | |
| hf_temp_statistics_t | statistics_ |
| Accumulated operation statistics. | |
| hf_temp_diagnostics_t | diagnostics_ |
| Health and error diagnostics. | |
| std::atomic< hf_temp_err_t > | last_error_ |
| Most recent error code. | |
BaseTemperature adapter for the TMC9660 internal chip temperature sensor.
Reads the TMC9660's built-in chip temperature via the telemetry subsystem and presents it through the standard HardFOC BaseTemperature interface. Includes thread-safe statistics and diagnostics tracking.
Sensor specifications:
| Tmc9660Handler::Temperature::Temperature | ( | Tmc9660Handler & | parent | ) |
Construct the temperature wrapper.
| parent | Reference to the owning Tmc9660Handler. |
|
overridedefaultnoexcept |
Default destructor.
|
overridenoexcept |
Deinitialize (no-op).
|
overridenoexcept |
Get sensor capabilities flags.
|
privatenoexcept |
Get current time in microseconds.
|
overridenoexcept |
Get sensor information (type, range, resolution, accuracy).
| [out] | info | Pointer to store the sensor info struct. |
|
overridenoexcept |
Initialize (verifies parent driver is ready).
|
overridenoexcept |
Read the chip temperature in degrees Celsius.
| [out] | temperature_celsius | Pointer to store the temperature reading. |
|
privatenoexcept |
Update error diagnostics.
|
privatenoexcept |
Update operation timing statistics.
|
mutableprivate |
Health and error diagnostics.
|
private |
Most recent error code.
|
mutableprivate |
Thread-safety for statistics.
|
private |
Owning handler.
|
mutableprivate |
Accumulated operation statistics.