Onboard-SDK-ROS
DJI_App.h
Go to the documentation of this file.
1 
13 #ifndef DJI_APP_H
14 #define DJI_APP_H
15 
16 #include <stdint.h>
17 
18 #include "DJI_Link.h"
19 #include "DJI_Type.h"
20 
21 #define MSG_ENABLE_FLAG_LEN 2
22 
23 //----------------------------------------------------------------------
24 // App layer function
25 //----------------------------------------------------------------------
26 typedef struct
27 {
28  unsigned short sequence_number;
29  unsigned char session_id : 5;
30  unsigned char need_encrypt : 1;
31  unsigned char reserve : 2;
32 } req_id_t;
33 
34 #define EXC_DATA_SIZE (16u)
35 #define SET_CMD_SIZE (2u)
36 
37 //----------------------------------------------------------------------
38 // for cmd agency
39 //----------------------------------------------------------------------
40 #define REQ_TIME_OUT 0x0000
41 #define REQ_REFUSE 0x0001
42 #define CMD_RECIEVE 0x0002
43 #define STATUS_CMD_EXECUTING 0x0003
44 #define STATUS_CMD_EXE_FAIL 0x0004
45 #define STATUS_CMD_EXE_SUCCESS 0x0005
46 
48 #pragma pack(1)
49 
50 typedef struct ActivateData
51 {
52  unsigned int ID;
53  unsigned int reserved;
54  unsigned int version;
55  unsigned char iosID[32];
56  char *encKey;
57 } ActivateData;
58 
59 typedef struct VersionData
60 {
61  unsigned short version_ack;
62  unsigned int version_crc;
63  char hw_serial_num[11];
64  char version_name[32];
66 } VersionData;
67 
68 #pragma pack()
69 
70 #endif // DJI_APP_H
Definition: DJI_App.h:50
Definition: DJI_App.h:26
uint32_t Version
Definition: DJI_Version.h:34
struct ActivateData ActivateData
Definition: DJI_App.h:59