| | |
| | | namespace HDL_ON |
| | | { |
| | | |
| | | public class MyBlufiClient |
| | | public class MyBlufiClient |
| | | { |
| | | |
| | | HdlBluWi share; |
| | |
| | | |
| | | //public string GetPer() |
| | | //{ |
| | | //share. |
| | | //share. |
| | | //} |
| | | |
| | | |
| | |
| | | /// <summary> |
| | | /// 设备搜索到蓝牙设备之后到代理事件 |
| | | /// </summary> |
| | | public void SetBlufiDeviceDelegate(Action<string,string> action) |
| | | public void SetBlufiDeviceDelegate(Action<string, string> action) |
| | | { |
| | | getBlufiDeviceDelegate = new FBYBleDeviceBackBlock((arg0) => { |
| | | action?.Invoke(arg0.Name,arg0.Uuid.ToString()); |
| | | if (!string.IsNullOrEmpty(arg0.Name)&& arg0.Name.Contains("BLU")) |
| | | getBlufiDeviceDelegate = new FBYBleDeviceBackBlock((arg0) => |
| | | { |
| | | action?.Invoke(arg0.Name, arg0.Uuid.ToString()); |
| | | if (!string.IsNullOrEmpty(arg0.Name) && arg0.Name.Contains("BLU")) |
| | | { |
| | | Console.WriteLine($"{arg0.Name} : {arg0.Uuid}"); |
| | | } |
| | |
| | | |
| | | public override void Blufi_gattPrepared(HdlBlufi.BlufiClient client, BlufiStatusCode status, CBService service, CBCharacteristic writeChar, CBCharacteristic notifyChar) |
| | | { |
| | | if(status == BlufiStatusCode.Success) |
| | | if (status == BlufiStatusCode.Success) |
| | | { |
| | | MainPage.Log("蓝牙连接成功"); |
| | | } |
| | |
| | | { |
| | | public override void UpdatedState(CBCentralManager central) |
| | | { |
| | | |
| | | |
| | | //throw new NotImplementedException(); |
| | | } |
| | | //public override void |