ESTSettingGPIOPortsData

@interface ESTSettingGPIOPortsData : ESTSettingReadWrite <NSCopying>

ESTSettingGPIOPortsData represents GPIO PortsData value.

  • Designated initializer. Validates provided value internally with +validationErrorForValue:.

    See

    +[ESTSettingGPIOPortsData validationErrorForValue:]

    Declaration

    Objective-C

    - (nonnull instancetype)initWithValue:(nonnull ESTGPIOPortsData *)portsData;

    Swift

    init(value portsData: ESTGPIOPortsData)

    Parameters

    portsData

    GPIO PortsData value.

    Return Value

    Initialized object. Nil if validation fails.

  • Returns current value of GPIO PortsData setting.

    Note that GPIO ports state (when used as input) is volatile and should be read each time its value is needed.

    See

    -[ESTSettingGPIOPortsData readValueWithCompletion:].

    Declaration

    Objective-C

    - (nonnull ESTGPIOPortsData *)getValue;

    Swift

    func getValue() -> ESTGPIOPortsData

    Return Value

    GPIO ConfigPort0 value.

  • Method allows to read value of initialized GPIO PortsData setting object.

    Declaration

    Objective-C

    - (void)readValueWithCompletion:
        (nonnull ESTSettingGPIOPortsDataCompletionBlock)completion;

    Swift

    func readValue(completion: @escaping ESTSettingGPIOPortsDataCompletionBlock)

    Parameters

    completion

    Block to be invoked when operation is complete.

    Return Value

    Initialized operation object.

  • Method allows to create write operation from already initialized GPIO PortsData setting object. Value provided during initialization will be used as a desired value.

    Declaration

    Objective-C

    - (void)writeValue:(nonnull ESTGPIOPortsData *)portsData
            completion:(nonnull ESTSettingGPIOPortsDataCompletionBlock)completion;

    Swift

    func writeValue(_ portsData: ESTGPIOPortsData, completion: @escaping ESTSettingGPIOPortsDataCompletionBlock)

    Parameters

    portsData

    PortsData value to be written to the device.

    completion

    Block to be invoked when operation is complete.

    Return Value

    Initialized operation object.

  • Method checks if provided value is allowed. Returns nil if validation passes.

    Declaration

    Objective-C

    + (NSError *_Nullable)validationErrorForValue:
        (nonnull ESTGPIOPortsData *)portsData;

    Swift

    class func validationError(forValue portsData: ESTGPIOPortsData) -> Error?

    Parameters

    portsData

    PortsData value.

    Return Value

    Error object describing why validation failed. Nil if validation passes.