CLCmdDeviceInfo.from constructor
CLCmdDeviceInfo.from()
Implementation
factory CLCmdDeviceInfo.from(PERIPHERAL_DEVICE_INFO_CONTEXT v) {
StringBuffer buffer = StringBuffer();
for (int i = 0; i < MAC_ADDR_NUM; i++) {
buffer.write(v.mac[MAC_ADDR_NUM - 1 - i].toRadixString(16));
if (i < MAC_ADDR_NUM - 1) {
buffer.write(':');
}
}
final p = CLCmdDeviceInfo(
touchVersion: v.touchVersion.str64,
softwareVersion: v.softwareVersion.str64,
radioVersion: v.radioVersion.str64,
clingId: v.clingId.str64,
modelNumber: v.modelNumber.str64,
batteryLevel: v.batteryLevel,
memoryAvailable: v.memoryAvailable,
fileAvailable: v.fileAvailable,
bondUserID: v.bondUserID,
bondEpoch: v.bondEpoch,
resetCount: v.resetCount,
clkfaceIndex0: v.clkfaceIndex0,
clkfaceIndex1: v.clkfaceIndex1,
gps_blk_count: v.gps_blk_count,
minuteStreamingFile: v.minuteStreamingFile,
clkfaceIndex2: v.clkfaceIndex2,
clkfaceIndex3: v.clkfaceIndex3,
flashtype: v.flashtype,
validMac: v.validMac,
mac: buffer.toString());
return p;
}