- gcx:linkState([mode])
- list = gcx:linkState()
SYNOPSIS
DESCRIPTION
The first form allows the display signal to be turned on and off by software. Pass the value "on" to turn the display signal on, use "off" to turn it off.
The second form returns information about the state of the link between controller and display. The result is a table with the following entries:
Key | Value |
---|---|
connected | true when the DVI cable is connected between controller and the display. |
dpms | Power management state of the display. Can be either "on" or "off". The states "standby" and "suspend" are not too useful anymore in the flat screen age and have been omitted. |
powered | true when the display is turned on. |
backplane_connected | true when a Teratronik backplane controller was detected and initialized. The backplane controller handles support for touch screen, remote serial ports and remote gpio. |
active | true when the controller is transmitting a video signal to the display. |
remapped | true when the display geometry has changed and a new memory buffer has been allocated. This flag resets to false after it has been read by the application. |
RETURN VALUE
NOTES
When a display is plugged in, the system checks if it is of the same type than the display that was plugged in before (if any). In that case, the screen contents are not changed and the display will still show the same contents. When a different display is plugged in, however, the system will reinitialize for the new display and clear the screen contents to black. The remapped flag indicates that this has happened.
An application checking for hotplug events should only redraw the screen contents if it sees the remapped flag. This avoids flicker.