DJI Mobile SDK Documentation

      class DUXSDKModel

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

      The DUXSDKModel is the bridge between the SDK which provides the communication with the aircraft and the UXSDK which give a visual rendering on the data received. It is integrated with the any object conforming to DUXObjectProtocol and is used when customizing objects to register to different SDK keys or to receive live view video.

      Class Members:
      class method
      class method defaultSDKModel
      + (nullable instancetype)defaultSDKModel
      Header:DUXSDKModel.h
      Description:

      The singleton to be used whenever you need to use the SDKModel.

      Return:
      nullable instancetypeThe singleton to be used whenever you need to use the SDKModel
      method unregisterDependentKeysForObject
      - (void)unregisterDependentKeysForObject:(nonnull id <DUXObjectProtocol>)object
      Header:DUXSDKModel.h
      Description:

      Removes data watching for all dependentKeys of a given object.

      Input Parameters:
      nonnull id <DUXObjectProtocol> objectThe object for which we unregister the keys.
      method keyManager
      - (DJIKeyManager *)keyManager
      Header:DUXSDKModel.h
      Description:

      The key manager from the SDK's keyed interfaces. This will likely be removed in the future as it doesn't need to be used.

      Return:
      DJIKeyManager *The SDK KeyManager
      method registerDependentKeys:forObject
      - (void)registerDependentKeys:(nonnull NSArray <__kindof DJIKey *> *)dependentKeys forObject:(nonnull id <DUXObjectProtocol>)object
      Header:DUXSDKModel.h
      Description:

      Allows an object to register dependent keys and receive data updates as soon as it is available.

      Input Parameters:
      nonnull id <DUXObjectProtocol> objectThe object for which we register the keys.
      nonnull NSArray <__kindof DJIKey *> * dependentKeysThe dependent keys which we are registering.
      protocol DUXObjectProtocol
      @protocol DUXObjectProtocol <NSObject>
      Header:DUXObjectProtocol.h
      Inherits From:NSObject
      Description:

      Protocol that provides interfaces for getting updates on keys.

      Protocol Methods:
      method dependentKeys
      @required
      - (nonnull NSArray <__kindof DJIKey *> *)dependentKeys
      Header:DUXObjectProtocol.h
      Description:

      An array of DJIKey to be used by the UXSDK CoreModel in order to retrieve data from the SDK automatically.

      Return:
      nonnull NSArray <__kindof DJIKey *> *the list of dependent keys
      method transformValue:forKey
      @required
      - (void)transformValue:(nonnull DUXSDKModelValue *)value forKey:(nonnull __kindof DJIKey *)key
      Header:DUXObjectProtocol.h
      Description:

      This method is called by the UXSDK CoreModel when a value has been received from the aircraft. It is the entry point in the object for aircraft data.

      Input Parameters:
      nonnull DUXSDKModelValue * valuethe value associated with the key.
      nonnull __kindof DJIKey * keythe SDK key as registered in the dependentKey
      method
      method update
      @optional
      - (void)update
      Header:DUXObjectProtocol.h
      Description:

      Method that is automatically called once the data has been used by transform.