public BleWriteAttribute(BleProtocol ble, SerialPort port, byte connection, ushort attributeHandle, Bytes value) : base(ble, port) { this.Connection = connection; this.AttributeHandle = attributeHandle; this.Value = value; }
public BleWriteAttribute (BleProtocol ble, SerialPort port, byte connection, ushort attributeHandle, Bytes value) : base (ble, port) { this.Connection = connection; this.AttributeHandle = attributeHandle; this.Value = value; }
private void Client_OnCharacteristicChanged(object sender, ushort handle, byte[] value) { TraceEvent(((wclGattClient)sender).Address, "ValueChanged", "Handle", handle.ToString("X4")); if (value == null) { TraceEvent(0, "", "Value", ""); } else if (value.Length == 0) { TraceEvent(0, "", "Value", ""); } else { var str = ""; for (var i = 0; i < value.Length; i++) { str = str + value[i].ToString("X2"); } BleProtocol.PackageAnalyze(value); if (BleProtocol.Record != null) { var record = BleProtocol.Record; string sOperType = ""; switch (record.OperationType) { case 1: sOperType = "密码"; break; case 2: sOperType = "刷卡"; break; case 3: sOperType = "指纹"; break; default: break; } var item = lvOperationRecord.Items.Add(record.Date.ToString()); item.SubItems.Add(record.UserId.ToString()); item.SubItems.Add(sOperType); item.SubItems.Add(record.UserType.ToString()); BleProtocol.Record = null; WriteCommand(val_GetRecord); //20180823 zy } TraceEvent(0, "", "Value", str); } }
public BleDisconnectFromService (BleProtocol ble, SerialPort port, byte connection) : base (ble, port) { this.Connection = connection; }
public BleDisconnectFromService(BleProtocol ble, SerialPort port, byte connection) : base(ble, port) { this.Connection = connection; }
public BleConnectToService (BleProtocol ble, SerialPort port, Bytes service, byte address) : base (ble, port) { this.ServiceUUID = service; this.Address = address; }
public BleReadAttribute(BleProtocol ble, SerialPort port, byte connection, ushort attributeHandle) : base(ble, port) { this.Connection = connection; this.AttributeHandle = attributeHandle; }
public BleFindServicesAndCharacteristics (BleProtocol ble, SerialPort port, byte connection) : base (ble, port) { this.Connection = connection; }
protected BleBlock (BleProtocol ble, SerialPort port) { this.Ble = ble; this.Port = port; }
/// <summary> /// 设置系统时间 /// </summary> public static void SetCurrentTime() { byte[] package = BleProtocol.GetUpdateTimePackage(); EventClass.GetInstance().WriteCommand(package); RecordLog.GetInstance().WriteLog(Level.Info, "设置时间行为结束"); }
public BleReadAttribute (BleProtocol ble, SerialPort port, byte connection, ushort attributeHandle) : base (ble, port) { this.Connection = connection; this.AttributeHandle = attributeHandle; }
public BleDiscoverService(BleProtocol ble, SerialPort port, Bytes service) : base(ble, port) { this.ServiceUUID = service; }
protected BleBlock(BleProtocol ble, SerialPort port) { this.Ble = ble; this.Port = port; }
private void btSetTime_Click(object sender, EventArgs e) { var package = BleProtocol.GetUpdateTimePackage(); WriteCommand(package); }
public BleConnectToService(BleProtocol ble, SerialPort port, Bytes service, byte address) : base(ble, port) { this.ServiceUUID = service; this.Address = address; }
public BleFindServicesAndCharacteristics(BleProtocol ble, SerialPort port, byte connection) : base(ble, port) { this.Connection = connection; }
public BleDiscoverService (BleProtocol ble, SerialPort port, Bytes service) : base (ble, port) { this.ServiceUUID = service; }