json_handle.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  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;//1三项2单项3二相
  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. int OperAllowFlag; //允许操作状态 0-允许操作 1-不允许操作
  151. char* mac_addr;
  152. char* ip_addr;
  153. float voltage ;//电压
  154. float current ;//电流
  155. float power ;//功率
  156. float freq ;//频率
  157. float consumption ;//耗电量
  158. float factor ;
  159. unsigned short product_ch_start_delay ;//通道延时
  160. unsigned short product_ch_stop_delay ;//通道延时
  161. int product_type; //通道类型
  162. int product_phType; //三相类型
  163. float ph_voltage ;//电压
  164. float ph_current ;//电流
  165. float ph_power ;//功率
  166. float ph_consumption ;//耗电量
  167. int ph_outputType ;//输出类型
  168. int ph_outputStatus ;//输出状态-该通道是否输出
  169. struct list_head list;
  170. }_OverChnPwrAckInfo;
  171. /// @brief 总体电源返回信息
  172. typedef struct
  173. {
  174. char* product_name;
  175. char* product_number;
  176. int product_id;
  177. float voltage ;//电压
  178. float current ;//电流
  179. float power ;//功率
  180. float freq ;//频率
  181. float consumption ;//耗电量
  182. float factor ;//功率因素
  183. _Get_Total_Value _total_voltage ;//电压统计
  184. _Get_Total_Value _total_current ;//电流统计
  185. _Get_Total_Value _total_power ;//功率统计
  186. _Get_Total_Value _total_consumption ;//耗电量统计
  187. _Power_Trend_Info _Power_Trend_Info ;//有功、无功、视在功率统计
  188. }_OverAllPwrAckInfo;
  189. /// @brief 传感器总体请求信息
  190. typedef struct
  191. {
  192. float ydata[2][60] ;//0:温度,1:湿度;
  193. char xAxis[60][32] ;//时间点
  194. }_Sensor_Temp_Humi_Icon;
  195. typedef struct
  196. {
  197. float ydata[60] ;//气体值
  198. char xAxis[60][32] ;//时间点
  199. }_Sensor_Gas_Icon;
  200. typedef struct
  201. {
  202. float ydata[60] ;//气体值
  203. char xAxis[60][32] ;//时间点
  204. }_Sensor_Temp_Icon;
  205. typedef struct
  206. {
  207. float ydata[2][60] ;//0:气流,1:气压;
  208. char xAxis[60][32] ;//时间点
  209. }_Sensor_Air_Press_Icon;
  210. typedef struct
  211. {
  212. char* user_token;
  213. char* type;
  214. char* productName;
  215. char* productNumber;
  216. char* productChName;
  217. char* productChId;
  218. char* startTime;
  219. char* endTime;
  220. char* page_num;
  221. char* page_size;
  222. int sensorId;
  223. char* sensorType;
  224. char* sensorName;
  225. char* comSlogan;
  226. char* cgqtd;
  227. char* sensorAddr;
  228. char* sensorBaud;
  229. char* connectionStatus;
  230. }_OverSensorRequest;
  231. /// @brief 传感器应答状态
  232. typedef struct
  233. {
  234. int accessControlStatus;
  235. char sensorAddr;
  236. int nodeNumber;
  237. float airPressureValue;
  238. float airflowValue;
  239. int alarmStatus;
  240. int sensorBaud;
  241. char comSlogan[32];
  242. int connectionStatus;
  243. int leakStatus;
  244. float gasConcentration;
  245. float humidityValue;
  246. float temperatureValue;
  247. char sensorName[64];
  248. char sensorId;
  249. char sensorType;
  250. int waterImmersionState;
  251. char sensorvaluech[32];
  252. float temperatureValue2;
  253. _Sensor_Temp_Humi_Icon temp_humi_sensor;
  254. _Sensor_Gas_Icon gas_sensor;
  255. _Sensor_Air_Press_Icon air_press_sensor;
  256. _Sensor_Temp_Icon temp_sensor;
  257. struct list_head list;
  258. }_OverSensorBackInfo;
  259. /// @brief 电源类阈值设置
  260. typedef struct
  261. {
  262. char* alarmContentUpperValue;
  263. char* currentUpperValue;
  264. char* powerUpperValue;
  265. char productChId;
  266. char* productChName;
  267. char* voltageDownValue;
  268. char* voltageUpperValue;
  269. bool bUpdatealarmContentUpperValue;
  270. bool bUpdatecurrentUpperValue;
  271. bool bUpdatepowerUpperValue;
  272. bool bUpdatevoltageDownValue;
  273. bool bUpdatevoltageUpperValue;
  274. char* currentUpperAction;
  275. char* voltageUpperAction;
  276. char*voltageDownAction;
  277. char* powerUpperAction;
  278. char* alarmContentUpperAction;
  279. }_Power_AlarmRequestInfo;
  280. /// @brief 传感器类阈值设置
  281. typedef struct
  282. {
  283. char* connectionStatus ;
  284. int sensorId;
  285. char* sensorName;
  286. char* sensorType;
  287. char* thresholdType;
  288. char* thresholdDownValue;
  289. char* thresholdUpperValue;
  290. char *thresholdDownAction;
  291. char *thresholdUpperAction;
  292. char *thresholdUpperChanel;
  293. char *thresholdDownChanel;
  294. }_Sensor_AlarmRequestInfo;
  295. /// @brief 告警信息查询
  296. typedef struct
  297. {
  298. char* user_token;
  299. char* type;
  300. int pagenum;
  301. int pagesize;
  302. char *startTime;
  303. char *endTime;
  304. _Power_AlarmRequestInfo _pwr_info;
  305. _Sensor_AlarmRequestInfo _sensor_info;
  306. char* strProductChIds;
  307. }_AlarmRequestInfo;
  308. /// @brief 告警响应信息
  309. typedef struct
  310. {
  311. char alarmNumber[16];
  312. char alarmDate[32];
  313. char alarmType;
  314. char deviceNumber[16];
  315. char deviceName[32];
  316. char alarmContent[128];
  317. struct list_head list;
  318. }_AlarmAckInfo;
  319. /// @brief SMPT服务信息
  320. typedef struct
  321. {
  322. char* mode;
  323. char* account;
  324. char* password;
  325. char* server;
  326. char* port;
  327. char* auth;
  328. char* recvAccount[MAIL_RECV_MAX];
  329. }_MAIL_ServerRequestInfo;
  330. typedef struct
  331. {
  332. int idx;
  333. int mode;
  334. char* sid;
  335. char* name;
  336. char* server;
  337. char* port;
  338. char* cid;
  339. char* user;
  340. char* password;
  341. char* status; //connect status
  342. }_MQTT_ServerRequestInfo;
  343. /// @brief SNMP信息
  344. typedef struct
  345. {
  346. char* mode;
  347. char* version;
  348. char* public;
  349. char* trapmode;
  350. char* user;
  351. char* auth_alg;
  352. char* auth_passwd;
  353. char* priv_alg;
  354. char* priv_passwd;
  355. char* nms_IP;
  356. }_SNMP_ServerRequestInfo;
  357. /// @brief SNMP TRAP信息
  358. typedef struct
  359. {
  360. char* mode;
  361. char* stType;
  362. }_SNMPTRAP_ServerRequestInfo;
  363. /// @brief NTP信息
  364. typedef struct
  365. {
  366. char* mode;
  367. char* ntpName;
  368. char* ntpaddress;
  369. char* port;
  370. char* time;
  371. char* weekday;
  372. char* tzone;
  373. }_NTP_ServiceRequestInfo;
  374. /// @brief 定时设置
  375. typedef struct
  376. {
  377. char* productChName;
  378. char* productChId;
  379. int productChIds[64];
  380. char* idx[64];
  381. char* channelDate;
  382. char* StartDate;
  383. char* Enddate;
  384. char* channelTime;
  385. char* setStatus;
  386. }_DS_ServiceRequestInfo;
  387. /// @brief 时序设置
  388. typedef struct
  389. {
  390. char* productId;
  391. char* productChName;
  392. char* productChId;
  393. char* firingInterval;
  394. char* closeInterval;
  395. // char* firingInterval;
  396. // char* closeInterval;
  397. }_POSIX_ServiceRequestInfo;
  398. /// @brief 分组设置
  399. typedef struct
  400. {
  401. char* mode;
  402. char* xlnumber;
  403. char* jgnumber;
  404. char* opergroupid;
  405. char* updategroupName;
  406. }_GROUP_ServiceRequestInfo;
  407. /// @brief 服务信息查询
  408. typedef struct
  409. {
  410. char* user_token;
  411. char* type;
  412. _MQTT_ServerRequestInfo _mqtt_info;
  413. _MAIL_ServerRequestInfo _smtp_info ;
  414. _SNMP_ServerRequestInfo _snmp_info ;
  415. _SNMPTRAP_ServerRequestInfo _snmp_trap_info;
  416. _NTP_ServiceRequestInfo _ntp_info ;
  417. _DS_ServiceRequestInfo _ds_info;
  418. _POSIX_ServiceRequestInfo _posix_info;
  419. _GROUP_ServiceRequestInfo _group_info;
  420. char* productName;
  421. }_ServiceManageRequestInfo;
  422. /// @brief 网络参数配置
  423. typedef struct
  424. {
  425. char* mode;
  426. char* ipaddr;
  427. char* maskaddr;
  428. char* gateway;
  429. char* dns1;
  430. char* dns2;
  431. }_NET_CommunicationRequestInfo;
  432. /// @brief RS参数配置
  433. typedef struct
  434. {
  435. char* mode;
  436. char* baud;
  437. char* addr;
  438. }_RS_CommunicationRequestInfo;
  439. /// @brief 4G和WiFi参数配置
  440. typedef struct
  441. {
  442. int Cellular_mode;
  443. int WIFI_mode;
  444. char WIFI_name[64];
  445. char WIFI_code[64];
  446. char recvAccount[MAIL_RECV_MAX][64];
  447. }_4G_WIFI_CommunicationRequestInfo;
  448. /// @brief 通信信息查询
  449. typedef struct
  450. {
  451. char* user_token;
  452. char* type;
  453. _NET_CommunicationRequestInfo _net_info;
  454. _RS_CommunicationRequestInfo _rs_info;
  455. _4G_WIFI_CommunicationRequestInfo _4g_wifi_info;
  456. }_CommunicationManageRequestInfo;
  457. /// @brief日志信息查询
  458. typedef struct
  459. {
  460. char* user_token;
  461. char* type;
  462. char* alarmType;
  463. char* startTime;
  464. char* endtime;
  465. int pagenum;
  466. int pagesize;
  467. char* openName;
  468. }_LogInformationRequestInfo;
  469. /// @brief 日志应答类容
  470. typedef struct
  471. {
  472. char* alarm_number;
  473. char* alarm_date;
  474. char alarm_type;
  475. int product_id;
  476. char product_name[32];
  477. char alarmContent[64];
  478. }_LogInformationAckInfo;
  479. /// @brief 设备维护
  480. typedef struct
  481. {
  482. char* user_token;
  483. char* type;
  484. char* product_name;
  485. char* product_id;
  486. char* product_number;
  487. /// @brief breaker infomation
  488. char* cjfs;
  489. char* comkh;
  490. char* cjdz;
  491. char* jdh;
  492. char* productChids;
  493. /////
  494. int switchId;
  495. char* switchName;
  496. char* cleanSelectItem;
  497. }_Equipment_Mintenance;
  498. /// @brief 用户角色管理
  499. typedef struct
  500. {
  501. char* user_token;
  502. char* type;
  503. char* createTime;
  504. int userId;
  505. char* userName;
  506. char* nickName;//用途不明?
  507. bool delFlag;//用途不明?
  508. int roleId;
  509. char* roleName;
  510. char* password;
  511. int userIds;
  512. int pagenum;
  513. int pagesize;
  514. }_UserRoleManageInfo;
  515. char* ctrl_sts_ack_to_json(void);
  516. char* ctrl_breaker_err_ack_to_json(char *string);
  517. void get_rand_str(char* s,int num);
  518. char* json_to_Token_info(const char* strHead);
  519. int json_to_User_login_info(const char* str,_User_Log* _newUserLogin);
  520. int json_to_User_loginOut_info(const char* str,char** _UserLoginOutToken);
  521. char* log_info_to_json(const char* token);
  522. char* log_LoginFailedinfo_to_json();
  523. char* log_AthFailedinfo_to_json();
  524. char* user_info_to_json(void);
  525. char* user_routers_info_to_json(void);
  526. char* json_to_system_config_info(int tls);
  527. cJSON* json_to_overall_status_monitor(const char* str,_Over_All_Sts_Monitor* _over_all_sts_monitor);
  528. char* over_all_monitor_to_json(_OverBackStsInfo* _over_back_sts_info);
  529. char* overall_power_history_to_json(GlobalPowerInfo* _globalPowerInfo,GlobalDeviceInfo* _globalDeviceInfo);
  530. char* over_channel_power_history_to_json(GlobalPowerInfo* _globalPowerInfo,GlobalDeviceInfo* _globalDeviceInfo,char* chn_name,char chn);
  531. cJSON* json_to_overall_pwr_status_monitor(const char* str,_OverAllPwrRequest* _over_all_pwr_request);
  532. cJSON* json_to_over_equipment_mintenance(const char* str,_Equipment_Mintenance* _over_equipment_mintenance);
  533. char* over_product_list_info_to_json(GlobalDeviceManager *dm, _OverBackStsInfo* _over_back_sts_info,bool curFlag);
  534. char* vendor_info_to_json(GlobalDeviceInfo *dev);
  535. char* over_all_pwr_monitor_to_json(int phaseType,_OverAllPwrAckInfo* _over_all_pwr_back_info);
  536. 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);
  537. char* over_all_total_info_to_json(_OverAllPwrAckInfo* _over_all_pwr_back_info, int total_type);
  538. void over_all_total_info_t_ac_to_json(_OverAllPwrAckInfo* _over_all_pwr_back_info,cJSON* dataJson,cJSON* AxisJson, int total_type);
  539. int over_init_data_t_ac_to_json(cJSON* pAllJson,cJSON* dataJson[],cJSON* AxisJson,int total_type);
  540. 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);
  541. char* over_system_total_monitor_to_json(_OverBackStsInfo* _over_back_system_info);
  542. char* over_power_trend_to_json(_OverAllPwrAckInfo* _over_all_pwr_back_info);
  543. cJSON* json_to_chn_pwr_status_monitor(const char* str,_OverChnPwrRequest* _over_chn_pwr_request);
  544. char* over_chn_pwr_monitor_to_json(_OverChnPwrAckInfo* _over_chn_pwr_back_info);
  545. int json_to_overall_sensor_status(const char* str,_OverSensorRequest* _over_all_sensor_request);
  546. char* over_all_sensor_info_to_json(_OverSensorBackInfo* _over_all_sensor_back_info,int nWSType);
  547. char* ws_sensor_status_ack_to_json(GlobalSensorManger* _globalSensorManger);
  548. char* over_sensor_history_info_to_json(_OverSensorBackInfo* _over_all_sensor_back_info, int sensor_type);
  549. char* alarm_info_to_json(_AlarmAckInfo* _alarm_ack_info,int nAllNumber);
  550. char* alarm_type_info_to_json(_AlarmAckInfo* _alarm_ack_info,int nAllNumber);
  551. char* alarm_ctrl_type_info_to_json(_AlarmAckInfo* _alarm_ack_info,int nAlarmNum);
  552. char* alarm_power_threshold_to_json(GlobalPowerManger* _globalPowerManger);
  553. char* alarm_sensor_threshold_to_json(GlobalSensorManger* _globalSensorManger);
  554. char* communication_net_ack_to_json(NetworkInfo_t* _networkInfo_t);
  555. char* communication_rs_ack_to_json(ModbusInfo_t* _modbusInfo_t);
  556. char* communication_4G_ack_to_json(CellInfo_t* _CellularManagerTemp,int nWSType);
  557. char* communication_WIFI_ack_to_json(WIFIInfo_t* _WIFIManagertemp,int nWSType);
  558. char* service_ds_ack_to_json(char* chn_name,char* chn_id,_PowerDSManage_t* __powerDSManage_t);
  559. char* service_ds_all_ack_to_json(char* pDate,char* Name,char* nchID,GlobalPowerManger* __powerDSManage_t,int nWSType);
  560. char* service_sx_ack_to_json(int product_id, GlobalPowerManger * __PowerManage_t);
  561. char* service_ntp_ack_to_json(NTPManager* __NTPManager_t);
  562. char* service_snmp_ack_to_json(SNMPManager* sm);
  563. char* service_mail_ack_to_json(mail_info_t* info);
  564. char* service_mqtt_ack_to_json(mqtt_info_t* info,int nWSType);
  565. char* mqtt_status_to_json(int mode);
  566. char* service_group_ack_to_json(GroupInfo* _globalgroupInfo);
  567. ///请求管理
  568. cJSON* json_to_sensor_manage(const char* str,_OverSensorRequest* _overSensorRequest);
  569. cJSON* json_to_alarm_manage(const char* str,_AlarmRequestInfo* _alarm_request_info);
  570. cJSON* json_to_loginformation_manage(const char* str,_LogInformationRequestInfo* _logInformationRequestInfo);
  571. cJSON* json_to_communication_manage(const char* str,_CommunicationManageRequestInfo* _communicationRequestInfo);
  572. cJSON* json_to_service_manage(const char* str,_ServiceManageRequestInfo* _serviceManageRequestInfo);
  573. cJSON* json_to_user_manage(const char* str,_UserRoleManageInfo* _UserRoleManageRequestInfo);
  574. char* ws_over_status_ack_to_json(int type,_OverAllPwrAckInfo* _over_all_pwr_back_info);
  575. char* ws_chn_status_ack_to_json(int type,_OverChnPwrAckInfo* _over_chn_pwr_back_info,GlobalDeviceManager *gdm);
  576. int json_to_switch_language(const char* str);
  577. int GetRoleIDByUserName(char* _userName,UserInfo* __UserInfo_t);
  578. int GetRoleLevelByID(int _RoleID,RoleInfo* __RoleInfo_t);
  579. char* GetRoleNameByID(int _RoleID,RoleInfo* __RoleInfo_t);
  580. int GetRoleIDByName(char* _RoleName,RoleInfo* __RoleInfo_t);
  581. char* service_userQuery_ack_to_json(char* _userName,UserInfo* __UserInfo_t,RoleInfo* __RoleInfo_t,char* _SelName,int pagenum,int pagesize);
  582. char* service_userRole_ack_to_json(char* _userName,UserInfo* __UserInfo_t,RoleInfo* __RoleInfo_t);
  583. char* over_breaker_product_list_info_to_json(GlobalDeviceManager *dm,_OverBackBreakerInfo* _over_back_sts_info,bool curFlag);
  584. char* over_all_breaker_chn_info_to_json(_OverBreakerChnInfo* _over_all_breaker_back_info,int nWSType);
  585. char* over_all_breaker_switch_info_to_json(_OverBreakerSwitchInfo* _over_all_breaker_switch_info,int nWSType);
  586. char *breaker_status_ack_to_json(GlobalDeviceManager *gm,int slave);
  587. char *threshold_status_ack_to_json(GlobalDeviceManager *dm);
  588. char* upgrade_to_json(void);
  589. char* board_to_json(handle_t l, int is_ws);
  590. char *upg_chk_to_json(int r);
  591. #endif