fe.h 759 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef FE_H
  2. #define FE_H
  3. #define FE_NBR_MAX 1
  4. struct fe_t
  5. {
  6. char szinfo[32];
  7. char szmodel[32];
  8. int model;
  9. int idx;
  10. int model_nbr;
  11. int sub_model_nbr;
  12. char data[1024 * 10];
  13. };
  14. extern struct fe_t fe[FE_NBR_MAX + 1];
  15. int fe_init();
  16. int fe_send_sm_cmd(int idx, int cmd);
  17. int fe_send_sm_cmd_all(int cmd);
  18. int fe_chk_state_all(int stat);
  19. int fe_get_comm_st(int idx);
  20. int fe_get_nbr();
  21. char *fe_get_model_str(int idx);
  22. int fe_get_chan_idx(int idx);
  23. int fe_get_tool_data(char *buf);
  24. int fe_get_tbmqtt_data(char *buf);
  25. int fe_get_cloud_data(int ctn_idx, char *buf);
  26. int fe_get_model();
  27. int fe_get_init_data(int ctn_idx, char *buf);
  28. int fe_set_start(int startIdx);
  29. int fe_get_modbus_data(int idx, unsigned short* data);
  30. #endif /* FE_H */