Class for handling acknowledgements from the aircraft. More...

#include <dji_ack.hpp>

Classes

struct  DroneVersion
 This struct is returned from the DJI::OSDK::Vehicle::getDroneVersion blocking API. More...
 
struct  ErrorCode
 This struct is returned from all blocking calls, except certain mission calls that have explicit types defined later in this file. More...
 
struct  FCTimeInUTC
 This struct captures PushData when subscribe to UTC & FC time in hardware sync. More...
 
struct  HotPointRead
 This struct is returned from the DJI::OSDK::HotpointMission::readData blocking API. More...
 
struct  HotPointStart
 This struct is returned from the DJI::OSDK::HotpointMission::start blocking API. More...
 
struct  ImageMeta
 sub-struct for stereo image with raw data and camera name More...
 
struct  MFIOGet
 This struct is returned from the DJI::OSDK::MFIO::getValue blocking API. More...
 
struct  ParamAck
 This struct is returned from the DJI::OSDK::Control::writeParameterByHash blocking API. More...
 
struct  StereoImgData
 This struct captures PushData when subscribe to QVGA images. More...
 
struct  StereoVGAImgData
 This struct captures PushData when subscribe to VGA images. More...
 
struct  WayPointAddPoint
 This struct is returned from the DJI::OSDK::WaypointMission::uploadIndexData blocking API. More...
 
struct  WayPointIndex
 This struct is returned from the DJI::OSDK::WaypointMission::waypointIndexDownload blocking API. More...
 
struct  WayPointInit
 This struct is used in the readInitData non-blocking API callback. More...
 
struct  WayPointReachedData
 This struct captures PushData while ground-station is enabled on Assistant's SDK Page, CMD: 0x02, 0x04. More...
 
struct  WayPointStatusPushData
 This struct captures PushData while ground-station is enabled on Assistant's SDK Page, CMD: 0x02, 0x03. More...
 
struct  WayPointVelocity
 This struct is returned from the DJI::OSDK::WaypointMission::updateIdleVelocity blocking API. More...
 

Public Types

typedef struct DJI::OSDK::ACK::Entry Entry
 
typedef struct DJI::OSDK::ACK::HotPointStartInternal HotPointStartInternal
 
typedef struct DJI::OSDK::ACK::HotPointReadInternal HotPointReadInternal
 
typedef struct DJI::OSDK::ACK::WayPointAddPointInternal WayPointAddPointInternal
 
typedef struct DJI::OSDK::ACK::WayPointIndexInternal WayPointIndexInternal
 
typedef struct DJI::OSDK::ACK::WayPoint2CommonRsp WayPoint2CommonRsp
 
typedef struct DJI::OSDK::ACK::ExtendedFunctionRsp ExtendedFunctionRsp
 
typedef struct DJI::OSDK::ACK::WayPointVelocityInternal WayPointVelocityInternal
 
typedef struct DJI::OSDK::ACK::WayPointInitInternal WayPointInitInternal
 
typedef struct DJI::OSDK::ACK::MFIOGetInternal MFIOGetInternal
 
typedef struct DJI::OSDK::ACK::ParamAckInternal ParamAckInternal
 
typedef struct DJI::OSDK::ACK::SetHomeLocationAckInternal SetHomeLocationAckInternal
 
typedef struct DJI::OSDK::ACK::ErrorCode ErrorCode
 This struct is returned from all blocking calls, except certain mission calls that have explicit types defined later in this file. More...
 
typedef struct DJI::OSDK::ACK::ParamAck ParamAck
 This struct is returned from the DJI::OSDK::Control::writeParameterByHash blocking API.
 
typedef struct DJI::OSDK::ACK::SetHomeLocationAck SetHomeLocationAck
 
typedef struct DJI::OSDK::ACK::MFIOGet MFIOGet
 This struct is returned from the DJI::OSDK::MFIO::getValue blocking API. More...
 
typedef struct DJI::OSDK::ACK::HotPointStart HotPointStart
 This struct is returned from the DJI::OSDK::HotpointMission::start blocking API. More...
 
typedef struct DJI::OSDK::ACK::HotPointRead HotPointRead
 This struct is returned from the DJI::OSDK::HotpointMission::readData blocking API. More...
 
typedef struct DJI::OSDK::ACK::WayPointIndex WayPointIndex
 This struct is returned from the DJI::OSDK::WaypointMission::waypointIndexDownload blocking API. More...
 
typedef struct DJI::OSDK::ACK::WayPointAddPoint WayPointAddPoint
 This struct is returned from the DJI::OSDK::WaypointMission::uploadIndexData blocking API. More...
 
typedef struct DJI::OSDK::ACK::WayPointVelocity WayPointVelocity
 This struct is returned from the DJI::OSDK::WaypointMission::updateIdleVelocity blocking API. More...
 
