DJI Mobile SDK Documentation

      class DJIKey

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

      Base class of all keys to be used with the keyed interface and the DJIKeyManager.

      Class Members:
      property isComponentKey
      @property (nonatomic) BOOL isComponentKey
      Header:DJIKey.h
      Description:

      Defines whether or not the key is to be used with components of the product

      property
      property isMissionKey
      @property (nonatomic) BOOL isMissionKey
      Header:DJIKey.h
      Description:

      Defines whether or not the key is to be used with missions. (Mission Control only)

      property
      property param
      @property (readonly, nonatomic, nullable) NSString *param
      Header:DJIKey.h
      Description:

      The param part of the key.

      property
      property index
      @property (readonly, nonatomic) NSInteger index
      Header:DJIKey.h
      Description:

      The component index of the key. 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.

      property subComponentIndex
      @property (readonly, nonatomic) NSInteger subComponentIndex
      Header:DJIKey.h
      Description:

      The sub-component index of the key. Index is zero based. Currently, no product supports multiple sub-components of the same type, so it is always 0.

      property
      property subComponent
      @property (readonly, nonatomic, nullable) NSString *subComponent
      Header:DJIKey.h
      Description:

      The subComponent of the key if it exists.

      class method
      class method keyWithParam
      + (nullable instancetype)keyWithParam:(nonnull NSString *)param
      Header:DJIKey.h
      Description:

      Convenience creator of a key by only specifying the param to be used. This is mostly useful in DJIKey subclasses.

      Input Parameters:
      nonnull NSString * paramA valid String-formatted key as defined in DJIKey's subclasses headers
      Return:
      nullable instancetypeA valid key object or nil if an error occurred.
      class method keyWithIndex:andParam
      + (nullable instancetype)keyWithIndex:(NSInteger)index
      andParam:(nonnull NSString *)param
      Header:DJIKey.h
      Description:

      Convenience creator of a key by specifying the index of the element and the parameter of the key

      Input Parameters:
      NSInteger indexThe index of the element. In the case of multiple components these would refer to their index.
      nonnull NSString * paramA valid string-formatted key as defined in DJIKey's subclasses headers.
      Return:
      nullable instancetypeA valid key object or nil if an error occurred.
      class method keyWithIndex:subComponent:subComponentIndex:andParam
      + (nullable instancetype)keyWithIndex:(NSInteger)index
      subComponent:(nonnull NSString *)subComponent
      subComponentIndex:(NSInteger)subIndex
      andParam:(nonnull NSString *)param
      Header:DJIKey.h
      Description:

      Full creator of a key allowing to specify subelement, subindex and parameters.

      Input Parameters:
      NSInteger indexThe index of the element
      nonnull NSString * subComponentThe sub element string-formatted key as defined in DJIKey's subclasses headers.
      NSInteger subIndexThe sub element index.
      nonnull NSString * paramThe string-formatted key as defined in DJIKey's subclasses headers.
      Return:
      nullable instancetypeA valid key object or nil if an error occurred.
      const DJIParamConnection
      EXTERN_KEY NSString *const DJIParamConnection
      Header:DJIKey.h
      Description:

      Param to check product's and components' connection state. It can be used with DJIProductKey or other component key classes (e.g. DJICameraKey).

      Class Keys:

      DJIParamConnection

      Access:

      Push

      Type:

      Boolean

      API:

      productConnected

      productDisconnected

      componentConnectedWithKey:andIndex

      componentDisconnectedWithKey:andIndex

      Description:

      Returns YES if the product is connected to the mobile device. For aircraft with remote controllers, this will be YES if the mobile device is connected to (and can communicate with) the remote controller. To understand whether the remote controller is connected to the aircraft, the flight controller component flightController which is part of DJIAircraft should be queried.