DJI Mobile SDK Documentation

      class DJIOnboardSDKDevice

      @interface DJIOnboardSDKDevice : NSObject
      Header:DJIOnboardSDKDevice.h
      Inherits From:NSObject
      Description:

      The DJIOnboardSDKDevice class abstracts the Onboard SDK device on the flight controller. It provides interfaces to interact with Onboard SDK and receive the updated state.

      Class Members:
      Delegate
      property
      property delegate
      @property(nonatomic, weak, nullable) id<DJIOnboardSDKDeviceDelegate> delegate
      Header:DJIOnboardSDKDevice.h
      Description:

      Onboard SDK device delegate.

      See Also:

      DJIOnboardSDKDeviceDelegate

      method sendDataFromMobileToOnboard:withCompletion
      - (void)sendDataFromMobileToOnboard:(NSData *)data withCompletion:(DJICompletionBlock)completion
      Header:DJIOnboardSDKDevice.h
      Description:

      Sends binary data from the mobile device to the Onboard device. The size of the data cannot be greater than 100 bytes, and will be sent in 40 byte increments every 14ms. This method is only supported on products that support the Onboard SDK (Matrice 100, Matrice 200 Series, Matrice 600, Matrice 600 Pro, A3, A3 Pro, and N3).

      Input Parameters:
      NSData * dataData to be sent to the external device. The size of the data should not be larger than 100 bytes.
      DJICompletionBlock completionCompletion block.
      Check Device Active
      property
      property isActive
      @property (nonatomic, readonly) BOOL isActive
      Header:DJIOnboardSDKDevice.h
      Description:

      Whether an Onboard SDK device is currently active on the platform.

      Onboard SDK Version
      property
      property onboardSDKVersion
      @property (nonatomic, readonly) NSString *onboardSDKVersion
      Header:DJIOnboardSDKDevice.h
      Description:

      The version of the Onboard SDK used by the currently active device on the platform. If Onboard SDK version is not ready, an empty string (with zero length) will be returned.

      State Updates
      protocol
      protocol DJIOnboardSDKDeviceDelegate
      @protocol DJIOnboardSDKDeviceDelegate <NSObject>
      Header:DJIOnboardSDKDevice.h
      Inherits From:NSObject
      Description:

      This protocol provides delegate methods to interative with Onboard SDK Devices.

      Protocol Methods:

      Protocol Method

      method onboardSDKDevice:didSendDataToMobile
      @optional
      - (void)onboardSDKDevice:(DJIOnboardSDKDevice *)osdkDevice
      didSendDataToMobile:(NSData *)data
      Header:DJIOnboardSDKDevice.h
      Description:

      Called when the Onboard SDK device sent a message to the mobile device through transparent transmission.

      Input Parameters:
      DJIOnboardSDKDevice * osdkDeviceThe Onboard SDK device that update message data.
      NSData * dataThe binary message sent from the Onboard SDK device.
      method onboardSDKDevice:didActivateWithOnboardSDKVersion
      @optional
      - (void)onboardSDKDevice:(DJIOnboardSDKDevice *)osdkDevice didActivateWithOnboardSDKVersion:(NSString *)osdkVersion
      Header:DJIOnboardSDKDevice.h
      Description:

      Called when the onboard device successfully connects and performs handshake.

      Input Parameters:
      DJIOnboardSDKDevice * osdkDeviceThe Onboard SDK device updates the state.
      NSString * osdkVersionA string with the Onboard SDK version.
      method onboardSDKDeviceDidDeactivate
      @optional
      - (void)onboardSDKDeviceDidDeactivate:(DJIOnboardSDKDevice *)osdkDevice
      Header:DJIOnboardSDKDevice.h
      Description:

      Called when the onboard device disconnects.

      Input Parameters:
      DJIOnboardSDKDevice * osdkDeviceThe disconnected Onboard SDK device.