Struct MsgBattery

Struct Documentation

struct MsgBattery

Public Types

enum class Ignition : uint8_t

Values:

enumerator Unknown
enumerator Off
enumerator Accessory
enumerator Run
enumerator Start

Public Functions

inline void reset()
inline void setSocPercent(float pc)
inline bool socValid() const
inline float socPercent() const
inline void setVoltageVolts(float volts)
inline bool voltageValid() const
inline float voltageVolts() const
inline void setCurrentAmps(float amps)
inline bool currentValid() const
inline float currentAmps() const
inline void setTemperatureDegC(float deg_c)
inline bool temperatureValid() const
inline float temperatureDegC() const
inline void setCrc()
inline bool validCrc() const
inline bool validRc(uint8_t rc) const

Public Members

uint16_t soc
Ignition ignition
uint16_t voltage
int16_t current
uint16_t __pad0__
uint8_t temperature
uint8_t __pad1__
uint8_t rc
uint8_t crc

Public Static Attributes

static constexpr uint32_t ID = 0x2C9
static constexpr size_t PERIOD_MS = 100
static constexpr size_t TIMEOUT_MS = 350