33#include <NDEVR/Device.h>
A device which has an accociated voltage or percent that changes. Can have set upper and lower.
Definition Battery.h:83
virtual BatteryState batteryState() const
void addBatteryGroupMember(Battery *battery)
void setIsCharging(bool is_charging)
virtual fltp04 batteryLevel(BatteryCapacityType type) const
bool m_is_charging
Definition Battery.h:110
Battery(const Model &name, ProgressInfo *log, QObject *parent=nullptr)
Time m_last_state_stable_time
Definition Battery.h:106
void setCapacityInfo(BatteryCapacityType type, const BatteryCapacityInfo &info)
virtual BatteryState batteryGroupState() const
Buffer< Battery * > m_battery_group_members
Definition Battery.h:104
void batteryStateChangedSignal()
void batteryGroupStateChangedSignal(bool originator)
BatteryState m_bat_state
Definition Battery.h:107
BatteryState m_bat_group_state
Definition Battery.h:108
void showWarning(const TranslatedString &warning) const override
virtual void setBatteryLevel(BatteryCapacityType type, fltp04 value)
BatteryCapacityInfo capacityInfo(BatteryCapacityType type) const
Vector< 3, BatteryCapacityInfo > m_capacity_info
Definition Battery.h:105
BatteryState m_forced_bat_state
Definition Battery.h:109
virtual void autoUpdateBatteryState(BatteryCapacityType mode)
virtual void forceBatteryState(const BatteryState &state)
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:59
JavaScript Object Notation or JSON is an open - standard file format that uses human - readable text ...
Definition JSONParser.h:60
A core class that represents a node on model heirarchy. This node may contain a Geometry or.
Definition Model.h:58
A light-weight base class for Log that allows processes to update, without the need for.
Definition ProgressInfo.hpp:48
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:54
Any text displayed to the user should be defined as a TranslatedString which allows the.
Definition TranslatedString.h:13
A fixed-size array with better performance compared to dynamic containers.
Definition Vector.hpp:60
BatteryCapacityType
The various types of capacity information a Battery may have.
Definition Battery.h:55
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:125
BatteryState
An indication of what state a Battery object is in.
Definition Battery.h:43
For a given BatteryCapacityType, the limits that define the state of the battery.
Definition Battery.h:64
void toJSONNode(JSONNode &node) const
void fromJSONNode(const JSONNode &node)
bool canChangeBatteryState() const
bool operator!=(const BatteryCapacityInfo &info) const
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved.
Definition BaseValues.hpp:230