pws1.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  1. #ifndef __PWS1_H__
  2. #define __PWS1_H__
  3. #define PWS1_NBR_MAX (1)
  4. enum pws1_cmd_t{
  5. CMD_pws1_set_dev_aps = 0,
  6. CMD_pws1_set_dev_startcmd,
  7. CMD_pws1_set_dev_stopcmd,
  8. CMD_pws1_set_dev_idlecmd,
  9. CMD_pws1_set_dev_resetcmd,
  10. };
  11. enum pws1_runstat_t{
  12. PWS1_RUNSTAT_PCS_INIT = 0,
  13. PWS1_RUNSTAT_INIT = 1,
  14. PWS1_RUNSTAT_STOP = 2,
  15. PWS1_RUNSTAT_IDLE,
  16. PWS1_RUNSTAT_DHG,
  17. PWS1_RUNSTAT_CHG,
  18. PWS1_RUNSTAT_UNKOWNING,
  19. };
  20. enum pws1_runmod_t{
  21. PWS1_RUNMOD_ONGRID = 0,
  22. PWS1_RUNMOD_OFFGRID = 1,
  23. PWS1_RUNMOD_UNKOWNING,
  24. };
  25. enum pws1_dispatch_t{
  26. PWS1_DISPATCH_MODE_AC = 0,
  27. PWS1_DISPATCH_MODE_DC = 1,
  28. PWS1_DISPATCH_MODE_STRING = 2,
  29. };
  30. enum pws1_ac_power_control_mode_t{
  31. PWS1_AC_POWER_CONTROL_MODE_FIX_AC_POWER = 0,
  32. PWS1_AC_POWER_CONTROL_MODE_V_W,
  33. PWS1_AC_POWER_CONTROL_MODE_F_W,
  34. PWS1_AC_POWER_CONTROL_MODE_VW_FW,
  35. };
  36. enum pws1_cmd_src_t{
  37. PWS1_CMD_SRC_LOCAL_MAN = 0,
  38. PWS1_CMD_SRC_LOCAL_AUTO = 1,
  39. PWS1_CMD_SRC_REMOTE = 2,
  40. PWS1_CMD_SRC_UNKOWNING = 3,
  41. };
  42. typedef union
  43. {
  44. /* data */
  45. unsigned short value;
  46. struct {
  47. unsigned short ac_bus_ov:1; //bit0 Fault
  48. unsigned short ac_bus_of:1; //bit1 Fault
  49. unsigned short ac_bus_uv:1; //bit2 Fault
  50. unsigned short ac_island_pro:1; //bit3 Fault
  51. unsigned short dc_input_ov:1; //bit4 Fault
  52. unsigned short on_off_grid_tog:1; //bit5 Fault
  53. unsigned short ac_phase_revers:1; //bit6 Fault
  54. unsigned short dc_input_uv:1; //bit7 Fault
  55. unsigned short overload_alarm:1; //bit8 alarm
  56. unsigned short ac_bus_v_abnormal:1; //bit9 Fault
  57. unsigned short ac_phase_lost:1; //bit10 Fault
  58. unsigned short ac_bus_v_asym:1; //bit11 Fault
  59. unsigned short ac_bus_u_fre:1; //bit12 Fault
  60. unsigned short bat_under_energy:1; //bit13 Fault
  61. unsigned short dc_input_oc:1; //bit14 Fault
  62. unsigned short offgrid_v_phase_rever:1; //bit15 Fault
  63. }bits_val;
  64. }PWS1_STATUS0;
  65. typedef union
  66. {
  67. /* data */
  68. unsigned short value;
  69. struct {
  70. unsigned short pll_fault:1; //bit0 Fault
  71. unsigned short ambient_ot:1; //bit1 Alarm
  72. unsigned short ambient_temp_sensor:1; //bit2 Fault
  73. unsigned short cabinet_temp_sensor:1; //bit3 Fault
  74. unsigned short cabinet_ot:1; //bit4 Fault
  75. unsigned short offgrid_v_phase_lost:1; //bit5 Fault
  76. unsigned short ac_current_harmonic_abmormal:1; //bit6 Fault
  77. }bits_val;
  78. }PWS1_STATUS1;
  79. typedef union
  80. {
  81. /* data */
  82. unsigned short value;
  83. struct {
  84. unsigned short aux_24v_power_fault:1; //bit0 Fault
  85. unsigned short emergency_stop:1; //bit1 Fault
  86. unsigned short ground_fault:1; //bit2 Fault
  87. unsigned short dc_bus_ov:1; //bit3 Fault
  88. unsigned short module_ot:1; //bit4 Fault
  89. unsigned short module_current_asy:1; //bit5 Fault
  90. unsigned short fan_fault:1; //bit6 Fault
  91. unsigned short dc_relay_open_circuit:1; //bit7 Fault
  92. unsigned short Cali_param_abnormal:1; //bit8 alarm
  93. unsigned short bus_v_unbalanced:1; //bit9 Fault
  94. unsigned short fuse_blown:1; //bit10 Fault
  95. unsigned short dsp_init_fault:1; //bit11 Fault
  96. unsigned short dc_soft_start_failed:1; //bit12 Fault
  97. unsigned short CANA_comm:1; //bit13 Fault
  98. unsigned short dc_input_rever:1; //bit14 Fault
  99. unsigned short ac_current_dc_component_abnormal:1; //bit15 Fault
  100. }bits_val;
  101. }PWS1_STATUS2;
  102. typedef union
  103. {
  104. /* data */
  105. unsigned short value;
  106. struct {
  107. unsigned short transf_ot:1; //bit0 Fault
  108. unsigned short u2_comm2:1; //bit1 alarm
  109. unsigned short bms_or_swithoff:1; //bit2 Fault
  110. unsigned short SPD_fault:1; //bit3 alarm
  111. unsigned short over_load_timeout:1; //bit4 Fault
  112. unsigned short ac_soft_start_fault:1; //bit5 Fault
  113. unsigned short syn_sig1:1; //bit6 Fault
  114. unsigned short dps_version:1; //bit7 Fault
  115. unsigned short ac_relay_open_circuit:1; //bit8 Fault
  116. unsigned short sample_zero:1; //bit9 alarm
  117. unsigned short u2_comm1:1; //bit10 alarm
  118. unsigned short aux_15v_power:1; //bit11 Fault
  119. unsigned short module_id_re:1; //bit12 Fault
  120. unsigned short rs485_comm:1; //bit13 Fault
  121. unsigned short CANB_comm:1; //bit14 Fault
  122. unsigned short restart_too_much:1; //bit15 Fault
  123. }bits_val;
  124. }PWS1_STATUS3;
  125. typedef union
  126. {
  127. /* data */
  128. unsigned short value;
  129. struct {
  130. unsigned short CPLD_version:1; //bit0 Fault
  131. unsigned short HW_version:1; //bit1 Fault
  132. unsigned short dc_relay_short_circuit:1; //bit2 Fault
  133. unsigned short dc_bus_uv:1; //bit3 Fault
  134. unsigned short ac_relay_short_circuit:1; //bit4 Fault
  135. unsigned short syn_sig2:1; //bit5 Fault
  136. unsigned short param_mismatch:1; //bit6 Fault
  137. unsigned short CANC_comm:1; //bit7 alarm
  138. unsigned short ambient_oh:1; //bit8 Fault
  139. unsigned short bms_ov:1; //bit9 Fault
  140. unsigned short bms_c_abnormal:1; //bit10 Fault
  141. unsigned short bms_t_abmormal:1; //bit11 Fault
  142. unsigned short bms_shutdown:1; //bit12 Fault
  143. unsigned short insulation_detection:1; //bit13 Fault
  144. unsigned short hw_sample_abnormal:1; //bit14 Fault
  145. unsigned short remote_lost:1; //bit15 Fault
  146. }bits_val;
  147. }PWS1_STATUS4;
  148. typedef union
  149. {
  150. /* data */
  151. unsigned short value;
  152. struct {
  153. unsigned short reseve:4;
  154. unsigned short PE_N_contactor_short:1; //bit4 Fault
  155. unsigned short PE_N_contactor_open:1; //bit5 Fault
  156. unsigned short N_contractor_short:1; //bit6 Fault
  157. unsigned short N_contractor_open:1; //bit7 Fault
  158. unsigned short grid_access:1; //bit8 switch
  159. unsigned short grid_powerdown:1; //bit9 switch
  160. unsigned short grid_voltage_distortion:1; //bit10 switch
  161. unsigned short input_dry_contact4:1; //bit11 Fault
  162. unsigned short input_dry_contact5:1; //bit12 alarm
  163. }bits_val;
  164. }PWS1_STATUS9;
  165. typedef union
  166. {
  167. unsigned short value;
  168. struct {
  169. unsigned short on_off_status:1;//ac模块组:起停状态 0:stop,1:running
  170. unsigned short reserv:1;
  171. unsigned short on_grid_status:1;//ac模块组:并网状态 0:false,1:true
  172. unsigned short off_grid_status:1;//ac模块组:离网状态 0:false,1:true
  173. unsigned short startup_status:1;//ac模块组:启动中状态 0:false,1:true
  174. unsigned short reserv1:4;
  175. unsigned short local_manual_ctl:1;//本地手动控制状态 0:false,1:true
  176. unsigned short local_auto_ctl:1;//本地自动控制状态 0:false,1:true
  177. unsigned short remote_control:1;//远程控制状态 0:false,1:true
  178. }bits_val;
  179. }PWS1_STATUS10;
  180. typedef union
  181. {
  182. unsigned short value;
  183. struct {
  184. unsigned short reserv:4;//
  185. unsigned short droop_status:1;//下垂状态 0:false;1:true
  186. unsigned short quasi_sysnch_status:1;//准同期状态 0:false;1:true
  187. unsigned short reserv1:2;
  188. unsigned short ac_switch_closed:1;//交流开关闭合 0:open;1:close
  189. unsigned short alarm_status:1;//告警状态 0:false;1:true
  190. unsigned short faults_status:1;//故障状态 0:false;1:true
  191. unsigned short reserv2:1;//
  192. unsigned short pcs_init_status:1;//pcs初始化状态 0:unfinished;1:finished
  193. }bits_val;
  194. }PWS1_STATUS11;
  195. typedef union
  196. {
  197. unsigned short value;
  198. struct {
  199. unsigned short string1_bt_fully_chg:1;//0:false;1:true
  200. unsigned short string1_bt_empty_dhg:1;//0:false;1:true
  201. unsigned short string1_chg:1;//0:false;1:true
  202. unsigned short string1_dhg:1;//0:false;1:true
  203. unsigned short reserve:2;//0:false;1:true
  204. unsigned short string1_bt_constant_v_top_chg:1;//0:false;1:true
  205. unsigned short string1_bt_constant_v_float_chg:1;//0:false;1:true
  206. }bits_val;
  207. }PWS1_STATUS13;
  208. typedef union
  209. {
  210. unsigned short value;
  211. struct {
  212. unsigned short ac_module1_online:1;//ac模块组1在线,0:false;1:true
  213. unsigned short ac_module2_online:1;//ac模块组2在线,0:false;1:true
  214. unsigned short ac_module3_online:1;//ac模块组3在线,0:false;1:true
  215. unsigned short ac_module4_online:1;//ac模块组4在线,0:false;1:true
  216. unsigned short ac_module5_online:1;//ac模块组5在线,0:false;1:true
  217. unsigned short ac_module6_online:1;//ac模块组6在线,0:false;1:true
  218. unsigned short ac_module7_online:1;//ac模块组7在线,0:false;1:true
  219. unsigned short ac_module8_online:1;//ac模块组8在线,0:false;1:true
  220. unsigned short ac_module9_online:1;//ac模块组9在线,0:false;1:true
  221. unsigned short ac_module10_online:1;//ac模块组10在线,0:false;1:true
  222. unsigned short rack_func_board_online:1;//机架功能板在线,0:false;1:true
  223. }bits_val;
  224. }PWS1_STATUS25;
  225. typedef union
  226. {
  227. unsigned short value;
  228. struct {
  229. unsigned short ac_module1_running:1;//ac模块组1运行,0:false;1:true
  230. unsigned short ac_module2_running:1;//ac模块组2运行,0:false;1:true
  231. unsigned short ac_module3_running:1;//ac模块组3运行,0:false;1:true
  232. unsigned short ac_module4_running:1;//ac模块组4运行,0:false;1:true
  233. unsigned short ac_module5_running:1;//ac模块组5运行,0:false;1:true
  234. unsigned short ac_module6_running:1;//ac模块组6运行,0:false;1:true
  235. unsigned short ac_module7_running:1;//ac模块组7运行,0:false;1:true
  236. unsigned short ac_module8_running:1;//ac模块组8运行,0:false;1:true
  237. unsigned short ac_module9_running:1;//ac模块组9运行,0:false;1:true
  238. unsigned short ac_module10_running:1;//ac模块组10运行,0:false;1:true
  239. }bits_val;
  240. }PWS1_STATUS27;
  241. typedef union
  242. {
  243. unsigned short value;
  244. struct {
  245. unsigned short ac_module1_alarm:1;//ac模块组1报警,0:false;1:true
  246. unsigned short ac_module2_alarm:1;//ac模块组2报警,0:false;1:true
  247. unsigned short ac_module3_alarm:1;//ac模块组3报警,0:false;1:true
  248. unsigned short ac_module4_alarm:1;//ac模块组4报警,0:false;1:true
  249. unsigned short ac_module5_alarm:1;//ac模块组5报警,0:false;1:true
  250. unsigned short ac_module6_alarm:1;//ac模块组6报警,0:false;1:true
  251. unsigned short ac_module7_alarm:1;//ac模块组7报警,0:false;1:true
  252. unsigned short ac_module8_alarm:1;//ac模块组8报警,0:false;1:true
  253. unsigned short ac_module9_alarm:1;//ac模块组9报警,0:false;1:true
  254. unsigned short ac_module10_alarm:1;//ac模块组10报警,0:false;1:true
  255. unsigned short rack_func_board_alarm:1;//机架功能板报警,0:false;1:true
  256. }bits_val;
  257. }PWS1_STATUS29;
  258. typedef union
  259. {
  260. unsigned short value;
  261. struct {
  262. unsigned short ac_module1_fault:1;//ac模块组1故障,0:false;1:true
  263. unsigned short ac_module2_fault:1;//ac模块组2故障,0:false;1:true
  264. unsigned short ac_module3_fault:1;//ac模块组3故障,0:false;1:true
  265. unsigned short ac_module4_fault:1;//ac模块组4故障,0:false;1:true
  266. unsigned short ac_module5_fault:1;//ac模块组5故障,0:false;1:true
  267. unsigned short ac_module6_fault:1;//ac模块组6故障,0:false;1:true
  268. unsigned short ac_module7_fault:1;//ac模块组7故障,0:false;1:true
  269. unsigned short ac_module8_fault:1;//ac模块组8故障,0:false;1:true
  270. unsigned short ac_module9_fault:1;//ac模块组9故障,0:false;1:true
  271. unsigned short ac_module10_fault:1;//ac模块组10故障,0:false;1:true
  272. unsigned short rack_func_board_fault:1;//机架功能板故障,0:false;1:true
  273. }bits_val;
  274. }PWS1_STATUS31;
  275. struct pws1_t{
  276. //int chan_idx;
  277. char szinfo[32];
  278. char szmodel[32];
  279. int model;
  280. //int adr; // modbus rtu addr, by cfg
  281. struct tick_t bsytik;
  282. struct power_t pow;
  283. struct comm_t comm;
  284. //struct dac_t dac;
  285. struct statemachine_t sm;
  286. int cmd; // sm cmd
  287. //read only
  288. //ac_group fault and alarm
  289. PWS1_STATUS0 status0;//53000
  290. PWS1_STATUS1 status1;//53001
  291. PWS1_STATUS2 status2;//53002
  292. PWS1_STATUS3 status3;//53003
  293. PWS1_STATUS4 status4;//53004
  294. PWS1_STATUS9 status9;//53009
  295. PWS1_STATUS10 status10;//53010
  296. PWS1_STATUS11 status11;//53011
  297. PWS1_STATUS13 status13;//53013
  298. PWS1_STATUS25 status25;//53025
  299. PWS1_STATUS27 status27;//53027
  300. PWS1_STATUS29 status29;//53029
  301. PWS1_STATUS31 status31;//53031
  302. int runState;
  303. char szrunState[40];//
  304. int runMode;
  305. char szrunMode[40];
  306. int cmdSrc;
  307. char szcmdSrc[40];
  308. int DCbrokerState;
  309. char szDCbrokerState[40];
  310. int errstatus;
  311. int alarmstatus;
  312. double Uab;
  313. double Ubc;
  314. double Uca;
  315. double Ia;
  316. double Ib;
  317. double Ic;
  318. double grid_freq;
  319. double Pa;
  320. double Pb;
  321. double Pc;
  322. double Qa;
  323. double Qb;
  324. double Qc;
  325. double Sa;
  326. double Sb;
  327. double Sc;
  328. double Pfa;
  329. double Pfb;
  330. double Pfc;
  331. double module_temp;
  332. double ambient_temp;
  333. double Ps;
  334. double Qs;
  335. double Ss;
  336. double Pfs;
  337. unsigned int chg_accu_energy_ac;
  338. unsigned int dhg_accu_energy_ac;
  339. double operate_capacity_max;
  340. int chg_daily_energy_ac;
  341. int dhg_daily_energy_ac;
  342. double Pdc;
  343. double Udc;
  344. double Idc;
  345. unsigned int chg_accu_energy_dc;
  346. unsigned int dhg_accu_energy_dc;
  347. char CabSN[30];
  348. unsigned short MonitorSoftInerCode;
  349. unsigned short ACsoftInerCode;
  350. unsigned short U2softInerCode;
  351. unsigned short softwareV;
  352. //rw data---------------------------------------------------------------------------------------------------------------------------
  353. unsigned short grid_mode;//ongrid or off grid
  354. char szgrid_mode[20];
  355. unsigned short energy_dispatching_mode;
  356. char szEnergy_dispatching_mode[40];
  357. unsigned short start_up_mode;
  358. char szStart_up_mode[40];
  359. unsigned short reactive_power_cotrol_mode;
  360. double Pf_setpoint;// reg * 0.01
  361. double active_p_set;// reg * 0.1
  362. double reactive_p_set;// reg * 0.1
  363. unsigned short power_change_mode;
  364. char szPower_change_mode[40];
  365. unsigned short grid_reconnect_delay;
  366. double offgrid_ac_voltage_regulation;// reg * 0.01
  367. double offgrid_ac_freq_regulation;
  368. unsigned short FVRT_limit_fun;
  369. unsigned short FVRT_fun_enable;
  370. unsigned short anti_islanding_enable;
  371. unsigned short offgrid_ac_vol_startup_mode;
  372. char szOffgrid_ac_vol_startup_mode[40];
  373. unsigned short active_power_control_mode;
  374. char szActive_power_control_mode[40];
  375. double RR_normal_ramp_rate;
  376. double SS_soft_start_ramp_rate;
  377. unsigned short dc_control_mode;
  378. char szDc_control_mode[40];
  379. double dc_current_set;//reg*0.1
  380. double dc_pset;//reg*0.1
  381. double dc_lower_v_threshold;//reg * 0.1
  382. double dc_end_of_dhg_v;//reg * 0.1
  383. double top_chg_v;//reg * 0.1
  384. double end_of_chg_current;//reg * 0.1
  385. double max_chg_current;//reg * 0.1
  386. double max_dhg_current;//reg * 0.1
  387. double ov_region1_boundary;
  388. double ov_region1_trip_time;
  389. double ov_region2_boundary;
  390. double ov_region2_trip_time;
  391. double uv_region1_boundary;
  392. double uv_region1_trip_time;
  393. double uv_region2_boundary;
  394. double uv_region2_trip_time;
  395. double of_region1_boundary;
  396. double of_region1_trip_time;
  397. double of_region2_boundary;
  398. double of_region2_trip_time;
  399. double uf_region1_boundary;
  400. double uf_region1_trip_time;
  401. double uf_region2_boundary;
  402. double uf_region2_trip_time;
  403. unsigned short stop_insuation_detection;
  404. unsigned short year;
  405. unsigned short month;
  406. unsigned short day;
  407. unsigned short hour;
  408. unsigned short minute;
  409. unsigned short second;
  410. unsigned short bms_comm_time_out;
  411. unsigned short rs485_comm_time_out;
  412. unsigned short tcp_comm_time_out;
  413. unsigned short sys_start;
  414. unsigned short sys_stop;
  415. unsigned short sys_clear_faults;
  416. };
  417. extern struct pws1_t pws1[PWS1_NBR_MAX + 1];
  418. int pws1_init();
  419. int pws1_send_sm_cmd( int idx, int cmd );
  420. int pws1_get_ap( int idx );
  421. int pws1_get_errstat( int idx );
  422. double pws1_get_uab( int idx );
  423. double pws1_get_ubc( int idx );
  424. double pws1_get_uca( int idx );
  425. double pws1_get_ia( int idx );
  426. double pws1_get_ib( int idx );
  427. double pws1_get_ic( int idx );
  428. int pws1_get_state( int idx );
  429. int pws1_get_step( int idx );
  430. int pws1_get_tick( int idx );
  431. double pws1_get_tick_ave( int idx );
  432. double pws1_get_tick_cur( int idx );
  433. double pws1_get_tick_max( int idx );
  434. char* pws1_get_state_str( int idx );
  435. char* pws1_get_err_str( int idx );
  436. int pws1_chk_state( int idx, int stat );
  437. //int pws1_load_params( int idx );
  438. int pws1_set_aps( int idx, int aps);
  439. int pws1_get_aps(int idx);
  440. int pws1_reset_aps(int idx);
  441. int pws1_get_runstat( int idx );
  442. //char* pws1_get_runstat_str( int idx );
  443. int pws1_get_dcv( int idx );
  444. int pws1_get_dcc( int idx );
  445. //int pws1_get_dc_dfp( int idx );
  446. //int pws1_set_dev_startcmd( int idx );
  447. //int pws1_set_dev_stopcmd( int idx );
  448. //int pws1_set_dev_idlecmd( int idx );
  449. //int pws1_set_dev_resetcmd( int idx );
  450. int pws1_reset_bsytikchk(int idx);
  451. int pws1_is_bsytikchk_timeout(int idx);
  452. int pws1_set_bsytikchk_en(int idx, int val);
  453. int pws1_get_bsytikchk_en(int idx);
  454. int pws1_get_bsytikchk_from_host(int idx);
  455. int pws1_set_bsytik(int idx);
  456. int pws1_get_dev_aps( int idx );
  457. int pws1_get_cmd( int idx );
  458. void pws1_reset_cmd( int idx );
  459. int pws1_is_aps_changed(int idx);
  460. int pws1_get_last_aps(int idx);
  461. int pws1_set_dac_param_en(int idx, int val);
  462. //double pws1_get_gridv( int idx );
  463. //double pws1_get_gridc( int idx );
  464. int pws1_get_comm_st(int idx);
  465. int pws1_get_runmod( int idx );
  466. int pws1_get_chan_idx(int idx);
  467. int pws1_get_adr(int idx);
  468. char* pws1_get_comm_state_str(int idx);
  469. double pws1_get_dac_ave(int idx);
  470. double pws1_get_dac_cur(int idx);
  471. double pws1_get_dac_max(int idx);
  472. // int pws1_get_dc_ovp( int idx );
  473. // int pws1_get_dc_uvp( int idx );
  474. // int pws1_get_env_otp( int idx );
  475. // int pws1_get_reactor_otp( int idx );
  476. // int pws1_get_igbt_otp( int idx );
  477. double pws1_get_grid_freq( int idx );
  478. int pws1_get_dcp( int idx );
  479. // int pws1_get_breaker_ac( int idx );
  480. // int pws1_get_breaker_dc( int idx );
  481. // int pws1_get_dcbuf_cont( int idx );
  482. // unsigned short* pws1_get_faults(int idx);
  483. // unsigned short* pws1_get_warns(int idx);
  484. int pws1_get_dac_param_en(int idx);
  485. char* pws1_get_info_str(int idx);
  486. int pws1_get_dispatch_mode( int idx);
  487. int pws1_get_active_power_control_mode( int idx);
  488. int pws1_get_dhg_state( int idx);
  489. int pws1_get_chg_state( int idx);
  490. int pws1_get_tool_data(int idx,char* buf);
  491. int pws1_get_tbmqtt_main_data(int idx,char* buf);
  492. int pws1_get_tbmqtt_secondy_data(int idx,char* buf);
  493. int pws1_get_cloud_main_data(int cnt_idx,int idx,char* buf);
  494. int pws1_get_cloud_secondy_data(int cnt_idx,int idx,char* buf);
  495. int pws1_get_bkds_data(int idx,char* buf);
  496. #endif