Esempio n. 1
0
def init():

    """Initialises the hardware layer.
    The underlying hardware access layer should protect
    itself from being called more than once."""

    HardwareAccessLayer.init()
Esempio n. 2
0
def get_last_set_data():

    """Returns the last 'set_path()' values processed by the
    underlying access control layer. This method is used by
    unit-tests."""

    return HardwareAccessLayer.get_last_set_path_data()
Esempio n. 3
0
def red_amber(path):

    """Set the lights for the named path to red-amber."""

    HardwareAccessLayer.set_path(path, 0, 1)
Esempio n. 4
0
def amber(path):

    """Set the lights for the named path to amber."""

    HardwareAccessLayer.set_path(path, 1, 0)
Esempio n. 5
0
def green(path):

    """Set the lights for the named path green."""

    HardwareAccessLayer.set_path(path, 1, 1)
Esempio n. 6
0
def red(path):

    """Set the lights for the named path to red."""

    HardwareAccessLayer.set_path(path, 0, 0)
Esempio n. 7
0
def num_paths():

    """Returns the number of addressable paths."""

    return HardwareAccessLayer.num_paths()