PhysicalLight

physical. PhysicalLight

A physical light in a traffic light.

Constructor

new PhysicalLight(lightNum, device)

Source:
Parameters:
Name Type Description
lightNum number

The light number for this light.

device physical.Device

The device associated with this light.

Extends

Members

off :boolean

Source:
Overrides:

If the light is off.

Type:
  • boolean

on :boolean

Source:
Overrides:

If the light is on.

Type:
  • boolean

Methods

(async) sync()

Source:
See:

Syncs the physical light in the device with the state of this instance.

(async) toggle()

Source:
Overrides:
See:

Toggles the light if its device is connected.

(async) turnOff()

Source:
Overrides:
See:

Turn the light off if its device is connected.

(async) turnOn()

Source:
Overrides:
See:

Turn the light on if its device is connected.