device.dart 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  1. import 'dart:core';
  2. import 'package:fis_jsonrpc/client_base.dart';
  3. import 'package:fis_common/json_convert.dart';
  4. import 'device.m.dart';
  5. import 'notification.m.dart';
  6. import 'liveConsultation.m.dart';
  7. class DeviceService extends JsonRpcClientBase {
  8. DeviceService(
  9. String host, {
  10. String serviceName = "IDeviceService",
  11. Map<String, String>? headers,
  12. int? timeout,
  13. }) : super(
  14. host,
  15. serviceName,
  16. headers: headers,
  17. timeout: timeout,
  18. ) {
  19. /// 注册响应实体反序列化处理器
  20. FJsonConvert.setDecoder((map) => DevicePrinterParameterDTO.fromJson(map));
  21. FJsonConvert.setDecoder((map) => PageCollection<DeviceExtendInfoDTO>.fromJson(map));
  22. FJsonConvert.setDecoder((map) => DeviceExtendInfoDTO.fromJson(map));
  23. FJsonConvert.setDecoder((map) => PageCollection<SelectItemDTO>.fromJson(map));
  24. FJsonConvert.setDecoder((map) => SelectItemDTO.fromJson(map));
  25. FJsonConvert.setDecoder((map) => DeviceInfoDTO.fromJson(map));
  26. FJsonConvert.setDecoder((map) => PageCollection<DeviceInfoDTO>.fromJson(map));
  27. FJsonConvert.setDecoder((map) => DictionaryDTO.fromJson(map));
  28. FJsonConvert.setDecoder((map) => DeviceServerSettingResult.fromJson(map));
  29. FJsonConvert.setDecoder((map) => DiagnosisModuleDTO.fromJson(map));
  30. FJsonConvert.setDecoder((map) => ReportVideoDeviceInfoResult.fromJson(map));
  31. FJsonConvert.setDecoder((map) => JoinDeviceLiveRoomResult.fromJson(map));
  32. FJsonConvert.setDecoder((map) => CreateLiveShareInfoResult.fromJson(map));
  33. FJsonConvert.setDecoder((map) => JoinDeviceLiveRoomByShareResult.fromJson(map));
  34. FJsonConvert.setDecoder((map) => CreateLiveRoomInfoResult.fromJson(map));
  35. FJsonConvert.setDecoder((map) => DeviceControlParameterDataDTO.fromJson(map));
  36. FJsonConvert.setDecoder((map) => BrandModelOutputConfigDTO.fromJson(map));
  37. FJsonConvert.setDecoder((map) => PageResult<DevicePatchDTO>.fromJson(map));
  38. FJsonConvert.setDecoder((map) => DevicePatchDTO.fromJson(map));
  39. FJsonConvert.setDecoder((map) => DevicePatchVersionDTO.fromJson(map));
  40. FJsonConvert.setDecoder((map) => DevicePrinterVersionDTO.fromJson(map));
  41. FJsonConvert.setDecoder((map) => PageResult<DevicePrinterDTO>.fromJson(map));
  42. FJsonConvert.setDecoder((map) => DevicePrinterDTO.fromJson(map));
  43. FJsonConvert.setDecoder((map) => DeviceConnectStateResult.fromJson(map));
  44. FJsonConvert.setDecoder((map) => ProbeApplicationSettingInfoDTO.fromJson(map));
  45. FJsonConvert.setDecoder((map) => RemoteConnectsRequest.fromJson(map));
  46. }
  47. Future<List<DevicePrinterParameterDTO>> getDevicePrintersForUploadAsync(GetDevicePrintersForUploadRequest request) async {
  48. var rpcRst = await call("GetDevicePrintersForUploadAsync", request);
  49. var result = (rpcRst as List).map((e)=>DevicePrinterParameterDTO.fromJson(e as Map<String, dynamic>)).toList();
  50. return result;
  51. }
  52. Future<List<String>> getDevicePatchTypeListAsync(TokenRequest request) async {
  53. var rpcRst = await call("GetDevicePatchTypeListAsync", request);
  54. var result = (rpcRst as List).cast<String>().toList();
  55. return result;
  56. }
  57. Future<bool> existsDevicePrinterAsync(ExistsDevicePrinterRequest request) async {
  58. var rpcRst = await call("ExistsDevicePrinterAsync", request);
  59. return rpcRst;
  60. }
  61. Future<bool> batchInsertDevicePrintersDataAsync(MigrateDevicePrinterRequest request) async {
  62. var rpcRst = await call("BatchInsertDevicePrintersDataAsync", request);
  63. return rpcRst;
  64. }
  65. Future<bool> batchInsertDevicePatchsDataAsync(MigrateDevicePatchRequest request) async {
  66. var rpcRst = await call("BatchInsertDevicePatchsDataAsync", request);
  67. return rpcRst;
  68. }
  69. Future<PageCollection<DeviceExtendInfoDTO>> getOrganizationDeviceListAsync(GetPersonDeviceRequest request) async {
  70. var rpcRst = await call("GetOrganizationDeviceListAsync", request);
  71. var result = PageCollection<DeviceExtendInfoDTO>.fromJson(rpcRst as Map<String, dynamic>);
  72. return result;
  73. }
  74. Future<PageCollection<SelectItemDTO>> getPersonDeviceDropdownPageAsync(GetPersonDeviceDropdownPageRequest request) async {
  75. var rpcRst = await call("GetPersonDeviceDropdownPageAsync", request);
  76. var result = PageCollection<SelectItemDTO>.fromJson(rpcRst as Map<String, dynamic>);
  77. return result;
  78. }
  79. Future<bool> heartRateAsync(TokenRequest request) async {
  80. var rpcRst = await call("HeartRateAsync", request);
  81. return rpcRst;
  82. }
  83. Future<DeviceInfoDTO> createDeviceInfoAsync(CreateDeviceRequest request) async {
  84. var rpcRst = await call("CreateDeviceInfoAsync", request);
  85. var result = DeviceInfoDTO.fromJson(rpcRst as Map<String, dynamic>);
  86. return result;
  87. }
  88. Future<DeviceExtendInfoDTO> getDeviceInfoAsync(GetDeviceRequest request) async {
  89. var rpcRst = await call("GetDeviceInfoAsync", request);
  90. var result = DeviceExtendInfoDTO.fromJson(rpcRst as Map<String, dynamic>);
  91. return result;
  92. }
  93. Future<DeviceExtendInfoDTO> getDeviceByShortCodeAsync(GetDeviceByShortCodeRequest request) async {
  94. var rpcRst = await call("GetDeviceByShortCodeAsync", request);
  95. var result = DeviceExtendInfoDTO.fromJson(rpcRst as Map<String, dynamic>);
  96. return result;
  97. }
  98. Future<PageCollection<DeviceInfoDTO>> getDeviceInfoPageAsync(PageFilterRequest request) async {
  99. var rpcRst = await call("GetDeviceInfoPageAsync", request);
  100. var result = PageCollection<DeviceInfoDTO>.fromJson(rpcRst as Map<String, dynamic>);
  101. return result;
  102. }
  103. Future<bool> bindDeviceAsync(BindDeviceRequest request) async {
  104. var rpcRst = await call("BindDeviceAsync", request);
  105. return rpcRst;
  106. }
  107. Future<bool> modifyDeviceAsync(ModifyDeviceRequest request) async {
  108. var rpcRst = await call("ModifyDeviceAsync", request);
  109. return rpcRst;
  110. }
  111. Future<String> createDictionaryItemAsync(CreateDictionaryItemRequest request) async {
  112. var rpcRst = await call("CreateDictionaryItemAsync", request);
  113. return rpcRst;
  114. }
  115. Future<List<DictionaryDTO>> findDeviceModelItemsAsync(FindDeviceModelItemsRequest request) async {
  116. var rpcRst = await call("FindDeviceModelItemsAsync", request);
  117. var result = (rpcRst as List).map((e)=>DictionaryDTO.fromJson(e as Map<String, dynamic>)).toList();
  118. return result;
  119. }
  120. Future<List<DictionaryDTO>> findDeviceTypeItemsAsync(FindDeviceTypeItemsRequest request) async {
  121. var rpcRst = await call("FindDeviceTypeItemsAsync", request);
  122. var result = (rpcRst as List).map((e)=>DictionaryDTO.fromJson(e as Map<String, dynamic>)).toList();
  123. return result;
  124. }
  125. Future<bool> createShareDeviceToUserAsync(CreateShareDeviceToUserRequest request) async {
  126. var rpcRst = await call("CreateShareDeviceToUserAsync", request);
  127. return rpcRst;
  128. }
  129. Future<bool> deleteShareDeviceToUserAsync(DeleteShareDeviceToUserRequest request) async {
  130. var rpcRst = await call("DeleteShareDeviceToUserAsync", request);
  131. return rpcRst;
  132. }
  133. Future<bool> removeDeviceRelevancyAsync(RemoveDeviceRelevancyRequest request) async {
  134. var rpcRst = await call("RemoveDeviceRelevancyAsync", request);
  135. return rpcRst;
  136. }
  137. Future<PageCollection<DeviceExtendInfoDTO>> getPersonDeviceListAsync(GetPersonDeviceRequest request) async {
  138. var rpcRst = await call("GetPersonDeviceListAsync", request);
  139. var result = PageCollection<DeviceExtendInfoDTO>.fromJson(rpcRst as Map<String, dynamic>);
  140. return result;
  141. }
  142. Future<PageCollection<DeviceInfoDTO>> getDeviceListByPersonRoleAsync(GetPersonRoleDeviceRequest request) async {
  143. var rpcRst = await call("GetDeviceListByPersonRoleAsync", request);
  144. var result = PageCollection<DeviceInfoDTO>.fromJson(rpcRst as Map<String, dynamic>);
  145. return result;
  146. }
  147. Future<List<DeviceExtendInfoDTO>> findDevicesByOrganizationCodeAsync(FindDevicesByOrganizationCodeRequest request) async {
  148. var rpcRst = await call("FindDevicesByOrganizationCodeAsync", request);
  149. var result = (rpcRst as List).map((e)=>DeviceExtendInfoDTO.fromJson(e as Map<String, dynamic>)).toList();
  150. return result;
  151. }
  152. Future<List<SelectItemDTO>> getPersonDeviceDropdownListAsync(TokenRequest request) async {
  153. var rpcRst = await call("GetPersonDeviceDropdownListAsync", request);
  154. var result = (rpcRst as List).map((e)=>SelectItemDTO.fromJson(e as Map<String, dynamic>)).toList();
  155. return result;
  156. }
  157. Future<DeviceServerSettingResult> queryServerConfigAsync(TokenRequest request) async {
  158. var rpcRst = await call("QueryServerConfigAsync", request);
  159. var result = DeviceServerSettingResult.fromJson(rpcRst as Map<String, dynamic>);
  160. return result;
  161. }
  162. Future<bool> addDeviceToOrgAsync(AddDeviceToOrgRequest request) async {
  163. var rpcRst = await call("AddDeviceToOrgAsync", request);
  164. return rpcRst;
  165. }
  166. Future<List<String>> getDeviceBindUsersCodesAsync(GetDeviceRequest request) async {
  167. var rpcRst = await call("GetDeviceBindUsersCodesAsync", request);
  168. var result = (rpcRst as List).cast<String>().toList();
  169. return result;
  170. }
  171. Future<List<DiagnosisModuleDTO>> findDeviceDiagnosisModulesAsync(FindDeviceDiagnosisModulesRequest request) async {
  172. var rpcRst = await call("FindDeviceDiagnosisModulesAsync", request);
  173. var result = (rpcRst as List).map((e)=>DiagnosisModuleDTO.fromJson(e as Map<String, dynamic>)).toList();
  174. return result;
  175. }
  176. Future<bool> modifyDeviceDiagnosisModuleStateAsync(ModifyDeviceDiagnosisModuleStateRequest request) async {
  177. var rpcRst = await call("ModifyDeviceDiagnosisModuleStateAsync", request);
  178. return rpcRst;
  179. }
  180. Future<ReportVideoDeviceInfoResult> reportVideoDeviceInfoAsync(ReportVideoDeviceInfoRequest request) async {
  181. var rpcRst = await call("ReportVideoDeviceInfoAsync", request);
  182. var result = ReportVideoDeviceInfoResult.fromJson(rpcRst as Map<String, dynamic>);
  183. return result;
  184. }
  185. Future<int> getActiveDeviceCount() async {
  186. var rpcRst = await call("GetActiveDeviceCount", );
  187. return rpcRst;
  188. }
  189. Future<bool> sendControlParameterByDeviceAsync(SendControlParameterByDeviceRequest request) async {
  190. var rpcRst = await call("SendControlParameterByDeviceAsync", request);
  191. return rpcRst;
  192. }
  193. Future<JoinDeviceLiveRoomResult> joinDeviceLiveRoomAsync(JoinDeviceLiveRoomRequest request) async {
  194. var rpcRst = await call("JoinDeviceLiveRoomAsync", request);
  195. var result = JoinDeviceLiveRoomResult.fromJson(rpcRst as Map<String, dynamic>);
  196. return result;
  197. }
  198. Future<bool> leaveDeviceLiveRoomAsync(LeaveDeviceLiveRoomRequest request) async {
  199. var rpcRst = await call("LeaveDeviceLiveRoomAsync", request);
  200. return rpcRst;
  201. }
  202. Future<bool> reportLiveViewStateAsync(ReportLiveViewStateRequest request) async {
  203. var rpcRst = await call("ReportLiveViewStateAsync", request);
  204. return rpcRst;
  205. }
  206. Future<CreateLiveShareInfoResult> createLiveShareInfoAsync(CreateLiveShareInfoRequest request) async {
  207. var rpcRst = await call("CreateLiveShareInfoAsync", request);
  208. var result = CreateLiveShareInfoResult.fromJson(rpcRst as Map<String, dynamic>);
  209. return result;
  210. }
  211. Future<JoinDeviceLiveRoomByShareResult> joinDeviceLiveRoomByShareAsync(JoinDeviceLiveRoomByShareRequest request) async {
  212. var rpcRst = await call("JoinDeviceLiveRoomByShareAsync", request);
  213. var result = JoinDeviceLiveRoomByShareResult.fromJson(rpcRst as Map<String, dynamic>);
  214. return result;
  215. }
  216. Future<bool> leaveDeviceLiveRoomByShareAsync(LeaveDeviceLiveRoomByShareRequest request) async {
  217. var rpcRst = await call("LeaveDeviceLiveRoomByShareAsync", request);
  218. return rpcRst;
  219. }
  220. Future<bool> reportLiveViewStateByShareAsync(ReportLiveViewStateByShareRequest request) async {
  221. var rpcRst = await call("ReportLiveViewStateByShareAsync", request);
  222. return rpcRst;
  223. }
  224. Future<bool> reportLiveStateAsync(ReportLiveStateRequest request) async {
  225. var rpcRst = await call("ReportLiveStateAsync", request);
  226. return rpcRst;
  227. }
  228. Future<CreateLiveRoomInfoResult> createLiveRoomInfoAsync(CreateLiveRoomInfoRequest request) async {
  229. var rpcRst = await call("CreateLiveRoomInfoAsync", request);
  230. var result = CreateLiveRoomInfoResult.fromJson(rpcRst as Map<String, dynamic>);
  231. return result;
  232. }
  233. Future<bool> uploadConsultationDataAsync(UploadConsultationDataRequest request) async {
  234. var rpcRst = await call("UploadConsultationDataAsync", request);
  235. return rpcRst;
  236. }
  237. Future<DeviceControlParameterDataDTO> getControlParametersAsync(GetControlParametersRequest request) async {
  238. var rpcRst = await call("GetControlParametersAsync", request);
  239. var result = DeviceControlParameterDataDTO.fromJson(rpcRst as Map<String, dynamic>);
  240. return result;
  241. }
  242. Future<bool> applyRemoteConnectionAsync(ControlDeviceConnectRequest request) async {
  243. var rpcRst = await call("ApplyRemoteConnectionAsync", request);
  244. return rpcRst;
  245. }
  246. Future<bool> acceptRemoteConnnectionAsync(ControlDeviceResponseRequest request) async {
  247. var rpcRst = await call("AcceptRemoteConnnectionAsync", request);
  248. return rpcRst;
  249. }
  250. Future<bool> applyRemoteControlAsync(ControlDeviceParameterRequest request) async {
  251. var rpcRst = await call("ApplyRemoteControlAsync", request);
  252. return rpcRst;
  253. }
  254. Future<bool> getRemoteLogAsync(GetRemoteLogRequest request) async {
  255. var rpcRst = await call("GetRemoteLogAsync", request);
  256. return rpcRst;
  257. }
  258. Future<bool> responseRemoteLogAsync(RemoteLogResponseRequest request) async {
  259. var rpcRst = await call("ResponseRemoteLogAsync", request);
  260. return rpcRst;
  261. }
  262. Future<bool> scanBindDeviceAsync(ScanBindDeviceRequest request) async {
  263. var rpcRst = await call("ScanBindDeviceAsync", request);
  264. return rpcRst;
  265. }
  266. Future<bool> reportBrandModelOutputConfigAsync(ReportBrandModelOutputConfigRequest request) async {
  267. var rpcRst = await call("ReportBrandModelOutputConfigAsync", request);
  268. return rpcRst;
  269. }
  270. Future<List<BrandModelOutputConfigDTO>> syncBrandModelOutputConfigAsync(SyncBrandModelOutputConfigRequest request) async {
  271. var rpcRst = await call("SyncBrandModelOutputConfigAsync", request);
  272. var result = (rpcRst as List).map((e)=>BrandModelOutputConfigDTO.fromJson(e as Map<String, dynamic>)).toList();
  273. return result;
  274. }
  275. Future<List<String>> getBrandsAsync(GetBrandsRequest request) async {
  276. var rpcRst = await call("GetBrandsAsync", request);
  277. var result = (rpcRst as List).cast<String>().toList();
  278. return result;
  279. }
  280. Future<List<String>> getModelsAsync(GetModelsRequest request) async {
  281. var rpcRst = await call("GetModelsAsync", request);
  282. var result = (rpcRst as List).cast<String>().toList();
  283. return result;
  284. }
  285. Future<bool> addDevicePatchAsync(AddDevicePatchRequest request) async {
  286. var rpcRst = await call("AddDevicePatchAsync", request);
  287. return rpcRst;
  288. }
  289. Future<PageResult<DevicePatchDTO>> findDevicePatchPagesAsync(FindDevicePatchPageRequest request) async {
  290. var rpcRst = await call("FindDevicePatchPagesAsync", request);
  291. var result = PageResult<DevicePatchDTO>.fromJson(rpcRst as Map<String, dynamic>);
  292. return result;
  293. }
  294. Future<bool> deletePatchByCodeAsync(DeleteDevicePatchByCodeRequest request) async {
  295. var rpcRst = await call("DeletePatchByCodeAsync", request);
  296. return rpcRst;
  297. }
  298. Future<bool> updateDevicePatchAsync(UpdateDevicePatchRequest request) async {
  299. var rpcRst = await call("UpdateDevicePatchAsync", request);
  300. return rpcRst;
  301. }
  302. Future<bool> pushDevicePatchAsync(PushDevicePatchRequest request) async {
  303. var rpcRst = await call("PushDevicePatchAsync", request);
  304. return rpcRst;
  305. }
  306. Future<PageResult<DevicePatchDTO>> findPushDevicePatchPagesAsync(FindPushDevicePatchPageRequest request) async {
  307. var rpcRst = await call("FindPushDevicePatchPagesAsync", request);
  308. var result = PageResult<DevicePatchDTO>.fromJson(rpcRst as Map<String, dynamic>);
  309. return result;
  310. }
  311. Future<bool> uploadDeviceDownloadPatchProgressToUserAsync(UploadDeviceDownloadPatchProgressToUserRequest request) async {
  312. var rpcRst = await call("UploadDeviceDownloadPatchProgressToUserAsync", request);
  313. return rpcRst;
  314. }
  315. Future<bool> addDevicePatchVersionAsync(AddDevicePatchVersionRequest request) async {
  316. var rpcRst = await call("AddDevicePatchVersionAsync", request);
  317. return rpcRst;
  318. }
  319. Future<List<DevicePatchVersionDTO>> findDevicePatchVersionListAsync(FindDevicePatchListRequest request) async {
  320. var rpcRst = await call("FindDevicePatchVersionListAsync", request);
  321. var result = (rpcRst as List).map((e)=>DevicePatchVersionDTO.fromJson(e as Map<String, dynamic>)).toList();
  322. return result;
  323. }
  324. Future<bool> deleteDevicePatchVersionAsync(DeleteDevicePatchVersionRequest request) async {
  325. var rpcRst = await call("DeleteDevicePatchVersionAsync", request);
  326. return rpcRst;
  327. }
  328. Future<bool> addDevicePrinterVersionAsync(AddDevicePrinterVersionRequest request) async {
  329. var rpcRst = await call("AddDevicePrinterVersionAsync", request);
  330. return rpcRst;
  331. }
  332. Future<List<DevicePrinterVersionDTO>> findDevicePrinterVersionListAsync(FindDevicePrinterVersionListRequest request) async {
  333. var rpcRst = await call("FindDevicePrinterVersionListAsync", request);
  334. var result = (rpcRst as List).map((e)=>DevicePrinterVersionDTO.fromJson(e as Map<String, dynamic>)).toList();
  335. return result;
  336. }
  337. Future<bool> deleteDevicePrinterVersionAsync(DeleteDevicePrinterVersionRequest request) async {
  338. var rpcRst = await call("DeleteDevicePrinterVersionAsync", request);
  339. return rpcRst;
  340. }
  341. Future<bool> addDevicePrinterAsync(AddDevicePrinterRequest request) async {
  342. var rpcRst = await call("AddDevicePrinterAsync", request);
  343. return rpcRst;
  344. }
  345. Future<PageResult<DevicePrinterDTO>> findDevicePrinterPagesAsync(FindDevicePrinterPageRequest request) async {
  346. var rpcRst = await call("FindDevicePrinterPagesAsync", request);
  347. var result = PageResult<DevicePrinterDTO>.fromJson(rpcRst as Map<String, dynamic>);
  348. return result;
  349. }
  350. Future<bool> deletePrinterByCodeAsync(DeleteDevicePrinterByCodeRequest request) async {
  351. var rpcRst = await call("DeletePrinterByCodeAsync", request);
  352. return rpcRst;
  353. }
  354. Future<bool> updateDevicePrinterAsync(UpdateDevicePrinterRequest request) async {
  355. var rpcRst = await call("UpdateDevicePrinterAsync", request);
  356. return rpcRst;
  357. }
  358. Future<bool> setDevicePrinterAsync(SetDevicePrinterRequest request) async {
  359. var rpcRst = await call("SetDevicePrinterAsync", request);
  360. return rpcRst;
  361. }
  362. Future<bool> uploadDevicePrinterAsync(UploadDevicePrinterRequest request) async {
  363. var rpcRst = await call("UploadDevicePrinterAsync", request);
  364. return rpcRst;
  365. }
  366. Future<bool> restartDeviceAsync(RestartDeviceRequest request) async {
  367. var rpcRst = await call("RestartDeviceAsync", request);
  368. return rpcRst;
  369. }
  370. Future<bool> modifyEmergencyDeviceCodeAsync(ModifyEmergencyDeviceCodeRequest request) async {
  371. var rpcRst = await call("ModifyEmergencyDeviceCodeAsync", request);
  372. return rpcRst;
  373. }
  374. Future<String> sendCommandToDeviceAsync(SendCommandToDeviceRequest request) async {
  375. var rpcRst = await call("SendCommandToDeviceAsync", request);
  376. return rpcRst;
  377. }
  378. Future<String> sendResultToClientAsync(SendResultToClientRequest request) async {
  379. var rpcRst = await call("SendResultToClientAsync", request);
  380. return rpcRst;
  381. }
  382. Future<String> getResultFromServerAsync(GetResultFromServerRequest request) async {
  383. var rpcRst = await call("GetResultFromServerAsync", request);
  384. return rpcRst;
  385. }
  386. Future<bool> disconnectRemoteControl(RemoteConnectStautsRequest request) async {
  387. var rpcRst = await call("DisconnectRemoteControl", request);
  388. return rpcRst;
  389. }
  390. Future<bool> remoteConnectHeartRateAsync(RemoteConnectHeartRateRequest request) async {
  391. var rpcRst = await call("RemoteConnectHeartRateAsync", request);
  392. return rpcRst;
  393. }
  394. Future<bool> checkDeviceIsIdleAsync(GetDeviceRequest request) async {
  395. var rpcRst = await call("CheckDeviceIsIdleAsync", request);
  396. return rpcRst;
  397. }
  398. Future<String> checkUserIsExistRoomIdAsync(GetDeviceRequest request) async {
  399. var rpcRst = await call("CheckUserIsExistRoomIdAsync", request);
  400. return rpcRst;
  401. }
  402. Future<bool> addUserRemoteConnectAsync(AddUserRemoteConnectRequest request) async {
  403. var rpcRst = await call("AddUserRemoteConnectAsync", request);
  404. return rpcRst;
  405. }
  406. Future<bool> closeUserRemoteConnectAsync(GetDeviceRequest request) async {
  407. var rpcRst = await call("CloseUserRemoteConnectAsync", request);
  408. return rpcRst;
  409. }
  410. Future<bool> userCancelLogDownloadAsync(GetDeviceRequest request) async {
  411. var rpcRst = await call("UserCancelLogDownloadAsync", request);
  412. return rpcRst;
  413. }
  414. Future<List<DeviceConnectStateResult>> getDeviceStateListByTokenAsync(GetDeviceStateListRequest request) async {
  415. var rpcRst = await call("GetDeviceStateListByTokenAsync", request);
  416. var result = (rpcRst as List).map((e)=>DeviceConnectStateResult.fromJson(e as Map<String, dynamic>)).toList();
  417. return result;
  418. }
  419. Future<bool> deviceCancelLogDownloadAsync(DeivceCancelLogDownloadRequest request) async {
  420. var rpcRst = await call("DeviceCancelLogDownloadAsync", request);
  421. return rpcRst;
  422. }
  423. Future<bool> deviceRemoteConnectHeartRateAsync(RemoteConnectHeartRateRequest request) async {
  424. var rpcRst = await call("DeviceRemoteConnectHeartRateAsync", request);
  425. return rpcRst;
  426. }
  427. Future<bool> applyProbeApplicationSettingAsync(ProbeApplicationSettingRequest request) async {
  428. var rpcRst = await call("ApplyProbeApplicationSettingAsync", request);
  429. return rpcRst;
  430. }
  431. Future<bool> responseProbeApplicationSettingAsync(ProbeApplicationSettingResultRequest request) async {
  432. var rpcRst = await call("ResponseProbeApplicationSettingAsync", request);
  433. return rpcRst;
  434. }
  435. Future<ProbeApplicationSettingInfoDTO> getProbeApplicationSettingAsync(GetControlParametersRequest request) async {
  436. var rpcRst = await call("GetProbeApplicationSettingAsync", request);
  437. var result = ProbeApplicationSettingInfoDTO.fromJson(rpcRst as Map<String, dynamic>);
  438. return result;
  439. }
  440. Future<RemoteConnectsRequest> findConnectingDeviceListAsync(GetDeviceRequest request) async {
  441. var rpcRst = await call("FindConnectingDeviceListAsync", request);
  442. var result = RemoteConnectsRequest.fromJson(rpcRst as Map<String, dynamic>);
  443. return result;
  444. }
  445. Future<bool> closeConnectingDeviceListAsync(GetDeviceRequest request) async {
  446. var rpcRst = await call("CloseConnectingDeviceListAsync", request);
  447. return rpcRst;
  448. }
  449. }