ups.h 793 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef __UPS_H__
  2. #define __UPS_H__
  3. struct ups_t{
  4. char szinfo[32];
  5. char szmodel[32];
  6. int model;
  7. int idx;
  8. };
  9. int ups_init();
  10. int ups_send_sm_cmd( int cmd );
  11. int ups_get_model();
  12. int ups_chk_stat(int stat);
  13. int ups_get_batv();
  14. int ups_get_temp();
  15. char* ups_get_status_str();
  16. int ups_get_line();
  17. int ups_get_comm_state();
  18. int ups_set_dbg( int val );
  19. int ups_get_line_fault();
  20. int ups_get_ups_fault();
  21. int ups_get_bat_low();
  22. int ups_get_status();
  23. char* ups_get_info_str();
  24. int ups_get_chan_idx();
  25. int ups_get_adr();
  26. int ups_get_tick();
  27. char* ups_get_comm_state_str();
  28. char* ups_get_model_str();
  29. char* ups_get_state_str();
  30. int ups_get_tool_data(char* buf);
  31. int ups_get_tbmqtt_data(char* buf);
  32. int ups_get_cloud_data(int ctn_idx,char* buf);
  33. int ups_get_bkds_data(char* buf);
  34. #endif