dji_payload_link.hpp
Go to the documentation of this file.
1 
29 #ifndef ONBOARDSDK_DJI_PAYLOAD_LINK_HPP
30 #define ONBOARDSDK_DJI_PAYLOAD_LINK_HPP
31 
32 #include "dji_vehicle_callback.hpp"
33 
34 namespace DJI {
35 namespace OSDK {
36 class PayloadLink {
37  public:
38  PayloadLink(Vehicle *vehicle);
39 
40  ~PayloadLink();
41 
54  void sendAsync(const uint8_t cmd[], void *pdata, size_t len, void *callBack,
55  UserData userData, int timeout = 500, int retry_time = 2);
56 
57  ACK::ExtendedFunctionRsp *sendSync(const uint8_t cmd[], void *pdata,
58  size_t len, int timeout);
59 
60  void sendToPSDK(uint8_t *data, uint16_t len);
61 
62  public:
63  Vehicle *getVehicle() const {return vehicle;};
64 
65  void setVehicle(Vehicle *value) {vehicle = value;};
66 
67  private:
68  Vehicle *vehicle;
69 
70 };
71 } // namespace OSDK
72 } // namespace DJI
73 
74 #endif // ONBOARDSDK_DJI_PAYLOAD_LINK_HPP
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.
Definition: dji_ack.cpp:38