Struct MsgBatteryTraction

Struct Documentation

struct MsgBatteryTraction

Public Types

enum class ChargeStatus : uint8_t

Values:

enumerator Unknown
enumerator NotCharging
enumerator Charging
enumerator Complete
enumerator Fault

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
ChargeStatus status
uint16_t voltage
int16_t current
uint8_t __pad0__
uint8_t temperature
uint8_t __pad1__
uint8_t rc
uint8_t crc

Public Static Attributes

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