Interfaces

class alphasign.interfaces.base.BaseInterface

Base interface from which all other interfaces inherit.

This class contains utility methods for fundamental sign features.

allocate(files)

Allocate a set of files on the device.

Parameters:files – list of file objects (alphasign.text.Text, alphasign.string.String, ...)
Return type:None
beep(frequency=0, duration=0.1, repeat=0)

Make the sign beep.

Parameters:
  • frequency – frequency integer (not in Hz), 0 - 254
  • duration – beep duration, 0.1 - 1.5
  • repeat – number of times to repeat, 0 - 15
Return type:

None

clear_memory()

Clear the sign’s memory.

Return type:None
set_run_sequence(files, locked=False)

Set the run sequence on the device.

This determines the order in which the files are displayed on the device, if at all. This is useful when handling multiple TEXT files.

Parameters:
Return type:

None

soft_reset()

Perform a soft reset on the sign.

This is non-destructive and does not clear the sign’s memory.

Return type:None
class alphasign.interfaces.local.DebugInterface

Dummy interface used only for debugging.

This does nothing except print the contents of written packets.

connect()
disconnect()
write(packet)
class alphasign.interfaces.local.Serial(device='/dev/ttyS0')

Connect to a sign through a local serial device.

This class uses pySerial.

Parameters:device (string) – character device (default: /dev/ttyS0)
connect()

Establish connection to the device.

disconnect()

Disconnect from the device.

write(packet)

Write packet to the serial interface.

Parameters:packet (alphasign.packet.Packet) – packet to write
class alphasign.interfaces.local.USB(usb_id)

Connect to a sign using USB.

This class uses PyUSB.

Parameters:usb_id – tuple of (vendor id, product id) identifying the USB device
connect(reset=True)
Parameters:reset – send a USB RESET command to the sign. This seems to cause problems in VMware.
Raises:usb.USBError – on USB-related errors
disconnect()
write(packet)