Class BatteryHealth
- Namespace
- TechnologySolutions.Rfid.AsciiProtocol
- Assembly
- TechnologySolutions.Rfid.AsciiProtocol.Core.dll
Provides advanced battery health information from the BatteryStatusCommand.
public class BatteryHealth
- Inheritance
-
BatteryHealth
- Inherited Members
Remarks
This class is used to parse the BH response header which is reported by the BatteryStatusCommand (BatteryHealth) when the ReportBatteryHealth is set to true. The battery health may not be immediately available HasValues will be true when battery health metrics are returned in the response
Properties
BatteryStyle
Gets the battery style (the type of battery)
public string BatteryStyle { get; }
Property Value
Remarks
Known types include
- PH. Battery is a power handle
- SB. 1166 battery
- XL. Standard Varta XL battery (e.g. 1128 / IH21)
CycleCount
Gets the number of times the battery has been charged or null (Nothing in Visual Basic) if not available
public int? CycleCount { get; }
Property Value
- int?
DateOfManufacture
Gets the date of the manufacturer of the battery (where available)
public string DateOfManufacture { get; }
Property Value
DesignCapacity
Gets the (original) design capacity of the battery in mAh or null (Nothing in Visual Basic) if not available
public int? DesignCapacity { get; }
Property Value
- int?
FullyChargedCapacity
Gets the predicted capacity of the battery when fully charged in mAh or null (Nothing in Visual Basic) if not available
public int? FullyChargedCapacity { get; }
Property Value
- int?
HasValues
Gets a value indicating whether the battery health report is reporting valid values
public bool HasValues { get; }
Property Value
Raw
Gets the raw status as reported by the ASCII Protocol
public string Raw { get; }
Property Value
RemainingCapacity
Gets the remaining capacity of the current charge of the battery in mAh or null (Nothing in Visual Basic) if not available
public int? RemainingCapacity { get; }
Property Value
- int?
Remarks
Percentage remain of charge is RemainingCapacity/FullyChargedCapacity
SerialNumber
Gets the serial number of the battery (where available) or null (Nothing in Visual Basic) if not available
public string SerialNumber { get; }
Property Value
StateOfHealth
Gets the state of health (%) of the battery or null (Nothing in Visual Basic) if not available
public int? StateOfHealth { get; }
Property Value
- int?
Voltage
Gets the reported battery voltage in mV or null (Nothing in Visual Basic) if not available
public int? Voltage { get; }
Property Value
- int?
Methods
Parse(string)
Attempts to parse the reported battery health
public static BatteryHealth Parse(string value)
Parameters
value
stringThe health status as reported by the ASCII Protocol
Returns
Exceptions
- FormatException
If an error is encountered while parsing the value