xcDevGetSysConfig method
获取设备系统配置
deviceId序列号
commandName配置命令字
command消息ID 通用配置1042
timeout超时时间
seq索引,自定义值
return code:0 , str:function data:json数据
Implementation
Future<Map<String, dynamic>> xcDevGetSysConfig(
{required String deviceId,
required String commandName,
int command = 1042,
int timeout = 15000}) async {
final result = await _api.devGetSysConfig(
deviceId, commandName, command, timeout, ApiSeq.instance.getSeq());
if (kDebugMode) {
XCloudResponse.fromOriginResponse(result);
}
if (result.param1 < 0) {
return Future.error(
XCloudAPIException(code: result.param1, commandId: result.commandId));
}
if (result.byteStream == null) {
return {};
}
String byteString = XCloudResponse.byteToString(result.byteStream);
return json.decode(byteString);
}