json_handle.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. #ifndef __JSON_HANDLE_H
  2. #define __JSON_HANDLE_H
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <string.h>
  6. #include <unistd.h>
  7. #include <stdbool.h>
  8. #include "list.h"
  9. #include "common.h"
  10. #include "cJSON.h"
  11. #include "xlist.h"
  12. /// @brief 获取用户信息
  13. typedef struct
  14. {
  15. char* user_token;
  16. }_Get_Info_Request;
  17. /// @brief 电压、电流、功率、耗电量统计接口
  18. typedef struct
  19. {
  20. float ydata[60]; //value
  21. char xAxis[60][32];//时间点
  22. }_Get_Total_Value;
  23. /// @brief 系统总数信息
  24. typedef struct
  25. {
  26. int channel_total ;//通道总数
  27. int warn_total ;//告警总数
  28. int sensor_total ;//传感器总数
  29. int log_total ;//运行日志总数
  30. }_Get_System_Total;
  31. //功率趋势接口
  32. typedef struct
  33. {
  34. float ydata[3][60] ;//0:有功功率;1:无功功率;2:视在功率;
  35. char xAxis[60][32] ;//时间点
  36. }_Power_Trend_Info;
  37. /// @brief 总体设备信息
  38. typedef struct
  39. {
  40. char* user_token;
  41. char* type; //listInfoQuery listQuery open close listHisQuery
  42. char* product_name;
  43. int product_id;
  44. char* product_number;
  45. char* start_time;
  46. char* end_time;
  47. char* page_num;
  48. char* page_size;
  49. int product_pwr_type;
  50. char* product_phOrder;
  51. char* lType; //L1 L2 L3
  52. }_Over_All_Sts_Monitor;
  53. /// @brief 总设备信息返回
  54. typedef struct
  55. {
  56. char *product_name;
  57. int product_id;
  58. char *product_number;
  59. char *product_Code;
  60. char *product_type;
  61. int product_type_id;
  62. char *productVersion; // 固件版本
  63. char *product_status;
  64. char *product_sysTime;
  65. char *product_runTime;
  66. char *productPwrType;
  67. char *productAddr; // IP地址
  68. char *product_mac;
  69. int product_RS485Addr;
  70. int productMemory; // 内存
  71. char *occupancyRate; // 磁盘占用率
  72. char productCount; // 级联设备数
  73. _Get_System_Total system_total;
  74. }_OverBackStsInfo;
  75. /// @brief breaker device information
  76. typedef struct
  77. {
  78. char *product_name;
  79. int product_id;
  80. char *product_number;
  81. char product_type;
  82. }_OverBackBreakerInfo;
  83. /// @brief breaker channel list information
  84. typedef struct
  85. {
  86. char product_name[32];
  87. int product_id;
  88. char product_number[32];
  89. char product_ch_name[32];
  90. int product_ch_id;
  91. struct list_head list;
  92. }_OverBreakerChnInfo;
  93. /// @brief breaker channel switch information
  94. typedef struct
  95. {
  96. char productName[32];
  97. char product_number[32];
  98. int product_id;
  99. char product_ch_name[32];
  100. int product_ch_id;
  101. int status;
  102. int switch_id;
  103. char switch_name[64];
  104. char cjfs[20];
  105. char comkh[20];
  106. char cjdz[20];
  107. char jdh[20];
  108. char productChids[64];
  109. struct list_head list;
  110. }_OverBreakerSwitchInfo;
  111. /// @brief 电源总体监控请求信息
  112. typedef struct
  113. {
  114. char* user_token;
  115. char* type;
  116. char* product_name;
  117. char* product_number;
  118. }_OverAllPwrRequest;
  119. /// @brief 电源通道监控请求信息
  120. typedef struct
  121. {
  122. char* user_token;
  123. char* type;
  124. char* lType;
  125. char* product_name;
  126. int product_id;
  127. char* productChName;
  128. int productChId;
  129. char* start_time;
  130. char* end_time;
  131. char* pageNum;
  132. char* pageSize;
  133. char* ChannelLoadType;
  134. int productType;
  135. char* productPhOrder;
  136. int outputType;
  137. char* Zerotype;
  138. char* strProductChIds;
  139. }_OverChnPwrRequest;
  140. /// @brief 总体电源返回信息
  141. typedef struct
  142. {
  143. char* product_name;
  144. char* product_number;
  145. int product_id;
  146. char* productChName;
  147. char productChId;
  148. int status;
  149. int NF_status;
  150. char* mac_addr;
  151. char* ip_addr;
  152. float voltage ;//电压
  153. float current ;//电流
  154. float power ;//功率
  155. float freq ;//频率
  156. float consumption ;//耗电量
  157. float factor ;
  158. unsigned short product_ch_start_delay ;//通道延时
  159. unsigned short product_ch_stop_delay ;//通道延时
  160. int product_type; //通道类型
  161. int product_phType; //三相类型
  162. float ph_voltage ;//电压
  163. float ph_current ;//电流
  164. float ph_power ;//功率
  165. float ph_consumption ;//耗电量
  166. int ph_outputType ;//输出类型
  167. int ph_outputStatus ;//输出状态-该通道是否输出
  168. struct list_head list;
  169. }_OverChnPwrAckInfo;
  170. /// @brief 总体电源返回信息
  171. typedef struct
  172. {
  173. char* product_name;
  174. char* product_number;
  175. int product_id;
  176. float voltage ;//电压
  177. float current ;//电流
  178. float power ;//功率
  179. float freq ;//频率
  180. float consumption ;//耗电量
  181. float factor ;//功率因素
  182. _Get_Total_Value _total_voltage ;//电压统计
  183. _Get_Total_Value _total_current ;//电流统计
  184. _Get_Total_Value _total_power ;//功率统计
  185. _Get_Total_Value _total_consumption ;//耗电量统计
  186. _Power_Trend_Info _Power_Trend_Info ;//有功、无功、视在功率统计
  187. }_OverAllPwrAckInfo;
  188. /// @brief 传感器总体请求信息
  189. typedef struct
  190. {
  191. float ydata[2][60] ;//0:温度,1:湿度;
  192. char xAxis[60][32] ;//时间点
  193. }_Sensor_Temp_Humi_Icon;
  194. typedef struct
  195. {
  196. float ydata[60] ;//气体值
  197. char xAxis[60][32] ;//时间点
  198. }_Sensor_Gas_Icon;
  199. typedef struct
  200. {
  201. float ydata[60] ;//气体值
  202. char xAxis[60][32] ;//时间点
  203. }_Sensor_Temp_Icon;
  204. typedef struct
  205. {
  206. float ydata[2][60] ;//0:气流,1:气压;
  207. char xAxis[60][32] ;//时间点
  208. }_Sensor_Air_Press_Icon;
  209. typedef struct
  210. {
  211. char* user_token;
  212. char* type;
  213. char* productName;
  214. char* productNumber;
  215. char* productChName;
  216. char* productChId;
  217. char* startTime;
  218. char* endTime;
  219. char* page_num;
  220. char* page_size;
  221. int sensorId;
  222. char* sensorType;
  223. char* sensorName;
  224. char* comSlogan;
  225. char* cgqtd;
  226. char* sensorAddr;
  227. char* sensorBaud;
  228. char* connectionStatus;
  229. }_OverSensorRequest;
  230. /// @brief 传感器应答状态
  231. typedef struct
  232. {
  233. int accessControlStatus;
  234. char sensorAddr;
  235. int nodeNumber;
  236. float airPressureValue;
  237. float airflowValue;
  238. int alarmStatus;
  239. int sensorBaud;
  240. char comSlogan[32];
  241. int connectionStatus;
  242. int leakStatus;
  243. float gasConcentration;
  244. float humidityValue;
  245. float temperatureValue;
  246. char sensorName[64];
  247. char sensorId;
  248. char sensorType;
  249. int waterImmersionState;
  250. char sensorvaluech[32];
  251. float temperatureValue2;
  252. _Sensor_Temp_Humi_Icon temp_humi_sensor;
  253. _Sensor_Gas_Icon gas_sensor;
  254. _Sensor_Air_Press_Icon air_press_sensor;
  255. _Sensor_Temp_Icon temp_sensor;
  256. struct list_head list;
  257. }_OverSensorBackInfo;
  258. /// @brief 电源类阈值设置
  259. typedef struct
  260. {
  261. char* alarmContentUpperValue;
  262. char* currentUpperValue;
  263. char* powerUpperValue;
  264. char productChId;
  265. char* productChName;
  266. char* voltageDownValue;
  267. char* voltageUpperValue;
  268. bool bUpdatealarmContentUpperValue;
  269. bool bUpdatecurrentUpperValue;
  270. bool bUpdatepowerUpperValue;
  271. bool bUpdatevoltageDownValue;
  272. bool bUpdatevoltageUpperValue;
  273. char* currentUpperAction;
  274. char* voltageUpperAction;
  275. char*voltageDownAction;
  276. char* powerUpperAction;
  277. char* alarmContentUpperAction;
  278. }_Power_AlarmRequestInfo;
  279. /// @brief 传感器类阈值设置
  280. typedef struct
  281. {
  282. char* connectionStatus ;
  283. int sensorId;
  284. char* sensorName;
  285. char* sensorType;
  286. char* thresholdType;
  287. char* thresholdDownValue;
  288. char* thresholdUpperValue;
  289. char *thresholdDownAction;
  290. char *thresholdUpperAction;
  291. char *thresholdUpperChanel;
  292. char *thresholdDownChanel;
  293. }_Sensor_AlarmRequestInfo;
  294. /// @brief 告警信息查询
  295. typedef struct
  296. {
  297. char* user_token;
  298. char* type;
  299. int pagenum;
  300. int pagesize;
  301. char *startTime;
  302. char *endTime;
  303. _Power_AlarmRequestInfo _pwr_info;
  304. _Sensor_AlarmRequestInfo _sensor_info;
  305. char* strProductChIds;
  306. }_AlarmRequestInfo;
  307. /// @brief 告警响应信息
  308. typedef struct
  309. {
  310. char alarmNumber[16];
  311. char alarmDate[32];
  312. char alarmType;
  313. char deviceNumber[16];
  314. char deviceName[32];
  315. char alarmContent[128];
  316. struct list_head list;
  317. }_AlarmAckInfo;
  318. /// @brief SMPT服务信息
  319. typedef struct
  320. {
  321. char* mode;
  322. char* account;
  323. char* password;
  324. char* server;
  325. char* port;
  326. char* auth;
  327. char* recvAccount[MAIL_RECV_MAX];
  328. }_MAIL_ServerRequestInfo;
  329. typedef struct
  330. {
  331. int idx;
  332. int mode;
  333. char* sid;
  334. char* name;
  335. char* server;
  336. char* port;
  337. char* cid;
  338. char* user;
  339. char* password;
  340. char* status; //connect status
  341. }_MQTT_ServerRequestInfo;
  342. /// @brief SNMP信息
  343. typedef struct
  344. {
  345. char* mode;
  346. char* version;
  347. char* public;
  348. char* trapmode;
  349. char* user;
  350. char* auth_alg;
  351. char* auth_passwd;
  352. char* priv_alg;
  353. char* priv_passwd;
  354. char* nms_IP;
  355. }_SNMP_ServerRequestInfo;
  356. /// @brief SNMP TRAP信息
  357. typedef struct
  358. {
  359. char* mode;
  360. char* stType;
  361. }_SNMPTRAP_ServerRequestInfo;
  362. /// @brief NTP信息
  363. typedef struct
  364. {
  365. char* mode;
  366. char* ntpName;
  367. char* ntpaddress;
  368. char* port;
  369. char* time;
  370. char* weekday;
  371. char* tzone;
  372. }_NTP_ServiceRequestInfo;
  373. /// @brief 定时设置
  374. typedef struct
  375. {
  376. char* productChName;
  377. char* productChId;
  378. int productChIds[64];
  379. char* idx[64];
  380. char* channelDate;
  381. char* StartDate;
  382. char* Enddate;
  383. char* channelTime;
  384. char* setStatus;
  385. }_DS_ServiceRequestInfo;
  386. /// @brief 时序设置
  387. typedef struct
  388. {
  389. char* productId;
  390. char* productChName;
  391. char* productChId;
  392. char* firingInterval;
  393. char* closeInterval;
  394. // char* firingInterval;
  395. // char* closeInterval;
  396. }_POSIX_ServiceRequestInfo;
  397. /// @brief 分组设置
  398. typedef struct
  399. {
  400. char* mode;
  401. char* xlnumber;
  402. char* jgnumber;
  403. char* opergroupid;
  404. char* updategroupName;
  405. }_GROUP_ServiceRequestInfo;
  406. /// @brief 服务信息查询
  407. typedef struct
  408. {
  409. char* user_token;
  410. char* type;
  411. _MQTT_ServerRequestInfo _mqtt_info;
  412. _MAIL_ServerRequestInfo _smtp_info ;
  413. _SNMP_ServerRequestInfo _snmp_info ;
  414. _SNMPTRAP_ServerRequestInfo _snmp_trap_info;
  415. _NTP_ServiceRequestInfo _ntp_info ;
  416. _DS_ServiceRequestInfo _ds_info;
  417. _POSIX_ServiceRequestInfo _posix_info;
  418. _GROUP_ServiceRequestInfo _group_info;
  419. char* productName;
  420. }_ServiceManageRequestInfo;
  421. /// @brief 网络参数配置
  422. typedef struct
  423. {
  424. char* mode;
  425. char* ipaddr;
  426. char* maskaddr;
  427. char* gateway;
  428. char* dns1;
  429. char* dns2;
  430. }_NET_CommunicationRequestInfo;
  431. /// @brief RS参数配置
  432. typedef struct
  433. {
  434. char* mode;
  435. char* baud;
  436. char* addr;
  437. }_RS_CommunicationRequestInfo;
  438. /// @brief 4G和WiFi参数配置
  439. typedef struct
  440. {
  441. int Cellular_mode;
  442. int WIFI_mode;
  443. char WIFI_name[64];
  444. char WIFI_code[64];
  445. }_4G_WIFI_CommunicationRequestInfo;
  446. /// @brief 通信信息查询
  447. typedef struct
  448. {
  449. char* user_token;
  450. char* type;
  451. _NET_CommunicationRequestInfo _net_info;
  452. _RS_CommunicationRequestInfo _rs_info;
  453. _4G_WIFI_CommunicationRequestInfo _4g_wifi_info;
  454. }_CommunicationManageRequestInfo;
  455. /// @brief日志信息查询
  456. typedef struct
  457. {
  458. char* user_token;
  459. char* type;
  460. char* alarmType;
  461. char* startTime;
  462. char* endtime;
  463. int pagenum;
  464. int pagesize;
  465. char* openName;
  466. }_LogInformationRequestInfo;
  467. /// @brief 日志应答类容
  468. typedef struct
  469. {
  470. char* alarm_number;
  471. char* alarm_date;
  472. char alarm_type;
  473. int product_id;
  474. char product_name[32];
  475. char alarmContent[64];
  476. }_LogInformationAckInfo;
  477. /// @brief 设备维护
  478. typedef struct
  479. {
  480. char* user_token;
  481. char* type;
  482. char* product_name;
  483. char* product_id;
  484. char* product_number;
  485. /// @brief breaker infomation
  486. char* cjfs;
  487. char* comkh;
  488. char* cjdz;
  489. char* jdh;
  490. char* productChids;
  491. /////
  492. int switchId;
  493. char* switchName;
  494. char* cleanSelectItem;
  495. }_Equipment_Mintenance;
  496. /// @brief 用户角色管理
  497. typedef struct
  498. {
  499. char* user_token;
  500. char* type;
  501. char* createTime;
  502. int userId;
  503. char* userName;
  504. char* nickName;//用途不明?
  505. bool delFlag;//用途不明?
  506. int roleId;
  507. char* roleName;
  508. char* password;
  509. int userIds;
  510. int pagenum;
  511. int pagesize;
  512. }_UserRoleManageInfo;
  513. char* ctrl_sts_ack_to_json(void);
  514. char* ctrl_breaker_err_ack_to_json(char *string);
  515. void get_rand_str(char* s,int num);
  516. char* json_to_Token_info(const char* strHead);
  517. int json_to_User_login_info(const char* str,_User_Log* _newUserLogin);
  518. int json_to_User_loginOut_info(const char* str,char** _UserLoginOutToken);
  519. char* log_info_to_json(const char* token);
  520. char* log_LoginFailedinfo_to_json();
  521. char* log_AthFailedinfo_to_json();
  522. char* user_info_to_json(void);
  523. char* user_routers_info_to_json(void);
  524. char* json_to_system_config_info(int tls);
  525. cJSON* json_to_overall_status_monitor(const char* str,_Over_All_Sts_Monitor* _over_all_sts_monitor);
  526. char* over_all_monitor_to_json(_OverBackStsInfo* _over_back_sts_info);
  527. char* overall_power_history_to_json(GlobalPowerInfo* _globalPowerInfo,GlobalDeviceInfo* _globalDeviceInfo);
  528. char* over_channel_power_history_to_json(GlobalPowerInfo* _globalPowerInfo,GlobalDeviceInfo* _globalDeviceInfo,char* chn_name,char chn);
  529. cJSON* json_to_overall_pwr_status_monitor(const char* str,_OverAllPwrRequest* _over_all_pwr_request);
  530. cJSON* json_to_over_equipment_mintenance(const char* str,_Equipment_Mintenance* _over_equipment_mintenance);
  531. char* over_product_list_info_to_json(GlobalDeviceManager *dm, _OverBackStsInfo* _over_back_sts_info,bool curFlag);
  532. char* vendor_info_to_json(GlobalDeviceInfo *dev);
  533. char* over_all_pwr_monitor_to_json(int phaseType,_OverAllPwrAckInfo* _over_all_pwr_back_info);
  534. char* over_all_pwr_monitor_Tree_AC_to_json(_OverAllPwrAckInfo* _over_all_pwr_back_info_L1,_OverAllPwrAckInfo* _over_all_pwr_back_info_L2,_OverAllPwrAckInfo* _over_all_pwr_back_info_L3);
  535. char* over_all_total_info_to_json(_OverAllPwrAckInfo* _over_all_pwr_back_info, int total_type);
  536. void over_all_total_info_t_ac_to_json(_OverAllPwrAckInfo* _over_all_pwr_back_info,cJSON* dataJson,cJSON* AxisJson, int total_type);
  537. int over_init_data_t_ac_to_json(cJSON* pAllJson,cJSON* dataJson[],cJSON* AxisJson,int total_type);
  538. char* over_all_data_t_ac_to_json(_OverAllPwrAckInfo* _over_all_pwr_back_info, _Over_All_Sts_Monitor* _over_all_sts_monitor,int total_type);
  539. char* over_system_total_monitor_to_json(_OverBackStsInfo* _over_back_system_info);
  540. char* over_power_trend_to_json(_OverAllPwrAckInfo* _over_all_pwr_back_info);
  541. cJSON* json_to_chn_pwr_status_monitor(const char* str,_OverChnPwrRequest* _over_chn_pwr_request);
  542. char* over_chn_pwr_monitor_to_json(_OverChnPwrAckInfo* _over_chn_pwr_back_info);
  543. int json_to_overall_sensor_status(const char* str,_OverSensorRequest* _over_all_sensor_request);
  544. char* over_all_sensor_info_to_json(_OverSensorBackInfo* _over_all_sensor_back_info,int nWSType);
  545. char* ws_sensor_status_ack_to_json(GlobalSensorManger* _globalSensorManger);
  546. char* over_sensor_history_info_to_json(_OverSensorBackInfo* _over_all_sensor_back_info, int sensor_type);
  547. char* alarm_info_to_json(_AlarmAckInfo* _alarm_ack_info,int nAllNumber);
  548. char* alarm_type_info_to_json(_AlarmAckInfo* _alarm_ack_info,int nAllNumber);
  549. char* alarm_ctrl_type_info_to_json(_AlarmAckInfo* _alarm_ack_info,int nAlarmNum);
  550. char* alarm_power_threshold_to_json(GlobalPowerManger* _globalPowerManger);
  551. char* alarm_sensor_threshold_to_json(GlobalSensorManger* _globalSensorManger);
  552. char* communication_net_ack_to_json(NetworkInfo_t* _networkInfo_t);
  553. char* communication_rs_ack_to_json(ModbusInfo_t* _modbusInfo_t);
  554. char* communication_4G_ack_to_json(CellularManager* _CellularManagerTemp,int nWSType);
  555. char* communication_WIFI_ack_to_json(WIFIManager* _WIFIManagertemp,int nWSType);
  556. char* service_ds_ack_to_json(char* chn_name,char* chn_id,_PowerDSManage_t* __powerDSManage_t);
  557. char* service_ds_all_ack_to_json(char* pDate,char* Name,char* nchID,GlobalPowerManger* __powerDSManage_t);
  558. char* service_sx_ack_to_json(int product_id, GlobalPowerManger * __PowerManage_t);
  559. char* service_ntp_ack_to_json(NTPManager* __NTPManager_t);
  560. char* service_snmp_ack_to_json(SNMPManager* sm);
  561. char* service_mail_ack_to_json(mail_info_t* info);
  562. char* service_mqtt_ack_to_json(mqtt_info_t* info);
  563. char* mqtt_status_to_json(int mode);
  564. char* service_group_ack_to_json(GroupInfo* _globalgroupInfo);
  565. ///请求管理
  566. cJSON* json_to_sensor_manage(const char* str,_OverSensorRequest* _overSensorRequest);
  567. cJSON* json_to_alarm_manage(const char* str,_AlarmRequestInfo* _alarm_request_info);
  568. cJSON* json_to_loginformation_manage(const char* str,_LogInformationRequestInfo* _logInformationRequestInfo);
  569. cJSON* json_to_communication_manage(const char* str,_CommunicationManageRequestInfo* _communicationRequestInfo);
  570. cJSON* json_to_service_manage(const char* str,_ServiceManageRequestInfo* _serviceManageRequestInfo);
  571. cJSON* json_to_user_manage(const char* str,_UserRoleManageInfo* _UserRoleManageRequestInfo);
  572. char* ws_over_status_ack_to_json(int type,_OverAllPwrAckInfo* _over_all_pwr_back_info);
  573. char* ws_chn_status_ack_to_json(int type,_OverChnPwrAckInfo* _over_chn_pwr_back_info,GlobalDeviceManager *gdm);
  574. int json_to_switch_language(const char* str);
  575. int GetRoleIDByUserName(char* _userName,UserInfo* __UserInfo_t);
  576. int GetRoleLevelByID(int _RoleID,RoleInfo* __RoleInfo_t);
  577. char* GetRoleNameByID(int _RoleID,RoleInfo* __RoleInfo_t);
  578. int GetRoleIDByName(char* _RoleName,RoleInfo* __RoleInfo_t);
  579. char* service_userQuery_ack_to_json(char* _userName,UserInfo* __UserInfo_t,RoleInfo* __RoleInfo_t,char* _SelName,int pagenum,int pagesize);
  580. char* service_userRole_ack_to_json(char* _userName,UserInfo* __UserInfo_t,RoleInfo* __RoleInfo_t);
  581. char* over_breaker_product_list_info_to_json(GlobalDeviceManager *dm,_OverBackBreakerInfo* _over_back_sts_info,bool curFlag);
  582. char* over_all_breaker_chn_info_to_json(_OverBreakerChnInfo* _over_all_breaker_back_info,int nWSType);
  583. char* over_all_breaker_switch_info_to_json(_OverBreakerSwitchInfo* _over_all_breaker_switch_info,int nWSType);
  584. char *breaker_status_ack_to_json(GlobalDeviceManager *gm,int slave);
  585. char *threshold_status_ack_to_json(GlobalDeviceManager *dm);
  586. char* upgrade_to_json(void);
  587. char* board_to_json(handle_t l, int is_ws);
  588. char *upg_chk_to_json(int r);
  589. #endif