INTRODUCTION Overview Download and Install Documentation Publications REPOSITORY Libraries DEVELOPER Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
gbxsmartbatteryacfr Namespace ReferenceSmartBattery library. More...
Detailed DescriptionSmartBattery library.This namespace is part of a SmartBattery library.
Enumeration Type DocumentationSmart battery data specification Specs can be found at http://sbs-forum.org/specs/
Function Documentation
Updates all fields in 'to' with data from 'from'. Also reaps batteries in 'to' if they are not in 'from'. Has persistence capabilities: if fields in 'from' are not set and corresponding fields in 'to' are set, the ones in 'to' are kept. Use case: a class stores 'to' as a member variable, receives the latest records into 'from', calls this function to update 'to'. The reaping capability makes sure that battery modules which are no longer connected don't persist.
Converts a key (string) to a SmartBatteryDataField. Throws a ParsingException if key is unknown.
Expects 2 hex characters and translates them into a vector of boolean flags May throw ParsingException
Expects 4 hex characters, returns temperature [degC] May throw ParsingException
Expects 4 hex characters, returns current [A] May throw ParsingException
Expects 4 hex characters, returns voltage [V] May throw ParsingException
Expects 2 hex characters, returns number of batteries May throw ParsingException
Expects 4 hex characters, returns percentage [%] May throw ParsingException
Expects 2 hex characters, returns percentage [%] May throw ParsingException
Expects 4 hex characters, returns minutes May throw ParsingException
Expects 4 hex characters, returns capacity [%] May throw ParsingException
Expects 4 hex characters, translates them into uint16_t May throw ParsingException
Expects 4 hex characters, returns a count May throw ParsingException
Expects 4 hex characters, returns a number May throw ParsingException
Expects 4 hex characters, returns a rate May throw ParsingException
Computes an XOR checksum from 'input' (skips the first character). Returns true if it matches with 'expected', otherwise false
Decomposes 'fields' (a flat list of keys and values) into 'pairs' (a map of keys and values). May throw ParsingException.
|