Class: Output

Output

Provides methods and properties for accessing a digital output.

Members


flash :bool

Gets/sets the flash state of the output. When an output is flashing, it follows the flash times specified in miob.Outputs#onTime and miob.Outputs#offTime.

Type:
  • bool
Since:
  • 1.0 (WAT 1.0)

on :bool

Returns true if the output is steady or flashing. Same as (output.state || output.flash).

Do not use for WS API clients.

Type:
  • bool
Since:
  • 1.0 (WAT 1.0)

state :bool

Gets/sets the state of the output.

Type:
  • bool
Since:
  • 1.0 (WAT 1.0)

Methods


clear()

Sets the output to false. Same as state = false. Can be connected to a signal.

Since:
  • 1.0 (WAT 1.0)

set()

Sets the output to true. Same as state = true. Can be connected to a signal.

Since:
  • 1.0 (WAT 1.0)

setState(on)

Same as writing to state, but can be connected to a signal.

Parameters:
Name Type Description
on bool

The new state of the output.

Since:
  • 1.3 (WAT 1.4)

toggle()

Toggles the output. Same as state = !state. Can be connected to a signal.

Since:
  • 1.0 (WAT 1.0)

Events


flashChanged

Indicates that the flash state of the output has changed.

Parameters:
Name Type Description
flash bool

new flash state of the output

Since:
  • 2.5 (WAT 2.4)

stateChanged

Indicates that the state of the output has changed.

Parameters:
Name Type Description
state bool

new state of the output

Since:
  • 1.0 (WAT 1.0)