AddMqttDevice static method
Future<OperationResponse>
AddMqttDevice(
- MqttDeviceInfo mqttDeviceInfo
)
Implementation
static Future<OperationResponse> AddMqttDevice(
MqttDeviceInfo mqttDeviceInfo) async {
String jwt = await getJWT();
final channel = await Channel.getDefaultIoTManagerChannel();
final stub = MqttDeviceManagerClient(channel,
options: CallOptions(metadata: {'jwt': jwt}));
OperationResponse operationResponse =
await stub.addMqttDevice(mqttDeviceInfo);
print('OperationResponse: ${operationResponse}');
channel.shutdown();
return operationResponse;
}