dji_payload_device.hpp
Go to the documentation of this file.
1 
10 #ifndef PAYLOAD_DEVICE_HPP
11 #define PAYLOAD_DEVICE_HPP
12 
13 #include "dji_vehicle_callback.hpp"
14 
15 using namespace DJI::OSDK;
16 
17 namespace DJI
18 {
19  namespace OSDK
20  {
21 
22 // Forward Declarations
23  class Vehicle;
24 
36  {
37  public:
38  PayloadDevice(Vehicle* vehicle = 0);
39  ~PayloadDevice();
40 
41  /*
42  * Vehicle
43  */
44  public:
45  Vehicle* getVehicle() const;
46  void setVehicle(Vehicle* value);
47  public:
48  const static uint16_t MAX_SIZE_OF_PACKAGE = 255;
49  private:
50  Vehicle* vehicle;
51 
52  public:
60  void sendDataToPSDK(uint8_t* data, uint16_t len);
61  static void getDataFromPSDKCallback(Vehicle* vehiclePtr,
62  RecvContainer recvFrame,
63  UserData userData);
64 
65  public:
66  VehicleCallBackHandler fromPSDKHandler;
74  void setFromPSDKCallback(VehicleCallBack callback, UserData userData = 0);
75  };
76 
77  } // OSDK
78 } // DJI
79 
80 #endif //PAYLOAD_DEVICE_HPP
81 
82 
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 Payload-Onboard SDK Communication.
Definition: dji_payload_device.hpp:35
Definition: dji_ack.cpp:38