COSMOS core
1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
|
Battery (BATT) structure. More...
#include <jsondef.h>
Public Member Functions | |
json11::Json | to_json () const |
Convert class contents to JSON object. More... | |
void | from_json (const string &s) |
Set class contents from JSON string. More... | |
Public Attributes | |
float | capacity = 0.f |
Capacity in amp hours. More... | |
float | efficiency = 0.f |
Charge conversion efficiency. More... | |
float | charge = 0.f |
Charge in amp hours. More... | |
float | r_in = 0.f |
Resistance in. More... | |
float | r_out = 0.f |
Resistance out. More... | |
float | percentage = 0.f |
Battery Percentage Remaining. More... | |
float | time_remaining = 0.f |
Time Remaining. More... | |
Battery (BATT) structure.
|
inline |
|
inline |
Set class contents from JSON string.
Parses the provided JSON-formatted string and sets the class data. String should be formatted like the string returned from to_json()
s | JSON-formatted string to set class contents to |
float battstruc::capacity = 0.f |
Capacity in amp hours.
float battstruc::efficiency = 0.f |
Charge conversion efficiency.
float battstruc::charge = 0.f |
Charge in amp hours.
float battstruc::r_in = 0.f |
Resistance in.
float battstruc::r_out = 0.f |
Resistance out.
float battstruc::percentage = 0.f |
Battery Percentage Remaining.
float battstruc::time_remaining = 0.f |
Time Remaining.