DJI Mobile SDK Documentation

      class DJIPayloadWidget

      @interface DJIPayloadWidget : NSObject<NSCopying>
      Header:DJIPayloadWidget.h
      Inherits From:NSObject
      Description:

      Class to represent the properties of a payload widget. Payload SDK defines different types of widgets for the interaction between the payload device and the mobile device.

      Class Members:
      Type
      property
      property type
      @property (nonatomic, readonly) DJIPayloadWidgetType type
      Header:DJIPayloadWidget.h
      Description:

      The type of the widget. Different types have different type of values.

      See Also:

      DJIPayloadWidgetType

      Index
      property
      property index
      @property (nonatomic, readonly) NSUInteger index
      Header:DJIPayloadWidget.h
      Description:

      The index of the widget. An index is used to differentiate widgets of the same type.

      Name
      property
      property name
      @property (nonatomic, readonly, copy) NSString *name
      Header:DJIPayloadWidget.h
      Description:

      The name of the widget. This is determined by the payload device and not configurable through the mobile device.

      Button State
      property
      property buttonState
      @property (nonatomic, readonly) DJIPayloadButtonState buttonState
      Header:DJIPayloadWidget.h
      Description:

      The button state. It is only valid when DJIPayloadWidgetType is DJIPayloadWidgetTypeButton.

      See Also:

      DJIPayloadButtonState

      Switch State
      property
      property switchState
      @property (nonatomic, readonly) DJIPayloadSwitchState switchState
      Header:DJIPayloadWidget.h
      Description:

      The switch state. It is only valid when DJIPayloadWidgetType is DJIPayloadWidgetTypeSwitch. It is possible to configure the switch value through configureWidgetValue:type:index:withCompletion.

      See Also:

      DJIPayloadSwitchState

      Percentage
      property
      property percentage
      @property (nonatomic, readonly) NSProgress *percentage
      Header:DJIPayloadWidget.h
      Description:

      The progress value of a range bar. It is only valid when DJIPayloadWidgetType is DJIPayloadWidgetTypeRange. It is possible to configure the range value through configureWidgetValue:type:index:withCompletion.

      List
      property
      property list
      @property (nonatomic, readonly, copy) NSArray *list
      Header:DJIPayloadWidget.h
      Description:

      All the items in the list. It is only valid when DJIPayloadWidgetType is DJIPayloadWidgetTypeList.

      Selected List Item
      property
      property selectedListItem
      @property (nonatomic, readonly, assign) NSUInteger selectedListItem
      Header:DJIPayloadWidget.h
      Description:

      The index of the selected item in the list. It is only valid when DJIPayloadWidgetType is DJIPayloadWidgetTypeList. It is possible to configure the selected item index through configureWidgetValue:type:index:withCompletion.

      Input Hint
      property
      property inputHint
      @property (nonatomic, readonly, copy) NSString *inputHint
      Header:DJIPayloadWidget.h
      Description:

      The hint for an input box determined by the payload device. It is only valid when DJIPayloadWidgetType is DJIPayloadWidgetTypeInput.

      Input Value
      property
      property inputValue
      @property (nonatomic, readonly, assign) NSInteger inputValue
      Header:DJIPayloadWidget.h
      Description:

      The value of an input box. It is only valid when DJIPayloadWidgetType is DJIPayloadWidgetTypeInput. It is possible to configure the value through configureWidgetValue:type:index:withCompletion.

      enum DJIPayloadWidgetType
      typedef NS_ENUM(NSUInteger, DJIPayloadWidgetType)
      Header:DJIPayloadWidget.h
      Description:

      Types of widgets on the payload device.

      Enum Members:
      DJIPayloadWidgetTypeNoneNone.
      DJIPayloadWidgetTypeButtonThe widget is a button. The value is a value of DJIPayloadButtonState. A button widget is not configurable by the mobile side and the state is controlled by the hardware.
      DJIPayloadWidgetTypeSwitchThe widget is a switch. The value is a value of DJIPayloadSwitchState.
      DJIPayloadWidgetTypeRangeThe widget is a range bar with percentage as the value. The valid value is from 0 to 100.
      DJIPayloadWidgetTypeListThe widget is a list. The value represents the single selected item in the list. The valid value is from 0 to the list size - 1. The list size is returned by the hardware.
      DJIPayloadWidgetTypeInputThe widget is an input box. The value should an unsigned 32-bit integer.
      enum DJIPayloadButtonState
      typedef NS_ENUM(NSUInteger, DJIPayloadButtonState)
      Header:DJIPayloadWidget.h
      Description:

      States of a button widget.

      Enum Members:
      DJIPayloadButtonStatePullThe button is in pull state.
      DJIPayloadButtonStatePressThe button is being pressed.
      enum DJIPayloadSwitchState
      typedef NS_ENUM(NSUInteger, DJIPayloadSwitchState)
      Header:DJIPayloadWidget.h
      Description:

      States of a switch widget.

      Enum Members:
      DJIPayloadSwitchStateOffThe switch is off.
      DJIPayloadSwitchStateOnThe switch is on.