dji_mobile_device.hpp
Go to the documentation of this file.
1 
11 #ifndef MOBILEDEVICE_H
12 #define MOBILEDEVICE_H
13 
14 #include "dji_vehicle_callback.hpp"
15 
16 using namespace DJI::OSDK;
17 
18 namespace DJI
19 {
20 namespace OSDK
21 {
22 
23 // Forward Declarations
24 class Vehicle;
25 
35 {
36 public:
37  MobileDevice(Vehicle* vehicle = 0);
38  ~MobileDevice();
39 
40  /*
41  * Vehicle
42  */
43 public:
44  Vehicle* getVehicle() const;
45  void setVehicle(Vehicle* value);
46 
47 private:
48  Vehicle* vehicle;
49 
50  /*
51  * Communication
52  */
53 public:
61  void sendDataToMSDK(uint8_t* data, uint8_t len);
62  static void getDataFromMSDKCallback(Vehicle* vehiclePtr,
63  RecvContainer recvFrame,
64  UserData userData);
65 
66 public:
67  VehicleCallBackHandler fromMSDKHandler;
75  void setFromMSDKCallback(VehicleCallBack callback, UserData userData = 0);
76 };
77 
78 } // OSDK
79 } // DJI
80 
81 #endif // MOBILEDEVICE_H
void * UserData
This is used as the datatype for all data arguments in callbacks.
Definition: dji_type.hpp:75
Type definition for new Vehicle-style callbacks.
void(* VehicleCallBack)(Vehicle *vehicle, RecvContainer recvFrame, UserData userData)
Function prototype for all callback functions used in the OSDK.
Definition: dji_vehicle_callback.hpp:76
Definition: dji_ack.cpp:40
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
APIs for Mobile-Onboard SDK Communication.
Definition: dji_mobile_device.hpp:34
Definition: dji_ack.cpp:38