dji_mission_base.hpp
Go to the documentation of this file.
1 
32 #ifndef ONBOARDSDK_DJI_MISSIONBASE_H
33 #define ONBOARDSDK_DJI_MISSIONBASE_H
34 
35 #include "dji_command.hpp"
36 #include "dji_type.hpp"
37 #include "dji_vehicle_callback.hpp"
38 
39 namespace DJI
40 {
41 namespace OSDK
42 {
43 
44 typedef enum MissionType {
45  MISSION_MODE_A,
46  MISSION_WAYPOINT,
47  MISSION_HOTPOINT,
48  MISSION_FOLLOW,
49  MISSION_IOC
50 } MissionType;
51 
52 class Vehicle;
53 
59 {
60 public:
61  MissionBase(Vehicle* vehicle = 0)
62  : vehicle(vehicle)
63  {
64  }
65  virtual ~MissionBase()
66  {
67  }
68 
69  virtual void start(VehicleCallBack callback = 0, UserData userData = 0) = 0;
70  virtual ACK::ErrorCode start(int timer) = 0;
71 
72  virtual void stop(VehicleCallBack callback = 0, UserData userData = 0) = 0;
73  virtual ACK::ErrorCode stop(int timer) = 0;
74 
75  virtual void pause(VehicleCallBack callback = 0, UserData userData = 0) = 0;
76  virtual ACK::ErrorCode pause(int timer) = 0;
77 
78  virtual void resume(VehicleCallBack callback = 0, UserData userData = 0) = 0;
79  virtual ACK::ErrorCode resume(int timer) = 0;
80 
81 protected:
82  Vehicle* vehicle;
83 }; // class MissionBase
84 
85 } // OSDK
86 } // DJI
87 
88 #endif // ONBOARDSDK_DJI_MISSIONBASE_H
void * UserData
This is used as the datatype for all data arguments in callbacks.
Definition: dji_type.hpp:75
This struct is returned from all blocking calls, except certain mission calls that have explicit type...
Definition: dji_ack.hpp:146
Type definition for new Vehicle-style callbacks.
Mission Base class for commonality between SDK Missions.
Definition: dji_mission_base.hpp:58
void(* VehicleCallBack)(Vehicle *vehicle, RecvContainer recvFrame, UserData userData)
Function prototype for all callback functions used in the OSDK.
Definition: dji_vehicle_callback.hpp:76
All DJI OSDK OpenProtocol Command IDs.
Data type and Data Structure definitions for use throughout DJI OSDK.
Definition: dji_ack.cpp:38