Skip to main content

IDigitalOutput

Interface for controlling digital output signals.

Namespace: ControlBee.Interfaces

Extends: IDigitalIO

Methods

SetOn

Sets the output to the specified state.

void SetOn(bool on);

Parameters:

  • ontrue to turn on, false to turn off.

On

Turns the output on.

void On();

Off

Turns the output off.

void Off();

IsOn

Checks whether the output is on.

bool? IsOn(CommandActualType type = CommandActualType.Actual);

Parameters:

  • type — Whether to check the command or actual state.

Returns: true if on, false if off, or null if unknown.

IsOff

Checks whether the output is off.

bool? IsOff(CommandActualType type = CommandActualType.Actual);

Returns: true if off, false if on, or null if unknown.

Wait

Waits until the command and actual states match.

void Wait();

OnAndWait

Turns the output on and waits for confirmation.

void OnAndWait();

OffAndWait

Turns the output off and waits for confirmation.

void OffAndWait();

Events

CommandOnChanged

Raised when the command state changes.

event EventHandler<bool>? CommandOnChanged;

ActualOnChanged

Raised when the actual output state changes.

event EventHandler<bool?>? ActualOnChanged;

See Also