INTRODUCTION Overview Download and Install Documentation Publications REPOSITORY Libraries DEVELOPER Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
gbxsmartbatteryacfr Namespace Reference SmartBattery library. More...
Detailed DescriptionEnumeration Type Documentation◆ SmartBatteryDataFieldSmart battery data specification Specs can be found at http://sbs-forum.org/specs/ Function Documentation◆ checkCharges()
Issues a short and verbose warning if the charge of one or more batteries is below the threshold or if the charge of any battery deviates by chargeDeviationThreshold percent from the average of all batteries Returns true if there was a warning otherwise false ◆ checkModuleHealth()
Issues a short and verbose warning if any of the individual modules have "bad power" or are "charge-inhibited" Returns true if there was a warning otherwise false ◆ checkNumberOfBatteries()
Issues a short and verbose warning if the number of expected batteries are not installed Returns true if there was a warning otherwise false References gbxsmartbatteryacfr::OceanServerSystem::availableBatteries(), gbxsmartbatteryacfr::OceanServerSystem::batteries(), gbxsmartbatteryacfr::OceanServerSystem::battery(), gbxsmartbatteryacfr::OceanServerSystem::chargeInhibitedStates(), gbxsmartbatteryacfr::OceanServerSystem::chargingStates(), checkNumberOfBatteries(), isChargePowerPresent(), gbxsmartbatteryacfr::OceanServerSystem::percentCharge(), gbxsmartbatteryacfr::OceanServerSystem::powerNoGoodStates(), and gbxsmartbatteryacfr::OceanServerSystem::rawRecord(). Referenced by checkNumberOfBatteries(), and conductAllHealthChecks(). ◆ checkNumCycles()
Issues a short and verbose warning if the number of recharge cycles of one or more batteries are exceeded Optionally includes the raw battery record in warnVerbose Returns true if there was a warning otherwise false ◆ checkTemperatures()
Issues a short and verbose warning if the temperature threshholds are of one or more batteries are exceeded Optionally includes the raw battery record in warnVerbose Returns true if there was a warning otherwise false ◆ conductAllHealthChecks()
Conducts all of the health checks above given a battery health configuration Adds up short and verbose warning messages Optionally includes the raw battery record at the end of warnVerbose if any check generated a warning Returns true if there were warnings otherwise false References gbxsmartbatteryacfr::BatteryHealthWarningConfig::chargeDeviationThreshold, gbxsmartbatteryacfr::BatteryHealthWarningConfig::chargeTempThreshhold, gbxsmartbatteryacfr::BatteryHealthWarningConfig::chargeWarnThreshhold, checkNumberOfBatteries(), conductAllHealthChecks(), gbxsmartbatteryacfr::BatteryHealthWarningConfig::dischargeTempThreshhold, gbxsmartbatteryacfr::BatteryHealthWarningConfig::expectedNumBatteries, gbxsmartbatteryacfr::BatteryHealthWarningConfig::numCyclesThreshhold, and gbxsmartbatteryacfr::OceanServerSystem::rawRecord(). Referenced by conductAllHealthChecks(). ◆ isChecksumValid()
Computes an XOR checksum from 'input' (skips the first character). Returns true if it matches with 'expected', otherwise false ◆ keyToSmartField()
Converts a key (string) to a SmartBatteryDataField. Throws a ParsingException if key is unknown. ◆ read16Flags()
Expects 4 hex characters, translates them into uint16_t May throw ParsingException ◆ readCapacity()
Expects 4 hex characters, returns capacity [%] May throw ParsingException ◆ readCount()
Expects 4 hex characters, returns a count May throw ParsingException ◆ readCurrent()
Expects 4 hex characters, returns current [A] May throw ParsingException ◆ readFlags()
Expects 2 hex characters and translates them into a vector of boolean flags May throw ParsingException ◆ readMinutes()
Expects 4 hex characters, returns minutes May throw ParsingException ◆ readNumBatteries()
Expects 2 hex characters, returns number of batteries May throw ParsingException ◆ readNumber()
Expects 4 hex characters, returns a number May throw ParsingException ◆ readPercentByte()
Expects 2 hex characters, returns percentage [%] May throw ParsingException ◆ readPercentWord()
Expects 4 hex characters, returns percentage [%] May throw ParsingException ◆ readRate()
Expects 4 hex characters, returns a rate May throw ParsingException ◆ readTemperature()
Expects 4 hex characters, returns temperature [degC] May throw ParsingException ◆ readVoltage()
Expects 4 hex characters, returns voltage [V] May throw ParsingException ◆ toKeyValuePairs()
Decomposes 'fields' (a flat list of keys and values) into 'pairs' (a map of keys and values). May throw ParsingException. ◆ updateWithNewData()
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. There's one exception: the rawRecord field is always updated 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. References gbxsmartbatteryacfr::OceanServerSystem::availableBatteries(), gbxsmartbatteryacfr::OceanServerSystem::batteries(), gbxsmartbatteryacfr::OceanServerSystem::battery(), gbxsmartbatteryacfr::OceanServerSystem::chargeInhibitedStates(), gbxsmartbatteryacfr::OceanServerSystem::chargePowerPresentStates(), gbxsmartbatteryacfr::OceanServerSystem::chargingStates(), gbxsmartbatteryacfr::OceanServerSystem::eraseBattery(), gbxsmartbatteryacfr::OceanServerSystem::messageToSystem(), gbxsmartbatteryacfr::OceanServerSystem::minToEmpty(), gbxsmartbatteryacfr::OceanServerSystem::percentCharge(), gbxsmartbatteryacfr::OceanServerSystem::powerNoGoodStates(), gbxsmartbatteryacfr::OceanServerSystem::rawRecord(), gbxsmartbatteryacfr::OceanServerSystem::setMessageToSystem(), gbxsmartbatteryacfr::OceanServerSystem::setMinToEmpty(), gbxsmartbatteryacfr::OceanServerSystem::setPercentCharge(), gbxsmartbatteryacfr::OceanServerSystem::supplyingPowerStates(), and updateWithNewData(). Referenced by gbxsmartbatteryacfr::OceanServerSystem::rawRecord(), updateWithNewData(), and gbxsmartbatteryacfr::OceanServer::walk(). |