DJI Mobile SDK Documentation

      class DJIError

      @EXClassNullAway
      class DJIError
      Package:dji.common.error
      Description:

      Class that handles all errors that are not handled by individual components.

      Class Members:
      Get DJIFlightHubError
      method
      method getDJIError
      static DJIError getDJIError(int errorCode)
      Package:dji.common.error
      Description:

      Returns the specific error in the DJIFlightHubError according to the error code.

      Input Parameters:
      int errorCodeerrorCode for DJIFlightHubError.
      Return:
      static DJIErrorAn NSError object initialized with errorCode. If the errorCode was 0, returns nil.
      Get DJIUTMISSError with Params
      method
      method getDJIError
      static DJIError getDJIError(int errorCode)
      Package:dji.sdk.utmiss
      Description:

      Get DJIUTMISSError.

      Input Parameters:
      int errorCodeAn int value of error code.
      Return:
      static DJIErrorAn object of DJIError.
      method getDescription
      String getDescription()
      Package:dji.common.error
      Description:

      Returns the description of the error code.

      Return:
      StringThe description of the error code.
      method setDescription
      void setDescription(String desc)
      Package:dji.common.error
      Description:

      Sets the description for the error code.

      Input Parameters:
      String descDescription string.
      final REGISTRATION_SUCCESS
      static final DJISDKError REGISTRATION_SUCCESS = new DJISDKError("API Key successfully registered")
      Package:dji.common.error
      Description:

      API Key successfully registered.

      final CANNOT_PAUSE_STABILIZATION
      static final DJIError CANNOT_PAUSE_STABILIZATION = new DJIError("Can't pause stabilization.")
      Package:dji.common.error
      Description:

      The execution could not be performed.

      final COMMON_SYSTEM_BUSY
      static final DJIError COMMON_SYSTEM_BUSY = new DJIError("The system is too busy to execute the action")
      Package:dji.common.error
      Description:

      The system is too busy to execute the action.

      final COMMON_UNKNOWN
      static final DJIError COMMON_UNKNOWN = new DJIError("SDK error, please contact <dev@dji.com> for help.")
      Package:dji.common.error
      Description:

      Catch all for various errors.

      final COMMON_DATA_ERROR
      static final DJIError COMMON_DATA_ERROR = new DJIError("N/A")
      Package:dji.common.error
      Description:

      Data error. Shown as "N/A" in DJI APP.

      final COMMON_INVALID_AUTHORIZATION_ID
      static final DJIError COMMON_INVALID_AUTHORIZATION_ID = new DJIError("Invalid authorization id")
      Package:dji.common.error
      Description:

      Invalid authorization ID.

      final COMMON_UNDEFINED
      static final DJIError COMMON_UNDEFINED = new DJIError("Undefined Error")
      Package:dji.common.error
      Description:

      Undefined error.
      This error will be returned when the error is undefined.

      public void setMultiControlMode(boolean value,final DJIExecuteResultCallback mCallBack)

      final COMMON_TIMEOUT
      static final DJIError COMMON_TIMEOUT = new DJIError("Execution of this process has timed out")
      Package:dji.common.error
      Description:

      Execution timeout.
      This error will be returned when the execution times out.

      public void sendDataToExternalDevice(byte[] data,final DJIExecuteResultCallback mCallBack)
      public void setMultiControlMode(boolean value,final DJIExecuteResultCallback mCallBack)

      final COMMON_PARAM_ILLEGAL
      static final DJIError COMMON_PARAM_ILLEGAL = new DJIError("Param Illegal")
      Package:dji.common.error
      Description:

      Illegal parameters.
      This error will be returned by the function for setting camera parameters in DJIPhantomCamera and DJIInspireCamera, when illegal parameters are used.

      final COMMON_PARAM_INVALID
      static final DJIError COMMON_PARAM_INVALID = new DJIError("Param Invalid")
      Package:dji.common.error
      Description:

      Invalid parameters.
      This error will be returned by the function for setting camera parameters when invalid parameters are used.

      final COMMON_UNSUPPORTED
      static final DJIError COMMON_UNSUPPORTED = new DJIError("Not supported")
      Package:dji.common.error
      Description:

      Unsupported feature.
      This error will be returned by the function for some special feature interface when the feature isn't supported by the device.

      final COMMON_DISCONNECTED
      static final DJIError COMMON_DISCONNECTED = new DJIError("Disconnected")
      Package:dji.common.error
      Description:

      Disconnected error.
      This error will be returned by the function for some special interface when the DJI product is not connected to the mobile device.

      final FIRMWARE_NON_SEQUENCE
      static final DJIError FIRMWARE_NON_SEQUENCE = new DJIError("Firmware pattern number not continuous")
      Package:dji.common.error
      Description:

      Inspire only.
      The sequence number of firmware is not continuous.

      final FIRMWARE_LENGTH_WRONG
      static final DJIError FIRMWARE_LENGTH_WRONG = new DJIError("Firmware length invalid")
      Package:dji.common.error
      Description:

      The file size of the firmware is invalid.

      final FIRMWARE_CRC_WRONG
      static final DJIError FIRMWARE_CRC_WRONG = new DJIError("Firmware crc value invalid")
      Package:dji.common.error
      Description:

      Inspire only.
      The check number of the firmware is invalid.

      final FLASH_CLEAR_WRONG
      static final DJIError FLASH_CLEAR_WRONG = new DJIError("Flash clear error ")
      Package:dji.common.error
      Description:

      The clear action of the flash is invalid.

      final FLASH_WRITE_WRONG
      static final DJIError FLASH_WRITE_WRONG = new DJIError("Flash write error ")
      Package:dji.common.error
      Description:

      The write action of the flash is invalid.

      final UPDATE_WRONG
      static final DJIError UPDATE_WRONG = new DJIError("Update error")
      Package:dji.common.error
      Description:

      The update process is invalid.

      final FIRMWARE_MATCH_WRONG
      static final DJIError FIRMWARE_MATCH_WRONG = new DJIError("Firmware match error ")
      Package:dji.common.error
      Description:

      There is a firmware match error.

      final FLASH_FLUSHING
      static final DJIError FLASH_FLUSHING = new DJIError("Firmware flushing")
      Package:dji.common.error
      Description:

      The flash is flushing.

      final MEDIA_INVALID_REQUEST_TYPE
      static final DJIError MEDIA_INVALID_REQUEST_TYPE =
      new DJIError("Media download result: media downloading request type is invalid")
      Package:dji.common.error
      Description:

      The media download request type is invalid.

      final MEDIA_NO_SUCH_FILE
      static final DJIError MEDIA_NO_SUCH_FILE = new DJIError("Media download result: no such file")
      Package:dji.common.error
      Description:

      Media download error: no such file.

      final COMMAND_REPEAT
      static final DJIError COMMAND_REPEAT = new DJIError("Execution of this process is sent repeatedly")
      Package:dji.common.error
      Description:

      Execution of this process is sent repeatedly

      final MEDIA_REQUEST_CLIENT_ABORT
      static final DJIError MEDIA_REQUEST_CLIENT_ABORT =
      new DJIError("Media download result: the client aborts the downloading")
      Package:dji.common.error
      Description:

      Media download error: the client aborted the downloading.

      final MEDIA_REQUEST_DISCONNECT
      static final DJIError MEDIA_REQUEST_DISCONNECT =
      new DJIError("Media download result: the downloading link disconnects")
      Package:dji.common.error
      Description:

      Result of media downloading: the downloading link disconnects.

      final IMAGE_TRANSMITTER_INVALID_PARAMETER
      static final DJIError IMAGE_TRANSMITTER_INVALID_PARAMETER =
      new DJIError("The input parameter is out of bound or invalid.")
      Package:dji.common.error
      Description:

      The input parameters is out of bound or invalid.

      final COMMAND_NOT_SUPPORTED_BY_FIRMWARE
      static final DJIError COMMAND_NOT_SUPPORTED_BY_FIRMWARE =
      new DJIError("The command is not supported by the current firmware version.")
      Package:dji.common.error
      Description:

      The command is not supported by the current firmware version.

      final COMMAND_NOT_SUPPORTED_BY_HARDWARE
      static final DJIError COMMAND_NOT_SUPPORTED_BY_HARDWARE =
      new DJIError("The command is not supported by the current hardware.")
      Package:dji.common.error
      Description:

      The command is not supported by the current hardware version.

      final UNABLE_TO_GET_FIRMWARE_VERSION
      static final DJIError UNABLE_TO_GET_FIRMWARE_VERSION = new DJIError(
      "Unable to get the firmware version. Note: The sdk will fetch the firmware version from the server so, please ensure you have Internet connectivity before you invoke getVersion().")
      Package:dji.common.error
      Description:

      Unable to get the firmware version. Note: The SDK gets the firmware version table from the server. Ensure Internet connectivity before you invoke getVersion().

      final UNABLE_TO_GET_FLAGS
      static final DJIError UNABLE_TO_GET_FLAGS = new DJIError(
      "Unable to get the analytics flags from server. Please ensure you have Internet connectivity before you invoke this method.")
      Package:dji.common.error
      Description:

      Unable to get the analytics flags from server. Note: Ensure Internet connectivity before you invoke this method.

      final UNABLE_TO_GET_FLAG_BUT_RETRY
      static final DJIError UNABLE_TO_GET_FLAG_BUT_RETRY = new DJIError(
      "Unable to get the analytics flags from server, but retrying. Please ensure you have Internet connectivity before invoking this method")
      Package:dji.common.error
      Description:

      Unable to get the analytics flags from server, but retrying.

      final SET_PARAM_FAILED
      static final DJIError SET_PARAM_FAILED = new DJIError("set param failed")
      Package:dji.common.error
      Description:

      Set param failed.

      final BATTERY_PAIR_FAILED
      static final DJIError BATTERY_PAIR_FAILED = new DJIError("Unable to pair the batteries")
      Package:dji.common.error
      Description:

      Unable to pair the batteries.

      final BATTERY_GET_SMART_BATTERY_INFO_FAILED
      static final DJIError BATTERY_GET_SMART_BATTERY_INFO_FAILED = new DJIError("Get smart battery info failed")
      Package:dji.common.error
      Description:

      Get smart battery information failed.
      This error will be returned by the functions for getting information in DJIPhantomBattery and DJIAircraftBattery when the request to get information failed.

      public void getSmartBatteryRestTimeForAll(DJISmartBatteryExecuteResultCallback mCallBack)
      public void getSmartBatteryNeedTimeForGoHome(DJISmartBatteryExecuteResultCallback mCallBack)
      public void getSmartBatteryNeedTimeForLand(DJISmartBatteryExecuteResultCallback mCallBack)
      public void getSmartBatteryGohomeBatteryLevel(DJISmartBatteryExecuteResultCallback mCallBack)
      public void getSmartBatteryLandBatteryLevel(DJISmartBatteryExecuteResultCallback mCallBack)
      public void getSmartBatteryRadiusForGohome(DJISmartBatteryExecuteResultCallback mCallBack)
      public void getSmartBatteryRequestGohomeFlag(DJISmartBatteryExecuteResultCallback mCallBack)

      final NO_NETWORK
      static final DJIError NO_NETWORK = new DJIError("No network")
      Package:dji.common.error
      Description:

      No network access.

      final DATABASE_IS_NOT_READY
      static final DJIError DATABASE_IS_NOT_READY = new DJIError("Database is not ready")
      Package:dji.common.error
      Description:

      Database is not ready.

      final AREA_CODE_NOT_SAME
      static final DJIError AREA_CODE_NOT_SAME = new DJIError("The set area code is inconsistent with the local area code.")
      Package:dji.common.error
      Description:

      The set area code is inconsistent with the local area code.

      final MEDIA_REQUEST_SERVER_ABORT
      static final DJIError MEDIA_REQUEST_SERVER_ABORT =
      new DJIError("Media download result: the server aborts the downloading")
      Package:dji.common.error
      Description:

      Media download error: the server aborted the downloading.