user_server.h 867 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef __USER_SERVER_H__
  2. #define __USER_SERVER_H__
  3. #include "define.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. typedef enum{
  8. COLL_NO_ITEMS = 0,
  9. COLL_ITEMS = 1,
  10. COLL_ERROR_ITEMS = 2,
  11. COLL_FAULT_ITEMS = 3,
  12. }coll_stat_type_e;
  13. typedef enum{
  14. NO_ITEMS_STAT = 0,
  15. TAKE_ITEMS_STAT = 1,
  16. PUT_ITEMS_STAT = 2,
  17. }items_stat_type_e;
  18. typedef struct{
  19. uint16_t coll_stat;
  20. uint16_t count;
  21. coll_stat_type_e sw_stat[DEV_MAX_COUNT];
  22. items_stat_type_e items_stat[DEV_MAX_COUNT];
  23. }__attribute__((packed))coll_data_s;
  24. void vUser_server_set_download_sw_stat(uint32_t stat);
  25. void vUser_server_set_coll_stat(uint16_t count);
  26. void vUser_server_set_items_stat(uint8_t idx, items_stat_type_e type);
  27. void vUser_server_init(void);
  28. extern coll_data_s coll_data;
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif //__USER_SERVER_H__