up_4g.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #ifndef _DEAL_DA_4G_H_
  2. #define _DEAL_DA_4G_H_
  3. #include "../Hardware/boardinit.h"
  4. typedef struct _system_cmd_0x2041_{
  5. uint16_t devType; //设备类型
  6. uint32_t devSn; //设备SN
  7. uint32_t reserve; //预留
  8. }__attribute__((packed))systemCmd0x2041;
  9. typedef struct _system_cmd_0x2025_{ // 路由表上报
  10. uint16_t devType;
  11. uint32_t devSn;
  12. uint16_t targetType;
  13. uint32_t targetSn;
  14. uint32_t reserve;
  15. }__attribute__((packed))systemCmd0x2025;
  16. typedef struct _sytem_cmd_0x2030_{
  17. uint16_t devTypeM;
  18. uint32_t devSnM;
  19. uint16_t devTypeS;
  20. uint32_t devSnS;
  21. uint8_t cfgfileNo[8];
  22. uint32_t reserve;
  23. uint8_t para[28];
  24. }__attribute__((packed))systemCmd0x2030;
  25. extern void up_system_cmd_0x2041(uint8_t *outdata, uint8_t *len);
  26. extern void up_system_cmd_0x2025(uint8_t *data, uint8_t *len, uint16_t devType, uint32_t devSn);
  27. extern void up_system_cmd_0x2030(uint8_t *data, uint8_t *seg8data, uint8_t *cfgfile, uint8_t *len);
  28. typedef struct _update_cmd_0x2001_{
  29. uint16_t devType;
  30. uint32_t devSn;
  31. uint32_t appVer;
  32. uint16_t taskId;
  33. uint32_t reserve;
  34. }__attribute__((packed))updateCmd0x2001;
  35. typedef struct _update_cmd_0x2002_{
  36. uint16_t devTypeM;
  37. uint32_t devSnM;
  38. uint16_t devTypeS;
  39. uint32_t devSnS;
  40. uint8_t firmType; // 固件类型
  41. uint16_t taskId;
  42. uint8_t updateCode;
  43. uint32_t reserve;
  44. }__attribute__((packed))updateCmd0x2002;
  45. extern void up_update_cmd_0x2001(uint8_t *outdata, uint8_t *len,uint16_t taskId);
  46. extern void up_update_cmd_0x2002(uint8_t *outdata, uint8_t *len,uint16_t devType, uint32_t devSn,uint16_t taskId,uint8_t firmType,uint8_t updateCode);
  47. typedef struct _data_cmd_0x2061_{
  48. uint16_t devTypeM;
  49. uint32_t devSnM;
  50. uint16_t devTypeS;
  51. uint32_t devSnS;
  52. uint32_t reserve;
  53. uint8_t bnewflag; // 新交易标识
  54. uint8_t palen;
  55. uint8_t para[128];
  56. }__attribute__((packed))dataCmd0x2061;
  57. extern void up_data_cmd_0x2061(uint8_t *outdata, uint8_t *len, uint32_t devSn, uint16_t devType, uint8_t bnewflag, uint8_t *da, uint8_t dalen);
  58. typedef struct _data_cmd_0x2062_{
  59. uint16_t devTypeM;
  60. uint32_t devSnM;
  61. uint16_t devTypeS;
  62. uint32_t devSnS;
  63. uint32_t reserve;
  64. uint8_t palen;
  65. uint8_t para[128];
  66. }__attribute__((packed))dataCmd0x2062;
  67. extern void up_data_cmd_0x2062(uint8_t *outdata, uint8_t *len, uint32_t devSn, uint16_t devType, uint8_t *da, uint8_t dalen);
  68. #endif