deleteOneDevice static method

Future deleteOneDevice(
  1. Device device
)

Implementation

static Future deleteOneDevice(Device device) async {
  final channel = await Channel.getOpenIoTHubChannel();
  final stub = CommonDeviceManagerClient(channel);
  final response = await stub.delDevice(device);
  print('Greeter client received: ${response}');
  channel.shutdown();
  //服务器同步
  HostInfo hostInfo = HostInfo();
  hostInfo.uUID = device.uuid;
  HostManager.DelHost(hostInfo);
}