DJI Mobile SDK Documentation

      class DJIBaseComponent

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

      Abstract class for components in a DJI Product. A component can be a camera, gimbal, remote controller, etc. A DJI product consists of several components. All components of a product are subclasses of DJIBaseComponent and can be accessed directly from the product objects (DJIAircraft or DJIHandheld).

      Class Members:
      Components
      property
      property index
      @property (nonatomic, assign, readonly) NSUInteger index
      Header:DJIBaseComponent.h
      Description:

      Returns the component index. Index is zero based. A component will have an index greater than zero when there are multiple components of the same type on the DJI product, and one of the components already has the index 0. For instance, M210 can have two gimbal mounted cameras, and will therefore have two gimbal components with indices 0 and 1, and two camera components with indices 0 and 1. For Matrice 600, there are printed numbers on the battery boxes. The DJIBattery component instance with index 0 corresponds to battery compartment number 1. For Inspire 2 and M200 series, DJIBattery with index 0 corresponds to the battery on the port (left hand) side of the aircraft. For M210, M210 RTK and M300 RTK, DJICamera and DJIGimbal with index 0 corresponds to the camera and gimbal on the port (left hand) side of the aircraft. DJILidar with index 0 corresponds to the lidar(Zenmuse L1) on the port (left hand) side of the aircraft.

      property
      property connected
      @property (assign, nonatomic, readonly, getter = isConnected) BOOL connected
      Header:DJIBaseComponent.h
      Description:

      YES if the component is connected.

      method getSerialNumberWithCompletion
      - (void)getSerialNumberWithCompletion:(void (^)(NSString *_Nullable serialNumber, NSError *_Nullable error))block
      Header:DJIBaseComponent.h
      SDK Key:DJIProductKey.DJIParamSerialNumber
      Description:

      Gets the serial number of the component. Depending on the component, this serial number might not match the serial number found on the physical component.

      Input Parameters:
      NSString *_Nullable serialNumberThe serial number of the component.
      NSError *_Nullable errorError retrieving the value.
      void (^)(NSString *_Nullable serialNumber, NSError *_Nullable error) blockCompletion block that receives the getter result.
      method getFirmwareVersionWithCompletion
      - (void)getFirmwareVersionWithCompletion:(void (^)(NSString *_Nullable version, NSError *_Nullable error))block
      Header:DJIBaseComponent.h
      SDK Key:DJIProductKey.DJIParamFirmwareVersion
      Description:

      Returns the firmware version of the component. Each component will have a different firmware version, the combination of which will form the package firmware version getFirmwarePackageVersionWithCompletion found in DJIBaseProduct.

      Input Parameters:
      NSString *_Nullable versionThe component's firmware version.
      NSError *_Nullable errorError retrieving the value.
      void (^)(NSString *_Nullable version, NSError *_Nullable error) blockCompletion block