trikRuntime
trikControl::Battery Class Reference

Implements battery voltage sensor for real hardware. More...

#include <battery.h>

Inheritance diagram for trikControl::Battery:
Collaboration diagram for trikControl::Battery:

Public Slots

float readVoltage () override
 
float readRawDataVoltage () override
 
- Public Slots inherited from trikControl::BatteryInterface
virtual float readVoltage ()=0
 Returns current battery voltage in volts. More...
 
virtual float readRawDataVoltage ()=0
 Returns current raw reading of battery. More...
 

Public Member Functions

 Battery (MspCommunicatorInterface &communicator)
 Constructor. More...
 
Status status () const override
 Returns current status of the device. More...
 
- Public Member Functions inherited from trikControl::DeviceInterface
 DeviceInterface ()=default
 
virtual ~DeviceInterface ()=default
 

Additional Inherited Members

- Public Types inherited from trikControl::DeviceInterface
enum  Status {
  Status::permanentFailure, Status::temporaryFailure, Status::off, Status::starting,
  Status::ready, Status::stopping
}
 Device status. More...
 
- Static Public Member Functions inherited from trikControl::DeviceInterface
static Status combine (const DeviceInterface &underlying, const DeviceInterface::Status &dependent)
 Helper method to return status of a device relying on other device to work. More...
 

Detailed Description

Implements battery voltage sensor for real hardware.

Constructor & Destructor Documentation

Battery::Battery ( MspCommunicatorInterface communicator)

Constructor.

Parameters
communicator- I2C communicator to use to query battery status.

Member Function Documentation

float Battery::readRawDataVoltage ( )
overrideslot
float Battery::readVoltage ( )
overrideslot
Todo:
: Remove these arcane numbers, or Something may be unexpectedly summoned by them.
Battery::Status Battery::status ( ) const
overridevirtual

Returns current status of the device.

Implements trikControl::DeviceInterface.


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