#include <src/sensors/ProcessorStats.h>
ProcessorStats
class
The main class to use the main processor (MCU) as a sensor.
- Reference
- Detailed Descriptions
Base classes
- class Sensor
- The "Sensor" class is used for all sensor-level operations - waking, sleeping, and taking measurements.
Constructors, destructors, conversion operators
- ProcessorStats(const char* version) explicit
- Construct a new Processor Stats object.
- ~ProcessorStats()
- Destroy the Processor Stats object.
Public functions
- String getSensorLocation(void) -> String override
- Get the pin or connection location between the mcu and the sensor.
- bool addSingleMeasurementResult(void) -> bool override
- Get the results from a single measurement.
Function documentation
ProcessorStats:: ProcessorStats(const char* version) explicit
Construct a new Processor Stats object.
Parameters | |
---|---|
version | The version of the MCU, if applicable.
|
Need to know the Mayfly version because the battery resistor depends on it
String ProcessorStats:: getSensorLocation(void) override
Get the pin or connection location between the mcu and the sensor.
Returns | String Text describing how the sensor is attached to the mcu. |
---|
This returns the processor name as read from the compiler variable.
bool ProcessorStats:: addSingleMeasurementResult(void) override
Get the results from a single measurement.
Returns | bool True if the function completed successfully. |
---|
This asks the sensor for a new result, verifies that it passes sanity range checks, and then adds the value to the result array.
This also un-sets the _