Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
Loading...
Searching...
No Matches
kcenon::monitoring::battery_reading Struct Reference

A single battery reading. More...

#include <battery_collector.h>

Collaboration diagram for kcenon::monitoring::battery_reading:
Collaboration graph

Public Attributes

battery_info info
 Battery information.
 
double level_percent {0.0}
 Current charge percentage (0-100)
 
battery_status status {battery_status::unknown}
 Current charging status.
 
bool is_charging {false}
 True if battery is charging.
 
bool ac_connected {false}
 True if AC power is connected.
 
int64_t time_to_empty_seconds {-1}
 Estimated time to empty (-1 if unavailable)
 
int64_t time_to_full_seconds {-1}
 Estimated time to full (-1 if unavailable)
 
double design_capacity_wh {0.0}
 Original design capacity in Wh.
 
double full_charge_capacity_wh {0.0}
 Current full charge capacity in Wh.
 
double current_capacity_wh {0.0}
 Current energy stored in Wh.
 
double health_percent {0.0}
 Battery health (full_charge/design * 100)
 
double voltage_volts {0.0}
 Current voltage in Volts.
 
double current_amps {0.0}
 Current in Amps (positive=charging)
 
double power_watts {0.0}
 Current power in Watts.
 
double temperature_celsius {0.0}
 Battery temperature in Celsius.
 
bool temperature_available {false}
 Whether temperature is available.
 
int64_t cycle_count {-1}
 Battery charge cycles (-1 if unavailable)
 
bool battery_present {false}
 Whether battery is present.
 
bool metrics_available {false}
 Whether metrics are available.
 
std::chrono::system_clock::time_point timestamp
 Reading timestamp.
 

Detailed Description

A single battery reading.

Definition at line 81 of file battery_collector.h.

Member Data Documentation

◆ ac_connected

bool kcenon::monitoring::battery_reading::ac_connected {false}

True if AC power is connected.

Definition at line 88 of file battery_collector.h.

88{false};

◆ battery_present

bool kcenon::monitoring::battery_reading::battery_present {false}

Whether battery is present.

Definition at line 113 of file battery_collector.h.

113{false};

◆ current_amps

double kcenon::monitoring::battery_reading::current_amps {0.0}

Current in Amps (positive=charging)

Definition at line 102 of file battery_collector.h.

102{0.0};

◆ current_capacity_wh

double kcenon::monitoring::battery_reading::current_capacity_wh {0.0}

Current energy stored in Wh.

Definition at line 97 of file battery_collector.h.

97{0.0};

◆ cycle_count

int64_t kcenon::monitoring::battery_reading::cycle_count {-1}

Battery charge cycles (-1 if unavailable)

Definition at line 110 of file battery_collector.h.

110{-1};

◆ design_capacity_wh

double kcenon::monitoring::battery_reading::design_capacity_wh {0.0}

Original design capacity in Wh.

Definition at line 95 of file battery_collector.h.

95{0.0};

◆ full_charge_capacity_wh

double kcenon::monitoring::battery_reading::full_charge_capacity_wh {0.0}

Current full charge capacity in Wh.

Definition at line 96 of file battery_collector.h.

96{0.0};

◆ health_percent

double kcenon::monitoring::battery_reading::health_percent {0.0}

Battery health (full_charge/design * 100)

Definition at line 98 of file battery_collector.h.

98{0.0};

◆ info

battery_info kcenon::monitoring::battery_reading::info

Battery information.

Definition at line 82 of file battery_collector.h.

◆ is_charging

bool kcenon::monitoring::battery_reading::is_charging {false}

True if battery is charging.

Definition at line 87 of file battery_collector.h.

87{false};

◆ level_percent

double kcenon::monitoring::battery_reading::level_percent {0.0}

Current charge percentage (0-100)

Definition at line 85 of file battery_collector.h.

85{0.0};

◆ metrics_available

bool kcenon::monitoring::battery_reading::metrics_available {false}

Whether metrics are available.

Definition at line 114 of file battery_collector.h.

114{false};

◆ power_watts

double kcenon::monitoring::battery_reading::power_watts {0.0}

Current power in Watts.

Definition at line 103 of file battery_collector.h.

103{0.0};

◆ status

battery_status kcenon::monitoring::battery_reading::status {battery_status::unknown}

Current charging status.

Definition at line 86 of file battery_collector.h.

◆ temperature_available

bool kcenon::monitoring::battery_reading::temperature_available {false}

Whether temperature is available.

Definition at line 107 of file battery_collector.h.

107{false};

◆ temperature_celsius

double kcenon::monitoring::battery_reading::temperature_celsius {0.0}

Battery temperature in Celsius.

Definition at line 106 of file battery_collector.h.

106{0.0};

◆ time_to_empty_seconds

int64_t kcenon::monitoring::battery_reading::time_to_empty_seconds {-1}

Estimated time to empty (-1 if unavailable)

Definition at line 91 of file battery_collector.h.

91{-1};

◆ time_to_full_seconds

int64_t kcenon::monitoring::battery_reading::time_to_full_seconds {-1}

Estimated time to full (-1 if unavailable)

Definition at line 92 of file battery_collector.h.

92{-1};

◆ timestamp

std::chrono::system_clock::time_point kcenon::monitoring::battery_reading::timestamp

Reading timestamp.

Definition at line 116 of file battery_collector.h.

◆ voltage_volts

double kcenon::monitoring::battery_reading::voltage_volts {0.0}

Current voltage in Volts.

Definition at line 101 of file battery_collector.h.

101{0.0};

The documentation for this struct was generated from the following file: