app.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /****************************************************************************
  2. *
  3. * Copy right: 2017-, Copyrigths of EigenComm Ltd.
  4. * File name: app.h
  5. * Description: EC616 onenet demo entry header file
  6. * History: Rev1.0 2018-07-12
  7. *
  8. ****************************************************************************/
  9. #ifndef APP_H
  10. #define APP_H
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. #include "cisAsynEntry.h"
  15. // #define QMSG_ID_BASE (0x160)
  16. // #define QMSG_ID_NW_IPV4_READY (QMSG_ID_BASE)
  17. // #define QMSG_ID_NW_IPV6_READY (QMSG_ID_BASE + 1)
  18. // #define QMSG_ID_NW_IPV4_6_READY (QMSG_ID_BASE + 2)
  19. // #define QMSG_ID_NW_DISCONNECT (QMSG_ID_BASE + 3)
  20. // #define QMSG_ID_SOCK_SENDPKG (QMSG_ID_BASE + 4)
  21. // #define QMSG_ID_SOCK_RECVPKG (QMSG_ID_BASE + 5)
  22. #define QMSG_ID_BASE (0x160)
  23. #define QMSG_ID_NW_IP_READY (QMSG_ID_BASE)
  24. #define QMSG_ID_NW_IP_SUSPEND (QMSG_ID_BASE + 1)
  25. #define QMSG_ID_NW_IP_NOREACHABLE (QMSG_ID_BASE + 2)
  26. #define QMSG_ID_SOCK_SENDPKG (QMSG_ID_BASE + 4)
  27. #define QMSG_ID_SOCK_RECVPKG (QMSG_ID_BASE + 5)
  28. typedef enum
  29. {
  30. APP_INIT_STATE,
  31. APP_DEACTIVE_STATE,
  32. APP_IPREADY_STATE,
  33. APP_REPORT_STATE,
  34. APP_IDLE_STATE,
  35. APP_WAIT_STATE
  36. } appRunningState_t;
  37. typedef struct Uart_Receive_Type
  38. {
  39. uint8_t Bms_Address;
  40. uint8_t Bms_Read_Funcode;
  41. uint8_t Reg_Begin_H;
  42. uint8_t Reg_Begin_L;
  43. uint8_t Reg_Num_H;
  44. uint8_t Reg_Num_L;
  45. }Uart_Receive_Type;
  46. uint8_t* Uart_Receive_func(Uart_Receive_Type Uart_Receive_Msg,uint8_t* Uart_Rece_buffer,uint8_t Data_Len);
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif /* APP_H */