typedef struct DJI::OSDK::ACK::WayPointInit WayPointInit
 This struct is used in the readInitData non-blocking API callback. More...
 
typedef struct DJI::OSDK::ACK::DroneVersion DroneVersion
 This struct is returned from the DJI::OSDK::Vehicle::getDroneVersion blocking API. More...
 
typedef struct DJI::OSDK::ACK::WayPointReachedData WayPointReachedData
 This struct captures PushData while ground-station is enabled on Assistant's SDK Page, CMD: 0x02, 0x04.
 
typedef struct DJI::OSDK::ACK::WayPointStatusPushData WayPointStatusPushData
 This struct captures PushData while ground-station is enabled on Assistant's SDK Page, CMD: 0x02, 0x03.
 
typedef uint8_t Image[IMG_240P_SIZE]
 
typedef struct DJI::OSDK::ACK::ImageMeta ImageMeta
 sub-struct for stereo image with raw data and camera name
 
typedef struct DJI::OSDK::ACK::StereoImgData StereoImgData
 This struct captures PushData when subscribe to QVGA images.
 
typedef uint8_t VGAImage[IMG_VGA_SIZE]
 
typedef struct DJI::OSDK::ACK::StereoVGAImgData StereoVGAImgData
 This struct captures PushData when subscribe to VGA images.
 
typedef struct DJI::OSDK::ACK::FCTimeInUTC FCTimeInUTC
 This struct captures PushData when subscribe to UTC & FC time in hardware sync.
 
typedef struct DJI::OSDK::ACK::HeartBeatAck HeartBeatAck
 
typedef union DJI::OSDK::ACK::TypeUnion TypeUnion
 

Static Public Member Functions

static bool getError (ErrorCode ack)
 Call this function with an ACK::ErrorCode returned from a blocking call to find out if the call succeeded or not. More...
 
static void getErrorCodeMessage (ErrorCode ack, const char *func)
 Call this function to get a human-readable message that tells you the meaning of the ACK. Most useful when your getError(ack) call returns FAIL. More...
 

Static Public Attributes

static const int IMG_240P_SIZE = 240 * 320
 This constant variable defines number of pixels for QVGA images.
 
static const int IMG_VGA_SIZE = 640 * 480
 This constant variable defines number of pixels for VGA images.
 
static const bool SUCCESS = 0
 ACK::getError return type when blocking call is successful.
 
static const bool FAIL = 1
 ACK::getError return type when blocking call is unsuccessful.
 
static const uint8_t OBTAIN_CONTROL = 1
 
static const uint8_t RELEASE_CONTROL = 0
 

Detailed Description

Class for handling acknowledgements from the aircraft.

The constructs in this class are used to extract data and metadata from the incoming packets, and pack this data into usable return types for blocking API calls.

Member Typedef Documentation

◆ DroneVersion

This struct is returned from the DJI::OSDK::Vehicle::getDroneVersion blocking API.

◆ ErrorCode

This struct is returned from all blocking calls, except certain mission calls that have explicit types defined later in this file.

Note
NOT TO BE CONFUSED with class ErrorCode that contains parsing for acknowledgements

◆ HotPointRead

This struct is returned from the DJI::OSDK::HotpointMission::readData blocking API.

◆ HotPointStart

This struct is returned from the DJI::OSDK::HotpointMission::start blocking API.

◆ MFIOGet

This struct is returned from the DJI::OSDK::MFIO::getValue blocking API.

◆ WayPointAddPoint

◆ WayPointIndex

This struct is returned from the DJI::OSDK::WaypointMission::waypointIndexDownload blocking API.

◆ WayPointInit

This struct is used in the readInitData non-blocking API callback.

◆ WayPointVelocity

Member Function Documentation

◆ getError()

bool DJI::OSDK::ACK::getError ( ACK::ErrorCode  ack)
static

Call this function with an ACK::ErrorCode returned from a blocking call to find out if the call succeeded or not.

If the call did not succeed, recommended workflow is to call getErrorCodeMessage(ack) to parse the failure ack.

Parameters
ackACK::ErrorCode returned from a blocking call
Returns
bool that is SUCCESS if the call was successful, FAIL if the call was not.

ACKs supported in Matrice 600 old firmware

ACKs supported in Matrice 100

◆ getErrorCodeMessage()

void DJI::OSDK::ACK::getErrorCodeMessage ( ACK::ErrorCode  ack,
const char *  func 
)
static

Call this function to get a human-readable message that tells you the meaning of the ACK. Most useful when your getError(ack) call returns FAIL.

Parameters
ackACK::ErrorCode returned from a blocking call.
funcchar array for receiving the error message string;
Warning
param func is not supported in this release, please pass __func__ as the value for this argument.

The documentation for this class was generated from the following files: