Datalogic .NET SDK
BatteryInfo (Sub-Class)
Syntax
public sealed class BatteryInfo
Overview
This is used to retrieve smart battery information.
Constructors |
|
|
None |
Public Members |
|
|
Type |
Name |
Description |
UInt32 |
Capacity |
The estimated capacity of the main battery. |
UInt16 |
Year |
The year the main battery was manufactured. |
UInt16 |
Week |
The week the battery was manufactured. |
String |
SerialNumber |
The battery serial number. |
String |
Manufacturer |
The battery manufacturer. |
Example
private void btnBatteryInfo_Click(object sender, EventArgs e) { bool b = false; Device.BatteryInfo dvcBattInfo = new Device.BatteryInfo(); b = Device.GetBatteryInfo(out dvcBattInfo);
listView1.Items.Add(new ListViewItem(new string[] { "Battery Capacity", dvcBattInfo.Capacity.ToString() })); listView1.Items.Add(new ListViewItem(new string[] { "Battery Manufacturer", dvcBattInfo.Manufacturer })); listView1.Items.Add(new ListViewItem(new string[] { "Battery SerialNumber", dvcBattInfo.SerialNumber })); listView1.Items.Add(new ListViewItem(new string[] { "Battery Week", dvcBattInfo.Week.ToString()})); listView1.Items.Add(new ListViewItem(new string[] { "Battery Year", dvcBattInfo.Year.ToString() })); }
|
See Also
Device.GetBatteryInfo (Method), Example #024.
Copyright © Datalogic ADC. All Right Reserved