The Signal Controller Interface is a peripheral device available for CraftOS. Type "help peripheral" to learn about using the Peripheral API to connect with peripherals. When a Signal Controller Interface is connected, peripheral.getType() will return "signalcontroller".
The "opmode" type is either "timed_cycle" or "vehicle_trigger".
The "maindirection" type is either "north", "east", "northeast" or "northwest".
The "legacyaxis" type is either "x" or "z".
All methods here involving time are using the units of seconds.

Methods exposed by the Signal Controller Interface:
isAvailable(): boolean
- Check whether a signal controller is connected to the interface

getMainDirection(): maindirection
- Get the main direction

getMode(): opmode
- Get the controller's operation mode

setMode(value: opmode)
- Set the controller's operation mode

getGreenMainTime(): integer
- Get the time the main signal is green

setGreenMainTime(value: integer)
- Set the time the main signal is green

getGreenCrossTime(): integer
- Get the time the cross signal is green

setGreenCrossTime(value: integer)
- Set the time the cross signal is green

getYellowMainTime(): integer
- Get the time the main signal is yellow

setYellowMainTime(value: integer)
- Set the time the main signal is yellow

getYellowMainTime(): integer
- Get the time the cross signal is yellow

setYellowMainTime(value: integer)
- Set the time the cross signal is yellow

getAllRedTime(): integer
- Get the time all signals are red

setAllRedTime(value: integer)
- Set the time all signals are red

getState(): {name: "green_main_red_cross", mainSignal: "golight", crossSignal: "stoplight"}
- DEPRECATED! An alternative to this method may be added in the future
- This method always returns {name: "green_main_red_cross", mainSignal: "golight", crossSignal: "stoplight"}

getAxis(): legacyaxis
- DEPRECATED! Use getMainDirection instead
- This method returns the closest legacy axis to the main direction

setAxis(value: legacyaxis)
- DEPRECATED! Use setMainDirection instead
- This method will set the main direction to "east" if the provided axis is "x", or "north" if the axis is "z"

getLights(): false
- DEPRECATED! An alternative to this method may be added in the future
- This method always returns false

getTimeOperationStarted(): 0
- DEPRECATED! An alternative to this method may be added in the future
- This method always returns 0