30 #ifndef OSDK_CORE_INC_DJI_VEHICLE_H_ 31 #define OSDK_CORE_INC_DJI_VEHICLE_H_ 41 #include "dji_log.hpp" 56 #include "dji_battery.hpp" 58 #ifdef ADVANCED_SENSING 61 #if defined(__linux__) 86 typedef struct ActivateData
97 Vehicle(Linker* linker);
101 LegacyLinker* legacyLinker;
110 #if defined(__linux__) 121 #if defined(__linux__) 126 #ifdef ADVANCED_SENSING 130 DJIBattery* djiBattery;
131 int functionalSetUp();
172 bool setUSBFlightOn(
bool en);
183 bool setSimulationOn(
bool en, float64_t latitude, float64_t longitude);
189 static void activateCallback(Vehicle* vehiclePtr,
RecvContainer recvFrame,
195 static void getDroneVersionCallback(Vehicle* vehiclePtr,
229 ActivateData getAccountData()
const;
236 void setAccountData(
const ActivateData& value);
243 void setVersion(
const Version::FirmWare& value);
246 static HeartBeatPack heartBeatPack;
247 static uint8_t fcLostConnectCount;
248 const static uint8_t kMaxFCLostConnectCount = 5;
249 const static uint8_t kOSDKSendId;
250 const static uint32_t kHeartBeatPackSendTimeInterval;
253 Version::FirmWare getFwVersion()
const;
254 char* getHwVersion()
const;
255 char* getHwSerialNum()
const;
262 Version::VersionData versionData;
263 ActivateData accountData;
266 bool is_activated =
false;
267 bool encrypt =
false;
281 static bool parseDroneVersionInfo(Version::VersionData& versionData,
285 const int wait_timeout = 1000;
286 const int GIMBAL_MOUNTED = 1;
287 static const uint8_t NUM_CMD_SET = 10;
291 void setEncryption(
bool encryptSetting);
292 bool getEncryption();
293 bool getActivationStatus();
299 bool initLegacyLinker();
300 bool initSubscriber();
301 bool initBroadcast();
306 bool initMobileDevice();
307 bool initPayloadDevice();
308 bool initMissionManager();
309 bool initWaypointV2Mission();
311 bool initCameraManager();
312 bool initFlightController();
313 bool initPSDKManager();
314 bool initGimbalManager();
315 #if defined(__linux__) 317 bool initMopServer();
319 bool initOSDKHeartBeatThread();
320 #ifdef ADVANCED_SENSING 321 bool initAdvancedSensing();
323 bool initDJIBattery();
325 #ifdef ADVANCED_SENSING 331 void processAdvancedSensingImgs(
RecvContainer* receivedFrame);
333 bool advSensingErrorPrintOnce;
339 void setActivationStatus(
bool is_activated);
340 void initCMD_SetSupportMatrix();
341 bool isCmdSetSupported(
const uint8_t cmdSet);
343 void sendBuriedDataPkgToFC(
void);
345 static void fcLostConnectCallBack(
void);
346 static uint8_t sendHeartbeatToFCFunc(Linker * linker);
347 T_OsdkTaskHandle sendHeartbeatToFCHandle;
348 static void *sendHeartbeatToFCTask(
void *arg);
void * UserData
This is used as the datatype for all data arguments in callbacks.
Definition: dji_type.hpp:75
Gimbal API for OSDK library.
Implementation of the mop client.
The manager of camera module.
Definition: dji_camera_manager.hpp:42
Definition: dji_waypoint_v2.hpp:52
APIs for controlling Hardware Sync.
Definition: dji_hardware_sync.hpp:57
DJI health manager system of drone.
Definition: dji_hms.hpp:97
Define CMD_SET support matrix.
Definition: dji_version.hpp:112
Broadcast Telemetry API for DJI onboardSDK library.
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.
Flight control API: high-level actions and low-level control modes.
Definition: dji_control.hpp:48
Control API for DJI OSDK library.
MFIO API for DJI OSDK library.
APIs for Multi-Function Input-Output functionality.
Definition: dji_mfio.hpp:56
Hardware Sync API for DJI OSDK.
void(* VehicleCallBack)(Vehicle *vehicle, RecvContainer recvFrame, UserData userData)
Function prototype for all callback functions used in the OSDK.
Definition: dji_vehicle_callback.hpp:76
Legacy adapting in linker for OSDK 3.9.
Mission-Manager API for DJI OSDK library.
Definition: dji_advanced_sensing.hpp:69
The manager of gimbal module.
Definition: dji_gimbal_manager.hpp:39
MissionManager class for chaining/managing missions.
Definition: dji_mission_manager.hpp:62
Telemetry API through asynchronous "Subscribe"-style messages.
Definition: dji_subscription.hpp:180
Received info.
Definition: dji_vehicle_callback.hpp:59
Implementation of DJI Mobile Device Abstraction.
Telemetry API through asynchronous "Broadcast"-style messages.
Definition: dji_broadcast.hpp:52
Flight controller API: set or get parameter, execute flight actions.
Definition: dji_flight_controller.hpp:42
Implementation of the manager for gimbal module.
Data type and Data Structure definitions for use throughout DJI OSDK.
This struct is returned from the DJI::OSDK::Vehicle::getDroneVersion blocking API.
Definition: dji_ack.hpp:245
APIs for Mobile-Onboard SDK Communication.
Definition: dji_mobile_device.hpp:34
APIs for Payload-Onboard SDK Communication.
Definition: dji_payload_device.hpp:35
HMS(Health Management System) API for DJI OSDK @Details Provide API to subscribe Flight's Health Stat...
Implementation of GPS Waypoint Missions for DJI OSDK.
The Gimbal class for controlling gimbal-related functions.
Definition: dji_gimbal.hpp:46
Definition: dji_ack.cpp:38
The manager of psdk module.
Definition: dji_psdk_manager.hpp:41
Telemetry Subscription API for DJI OSDK library.
Drone/SDK Version definition for DJI onboardSDK library.
All DJI OSDK ACK parsing.
Implementation of the manager for psdk module.
Class providing APIs & data structures for acting as a MOP server.
Definition: dji_mop_server.hpp:43
Implementation of the manager for camera module.
Camera/Gimbal API for DJI onboardSDK library.
Status information for DJI Vehicle.
Implementation of flight controller.
Implementation of DJI Payload Device Abstraction.
Camera class for controlling camera-related functions available through open protocol.
Definition: dji_camera.hpp:49