Inherited by DJI::OSDK::OpenProtocolCMD.
Classes | |
class | ActivationACK |
CMDSet: Activation ACK Error Codes. More... | |
class | CameraCommonErr |
camera api error code More... | |
class | CommonACK |
Common ACK Error Codes. More... | |
class | ControlACK |
CMDSet: Control ACK Error Codes. More... | |
struct | ErrorCodeMsg |
Releated messages about error codes. More... | |
class | GimbalCommonErr |
gimbal api error code More... | |
class | MFIOACK |
CMDSet: MFIO. More... | |
class | MissionACK |
Mission ACK Error Codes. More... | |
class | PSDKCommonErr |
camera api error code More... | |
class | SubscribeACK |
CMDSet: Subscribe. More... | |
class | SysCommonErr |
system releated error code More... | |
Public Types | |
enum | ModuleID { SysModule = 0, RESERVE_1 = 1, RESERVE_2 = 2, RESERVE_3 = 3, RESERVE_4 = 4, RESERVE_5 = 5, RESERVE_6 = 6, RESERVE_7 = 7, RESERVE_8 = 8, RESERVE_9 = 9, RESERVE_10 = 10, FCModule = 11, GimbalModule = 12, CameraModule = 13, PSDKModule = 14, RCModule = 15, BatteryModule = 16, MissionV2Module = 17, ModuleMaxCnt } |
Module ID used in OnboardSDK Unified error. | |
enum | SystemFunctionID { SystemCommon = 0 } |
Function ID used with SystemModule in error codes. | |
enum | FCFunctionID { FCControlTask = 0, FCSubscribe = 1, FCParameterTable = 4, FCSetHomeLocation = 5, FCAvoidObstacle = 6, FCEmergencyBrake = 7 } |
Function ID used with FCModule in error codes. | |
enum | CameraFunctionID { CameraCommon = 0 } |
Function ID used with CameraModule in error codes. | |
enum | GimbalFunctionID { GimbalCommon = 0 } |
Function ID used with GimbalModule in error codes. | |
enum | PSDKFunctionID { PSDKCommon = 0 } |
Function ID used with PSDKModule in error codes. | |
enum | MissionV2FunctionId { MissionV2Common = 0 } |
enum | SYSTEM_ERROR_RAW_CODE { Success = 0x00000000, AllocMemoryFailed = 0x00000001, ReqNotSupported = 0x00000002, Timeout = 0x00000003, UnpackDataMismatch = 0x00000004, InstInitParamInvalid = 0x00000005, UserCallbackInvalid = 0x00000006, UndefinedError = 0xFFFFFFFF } |
enum | DJI_CMD_RETURN_CODE { SUCCESS = 0x00, FILE_TRANSFER_BUSY = 0xC0, NAVIGATION_IS_FORBIDDEN = 0xD0, NAVIGATION_IS_OFF = 0xD1, INVALID_TASK_INFORMATION = 0xD2, TASK_UPLOAD_ERROR = 0xD3, INVALID_REQUEST_PARAMETER = 0xD4, MAY_CROSS_RESTRICTED_AREA = 0xD5, EXCEEDED_INPUT_TIME_LIMIT = 0xD6, EXECUTING_HIGHER_PRIORITY_TASK = 0xD7, CANNOT_START_TASK_WEAK_GPS = 0xD8, CANNOT_START_TASK_VLOTAGE_ALARM = 0xD9, UNSUPPORTED_COMMAND = 0xE0, TIMEOUT = 0xE1, RAM_ALLOCATION_FAILED = 0xE2, INVALID_COMMAND_PARAMETER = 0xE3, UNSUPPORTED_COMMAND_IN_CUR_STATE = 0xE4, CAMERA_TIME_NOT_SYNCHRONIZED = 0xE5, PARAMETER_SET_FAILED = 0xE6, PARAMETER_GET_FAILED = 0xE7, SD_CARD_MISSING = 0xE8, SD_CARD_FULL = 0xE9, SD_CARD_ERROR = 0xEA, SENSOR_ERROR = 0xEB, SYSTEM_ERROR = 0xEC, PARAMETER_TOTAL_TOO_LONG = 0xED, MODULE_INACTIVATED = 0xEE, USER_UNBOND = 0xEF, FIRMWARE_DATA_NUM_DISCONTINUOUS = 0xF0, FIRMWARE_DATA_OVERLOAD_FLASH = 0xF1, FIRMWARE_VERIFICATION_ERROR = 0xF2, FLASH_ERASE_ERROR = 0xF3, FLASH_WRITE_ERROR = 0xF4, UPGRADE_STATUS_ERROR = 0xF5, FIRMWARE_TYPE_MISMATCH = 0xF6, WAITING_CLIENT_UPGRADE_STATUS = 0xF7, REMOTE_CONTROL_UNCONNECTED = 0xF8, MOTOR_NOT_STOPPED = 0xF9, HARDWARE_ERROR = 0xFA, INSUFFICIENT_ELECTRICITY = 0xFB, AIRCRAFT_UNCONNECTED = 0xFC, FLASH_IS_ERASING = 0xFD, CANNOT_UPGRADE_IN_CUR_STATE = 0xFE, UNDEFINE_ERROR = 0xFF } |
typedef uint8_t | ModuleIDType |
Module ID type used in OnboardSDK Unified error. | |
typedef uint8_t | FunctionIDType |
Function ID type used in OnboardSDK Unified error. | |
typedef uint32_t | RawRetCodeType |
RawRetCode ID type used in OnboardSDK Unified error. | |
typedef int64_t | ErrorCodeType |
Unified error type. | |
typedef struct DJI::OSDK::ErrorCode::ErrorCodeMsg | ErrorCodeMsg |
Releated messages about error codes. | |
typedef std::map< const RawRetCodeType, ErrorCodeMsg > | ErrorCodeMapType |
Map container type of errCode ID and msg. | |
typedef struct DJI::OSDK::ErrorCode::FunctionDataType | FunctionDataType |
typedef struct DJI::OSDK::ErrorCode::ModuleDataType | ModuleDataType |
Static Public Member Functions | |
static constexpr ErrorCodeType | getErrorCode (ModuleIDType moduleID, FunctionIDType functionID, RawRetCodeType rawRetCode) |
Build error code. More... | |
static ErrorCode::ModuleIDType | getModuleID (ErrorCodeType errCode) |
Get the module ID from errCode. More... | |
static const char * | getModuleName (ErrorCodeType errCode) |
Get the module name from errCode. More... | |
static ErrorCode::FunctionIDType | getFunctionID (ErrorCodeType errCode) |
Get the function name from errCode. More... | |
static ErrorCode::RawRetCodeType | getRawRetCode (ErrorCodeType errCode) |
Get the raw reture code from errCode. More... | |
static ErrorCode::ErrorCodeType | getLinkerErrorCode (E_OsdkStat cb_type) |
static ErrorCodeMsg | getErrorCodeMsg (int64_t errCode) |
Get error code messages from errCode. More... | |
static void | printErrorCodeMsg (int64_t errCode) |
Print error code messages to console. More... | |
Static Public Attributes | |
static const uint8_t | functionMaxCnt = 20 |
Function max count of each module. | |
Detailed Description
the acknowledgments sent by the aircraft
Each component of the SDK has its own subclass defined within the ErrorCode class.
Member Enumeration Documentation
◆ DJI_CMD_RETURN_CODE
Enumerator | |
---|---|
SUCCESS | Execute successfully |
FILE_TRANSFER_BUSY | Busy transfering file |
NAVIGATION_IS_FORBIDDEN | RC mode is not F mode or FC disable navigation mode |
NAVIGATION_IS_OFF | FC disable navigation mode |
INVALID_TASK_INFORMATION | No valid task information |
TASK_UPLOAD_ERROR | Task up load error |
INVALID_REQUEST_PARAMETER | The request parameter is invalid |
MAY_CROSS_RESTRICTED_AREA | The task may across the restricted area |
EXCEEDED_INPUT_TIME_LIMIT | Task time may exceed input time limit |
EXECUTING_HIGHER_PRIORITY_TASK | A task of higher priority is being excuting |
CANNOT_START_TASK_WEAK_GPS | Weak GPS, cannot start the task |
CANNOT_START_TASK_VLOTAGE_ALARM | Level 1 volt warning, cannot start the task |
UNSUPPORTED_COMMAND | Do not support this command |
TIMEOUT | Execution timeout |
RAM_ALLOCATION_FAILED | Memory alloc failed |
INVALID_COMMAND_PARAMETER | Invalid parameter for the command |
UNSUPPORTED_COMMAND_IN_CUR_STATE | Do not support this command in the current state |
CAMERA_TIME_NOT_SYNCHRONIZED | Timestamp of camera is not synchronized |
PARAMETER_SET_FAILED | Setting parameter failed |
PARAMETER_GET_FAILED | Getting parameter failed |
SD_CARD_MISSING | SD card is not installed |
SD_CARD_FULL | SD card is full |
SD_CARD_ERROR | Error accessing the SD Card |
SENSOR_ERROR | Sensor go wrong |
SYSTEM_ERROR | System error |
PARAMETER_TOTAL_TOO_LONG | Length of the parameter is too long |
MODULE_INACTIVATED | Module is too not activated yet |
USER_UNBOND | User is not bond yet |
FIRMWARE_DATA_NUM_DISCONTINUOUS | Fireware data number is a discontinuous number |
FIRMWARE_DATA_OVERLOAD_FLASH | Fireware data number overload flash |
FIRMWARE_VERIFICATION_ERROR | Error verifying fireware |
FLASH_ERASE_ERROR | Error erasing flash |
FLASH_WRITE_ERROR | Error writing flash |
UPGRADE_STATUS_ERROR | Error status of upgrading |
FIRMWARE_TYPE_MISMATCH | Firmware type don't match |
WAITING_CLIENT_UPGRADE_STATUS | Upgrade host need the upgrade status pushing from Client (CmdID = 0x41) |
REMOTE_CONTROL_UNCONNECTED | Not connect remote control yet |
MOTOR_NOT_STOPPED | Motor is not stopped yet |
HARDWARE_ERROR | Hardware fault |
INSUFFICIENT_ELECTRICITY | Device is of insufficient electricity |
AIRCRAFT_UNCONNECTED | Aircraft is not connected yet |
FLASH_IS_ERASING | Flash is erasing (Avoid APP waiting timeout) |
CANNOT_UPGRADE_IN_CUR_STATE | Cannot upgrade in current status (Please reboot or contact with DJI support |
UNDEFINE_ERROR | Undefined error |
◆ SYSTEM_ERROR_RAW_CODE
Member Function Documentation
◆ getErrorCode()
|
inlinestatic |
Build error code.
- Parameters
-
moduleID module ID used in errCode ref to DJI::OSDK::ErrorCode::ModuleID functionID function ID used in errCode ref to DJI::OSDK::ErrorCode::xxxxFunctionID rawRetCode raw return code from the ack data
- Returns
- Unified error type
◆ getErrorCodeMsg()
|
static |
Get error code messages from errCode.
- Parameters
-
errCode Unified error type
- Returns
- Releated error code messages
◆ getFunctionID()
|
static |
Get the function name from errCode.
- Parameters
-
errCode Unified error type
- Returns
- Function name
◆ getModuleID()
|
static |
Get the module ID from errCode.
- Parameters
-
errCode Unified error type
- Returns
- Module ID ref to DJI::OSDK::ErrorCode::ModuleID
◆ getModuleName()
|
static |
Get the module name from errCode.
- Parameters
-
errCode Unified error type
- Returns
- Module name
◆ getRawRetCode()
|
static |
Get the raw reture code from errCode.
- Parameters
-
errCode Unified error type
- Returns
- Function name
◆ printErrorCodeMsg()
|
static |
Print error code messages to console.
- Parameters
-
errCode Unified error type
The documentation for this class was generated from the following files:
- osdk-core/api/inc/dji_error.hpp
- osdk-core/api/src/dji_error.cpp