Skip to main content

IDigitalInput

Interface for reading digital input signals.

Namespace: ControlBee.Interfaces

Extends: IDigitalIO

Methods

IsOn

Checks whether the input signal is on.

bool IsOn();

Returns: true if the input is on.

IsOff

Checks whether the input signal is off.

bool IsOff();

Returns: true if the input is off.

IsOnOrTrue

Returns the input state, or true if the device is unavailable.

bool IsOnOrTrue();

IsOffOrTrue

Returns true if the input is off, or true if the device is unavailable.

bool IsOffOrTrue();

IsOnOrFalse

Returns the input state, or false if the device is unavailable.

bool IsOnOrFalse();

IsOffOrFalse

Returns true if the input is off, or false if the device is unavailable.

bool IsOffOrFalse();

WaitOn

Waits until the input signal turns on.

void WaitOn(bool showErrorDialog = true);
void WaitOn(int millisecondsTimeout, bool showErrorDialog);

Parameters:

  • showErrorDialog — Whether to show an error dialog on timeout. Default is true.
  • millisecondsTimeout — Maximum wait time in milliseconds.

WaitOff

Waits until the input signal turns off.

void WaitOff(bool showErrorDialog = true);
void WaitOff(int millisecondsTimeout, bool showErrorDialog);

Parameters:

  • showErrorDialog — Whether to show an error dialog on timeout. Default is true.
  • millisecondsTimeout — Maximum wait time in milliseconds.

Events

ActualOnChanged

Raised when the actual input state changes.

event EventHandler<bool>? ActualOnChanged;

See Also