dji_vehicle_callback.hpp
Go to the documentation of this file.
1 
29 #ifndef DJI_VEHICLECALLBACK_H
30 #define DJI_VEHICLECALLBACK_H
31 
32 #include "dji_ack.hpp"
33 #include "dji_log.hpp"
34 #include "dji_type.hpp"
35 
36 namespace DJI
37 {
38 namespace OSDK
39 {
40 class Vehicle;
41 
42 
48 typedef struct DispatchInfo
49 {
50  bool isAck;
51  bool isCallback;
52  uint8_t callbackID;
53 } DispatchInfo;
54 
59 typedef struct RecvContainer
60 {
61  DJI::OSDK::ACK::Entry recvInfo;
62  DJI::OSDK::ACK::TypeUnion recvData;
63  DJI::OSDK::DispatchInfo dispatchInfo;
65 
66 
69 
76 typedef void (*VehicleCallBack)(Vehicle* vehicle, RecvContainer recvFrame,
77  UserData userData);
78 
83 typedef struct VehicleCallBackHandler
84 {
85  VehicleCallBack callback;
86  UserData userData;
88 
93 typedef struct CommonCallBackHandler
94 {
95  void* callback;
96  UserData userData;
98 
99 
100 } // namespace OSDK
101 } // namespace DJI
102 #endif /* DJI_VEHICLECALLBACK_H */
void * UserData
This is used as the datatype for all data arguments in callbacks.
Definition: dji_type.hpp:75
struct DJI::OSDK::VehicleCallBackHandler VehicleCallBackHandler
The CallBackHandler struct allows users to encapsulate callbacks and data in one struct.
struct DJI::OSDK::RecvContainer RecvContainer
Received info.
The CallBackHandler struct allows users to encapsulate callbacks and data in one struct....
Definition: dji_vehicle_callback.hpp:93
void(* VehicleCallBack)(Vehicle *vehicle, RecvContainer recvFrame, UserData userData)
Function prototype for all callback functions used in the OSDK.
Definition: dji_vehicle_callback.hpp:76
struct DJI::OSDK::CommonCallBackHandler CommonCallBackHandler
The CallBackHandler struct allows users to encapsulate callbacks and data in one struct....
Dispatch info.
Definition: dji_vehicle_callback.hpp:48
Received info.
Definition: dji_vehicle_callback.hpp:59
The CallBackHandler struct allows users to encapsulate callbacks and data in one struct.
Definition: dji_vehicle_callback.hpp:83
Data type and Data Structure definitions for use throughout DJI OSDK.
Definition: dji_ack.cpp:38
All DJI OSDK ACK parsing.
struct DJI::OSDK::DispatchInfo DispatchInfo
Dispatch info.