Applications Releasing theLEDsto system control
IX20 User Guide
831
Releasing the LEDs to system control
During a Python interactive session, or from within a Python script, you can release control of the LED
from Python to system control using the led.release() method.
If the Python script or session terminatesprior to releasing control to the system, the LEDs will
continue to have the state that Python set to them, until the device isrebooted. See Configure scripts
to run automatically for information about configuring the device so that the LEDstate iscontrolled
by the Python script even after reboot.
If any system processesattempt to take control of the LEDwhile Python is in control of it, the state
information from the system processisrecorded but the LED state is not updated until Python
releases control of the LED. When the LEDis returned to system control, the state of the LEDwill
reflect the correct, recorded state information.
Setting the state of multi-colored LEDs.
Use Python to control the color of multi-colored LEDs
One or more LEDs in the IX20 are RGB(red, green, and blue) LEDs, capable of producing a wide range
of colors. You can use the digidevice.led Python module to control the color aswell asthe state of
these LEDs.
For example, the LTEconnection indicator can be set to variouscolors:
LED attribute name Color State
Led.COM
Red
ON
Led.ETH
OFF
Led.ONLINE
OFF
Led.COM Red flashing
FLASH
Led.ETH
OFF
Led.ONLINE
OFF
Led.COM Green
OFF
Led.ETH
ON
Led.ONLINE
OFF
Led.COM Green flashing
OFF
Led.ETH
FLASH
Led.ONLINE
OFF
Led.COM Blue
OFF
Led.ETH
OFF
Led.ONLINE
ON