pcs.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. #ifndef PCS_H
  2. #define PCS_H
  3. #include "plt.h"
  4. #define PCS_NBR_MAX 1
  5. struct pcs_t{
  6. char szinfo[32];
  7. char szmodel[32];
  8. int model;
  9. int idx;
  10. char data[1024*10];
  11. };
  12. extern struct pcs_t pcs[PCS_NBR_MAX + 1];
  13. int pcs_init();
  14. int pcs_get_comm_state();
  15. int pcs_send_sm_cmd(int cmd);
  16. int pcs_chk_state( int stat );
  17. int pcs_get_ap();
  18. int pcs_get_aps();
  19. double pcs_get_ia();
  20. double pcs_get_ib();
  21. double pcs_get_ic();
  22. double pcs_get_ua();
  23. double pcs_get_ub();
  24. double pcs_get_uc();
  25. double pcs_get_uab();
  26. double pcs_get_ubc();
  27. double pcs_get_uac();
  28. int pcs_get_state();
  29. char* pcs_get_state_str();
  30. int pcs_get_step();
  31. int pcs_get_tick();
  32. double pcs_get_tick_ave();
  33. double pcs_get_tick_cur();
  34. double pcs_get_tick_max();
  35. int pcs_get_chan_idx();
  36. char* pcs_get_err_str();
  37. int pcs_get_adr();
  38. char* pcs_get_comm_state_str();
  39. double pcs_get_dac_ave();
  40. double pcs_get_dac_cur();
  41. double pcs_get_dac_max();
  42. int pcs_get_bsytikchk_en();
  43. int pcs_get_bsytikchk_from_host();
  44. int pcs_get_bsytikchk_timeout();
  45. int pcs_get_runstat();
  46. char* pcs_get_runstat_str();
  47. int pcs_get_dc_ovp();
  48. int pcs_get_dc_uvp();
  49. int pcs_get_dc_dfp();
  50. int pcs_get_ac_brk();
  51. int pcs_get_dc_brk();
  52. int pcs_get_emg_btn();
  53. double pcs_get_igbt_temp();
  54. int pcs_get_temp_igbt_a();
  55. int pcs_get_temp_igbt_b();
  56. int pcs_get_temp_igbt_c();
  57. int pcs_get_temp_reactor();
  58. int pcs_get_temp_env();
  59. int pcs_get_errstat();
  60. int pcs_set_aps(int aps);
  61. int pcs_get_dcv();
  62. int pcs_get_dcc();
  63. int pcs_set_dev_aps(int aps);
  64. int pcs_set_dev_startcmd();
  65. int pcs_set_dev_stopcmd();
  66. int pcs_set_dev_idlecmd();
  67. int pcs_set_dev_resetcmd();
  68. int pcs_set_bsytik();
  69. int pcs_set_datetime(int year, int month, int day, int hour, int minute, int second);
  70. int pcs_set_dac_param_en(int val);
  71. double pcs_get_grid_freq();
  72. double pcs_get_gridv();
  73. double pcs_get_gridc();
  74. int pcs_get_comm_st();
  75. int pcs_set_bsytikchk_en(int val);
  76. int pcs_set_dev_runmod(int val);
  77. char* pcs_get_model_str();
  78. char* pcs_get_info();
  79. int pcs_get_env_otp();
  80. int pcs_get_reactor_otp();
  81. int pcs_get_igbt_otp();
  82. int pcs_get_dcp();
  83. int pcs_get_breaker_ac();
  84. int pcs_get_breaker_dc();
  85. int pcs_get_dcbuf_cont();
  86. unsigned short* pcs_get_faults();
  87. unsigned short* pcs_get_warns();
  88. int pcs_get_dac_param_en();
  89. int pcs_get_tool_data(char * buf);
  90. int pcs_get_tbmqtt_main_data(char* buf);
  91. int pcs_get_tbmqtt_secondy_data(char* buf);
  92. int pcs_get_tbmqtt_data_interval_30s(char* buff);
  93. int pcs_get_tbmqtt_data_interval_60s(char* buff);
  94. int pcs_get_tbmqtt_data_interval_half_hour(char* buff);
  95. int pcs_get_cloud_main_data(int cnt_idx,char* buf);
  96. int pcs_get_cloud_secondy_data(int cnt_idx,char* buf);
  97. int pcs_get_bkds_data(char * buf);
  98. double pcs_get_chg_e_total();
  99. double pcs_get_dhg_e_total();
  100. int pcs_set_dc_mode(int mode);
  101. int pcs_set_vh(double vh);
  102. int pcs_set_vl(double vl);
  103. int pcs_set_Iset(double Iset);
  104. int pcs_set_ovp_enable(int enable);
  105. int pcs_set_ovp(double ovp);
  106. int pcs_set_uvp_enable(int enable);
  107. int pcs_set_uvp(double uvp);
  108. int pcs_set_ocp_enable(int enable);
  109. int pcs_set_ocp(double ocp);
  110. int pcs_get_init_data(int ctn_idx, char *buf);
  111. int pcs_get_modbus_data(unsigned short* data);
  112. int pcs_is_run();
  113. int pcs_sync_clock(int year, int month, int day, int hour, int minute, int second);
  114. #endif /* PCS_H */