pcs.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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_errstat();
  48. int pcs_set_aps(int aps);
  49. int pcs_get_dcv();
  50. int pcs_get_dcc();
  51. int pcs_set_dev_aps(int aps);
  52. int pcs_set_dev_startcmd();
  53. int pcs_set_dev_stopcmd();
  54. int pcs_set_dev_idlecmd();
  55. int pcs_set_dev_resetcmd();
  56. int pcs_set_bsytik();
  57. int pcs_set_datetime(int year, int month, int day, int hour, int minute, int second);
  58. int pcs_set_dac_param_en(int val);
  59. double pcs_get_grid_freq();
  60. int pcs_get_comm_st();
  61. int pcs_set_bsytikchk_en(int val);
  62. int pcs_set_dev_runmod(int val);
  63. char* pcs_get_model_str();
  64. char* pcs_get_info();
  65. unsigned short* pcs_get_faults();
  66. unsigned short* pcs_get_warns();
  67. int pcs_get_dac_param_en();
  68. int pcs_get_tool_data(char * buf);
  69. int pcs_get_tbmqtt_main_data(char* buf);
  70. int pcs_get_tbmqtt_secondy_data(char* buf);
  71. int pcs_get_tbmqtt_data_interval_30s(char* buff);
  72. int pcs_get_tbmqtt_data_interval_60s(char* buff);
  73. int pcs_get_tbmqtt_data_interval_half_hour(char* buff);
  74. int pcs_get_cloud_main_data(int cnt_idx,char* buf);
  75. int pcs_get_cloud_secondy_data(int cnt_idx,char* buf);
  76. double pcs_get_chg_e_total();
  77. double pcs_get_dhg_e_total();
  78. int pcs_set_dc_mode(int mode);
  79. int pcs_set_vh(double vh);
  80. int pcs_set_vl(double vl);
  81. int pcs_set_Iset(double Iset);
  82. int pcs_set_ovp_enable(int enable);
  83. int pcs_set_ovp(double ovp);
  84. int pcs_set_uvp_enable(int enable);
  85. int pcs_set_uvp(double uvp);
  86. int pcs_set_ocp_enable(int enable);
  87. int pcs_set_ocp(double ocp);
  88. int pcs_get_init_data(int ctn_idx, char *buf);
  89. int pcs_get_modbus_data(unsigned short* data);
  90. int pcs_is_run();
  91. int pcs_sync_clock(int year, int month, int day, int hour, int minute, int second);
  92. double pcs_get_igbt_temp();
  93. #endif /* PCS_H */