FabLabKasse.cashPayment.server.mdbCash package¶
Submodules¶
FabLabKasse.cashPayment.server.mdbCash.mdb module¶
-
exception
FabLabKasse.cashPayment.server.mdbCash.mdb.
InterfaceHardwareError
[source]¶ Bases:
exceptions.Exception
-
class
FabLabKasse.cashPayment.server.mdbCash.mdb.
MdbCashDevice
(port, addr=1, extensionConfig=None)[source]¶ Bases:
object
-
ACK
= 0¶
-
BUSY
= 'busy'¶
-
CMD_COIN_TYPE
= 4¶
-
CMD_DISPENSE
= 5¶
-
CMD_EXPANSION
= 7¶
-
CMD_POLL
= 3¶
-
CMD_RESET
= 0¶
-
CMD_SETUP
= 1¶
-
CMD_TUBE_STATUS
= 2¶
-
ERROR
= 'error'¶
-
IGNORE
= 'ignore'¶
-
JUST_RESET
= 'just reset'¶
-
NAK
= 255¶
-
RET
= 170¶
-
WARNING
= 'warning'¶
-
extensionCmd
(data)[source]¶ in addition to the MDB commands, the interface hardware provides extension commands for other features (LEDs, hopper, …). Failure on these commands is not tolerated.
-
poll
(wasJustReset=False)[source]¶ get events from device. :param wasJustReset: set this to True at the first poll after the RESET command
-
setLEDs
(leds)[source]¶ set RGB-LED color via extension command, if it is enabled in the extensionConfig. :param leds: list of two LED color values. color value: RR GG BB in hex plus a mode of N (normal) or special modes B (blink) or T (timeout: switch off after 20 sec) e.g. “00FF00N” = green normal, “FF0000B” = red blink, “0000FFT” = blue with timeout (will switch off after 20sec or the next command)
-
statusEvents
= {1: ['Escrow request', 'ignore'], 2: ['Payout Busy', 'busy'], 3: ['valid coin did not get to the place where credit is given', 'warning'], 4: ['Defective Tube Sensor', 'warning'], 5: ['Double Arrival', 'ignore'], 6: ['Acceptor unplugged', 'error'], 7: ['Tube jam', 'warning'], 8: ['ROM checksum error', 'error'], 9: ['coin routing error', 'error'], 10: ['Busy', 'busy'], 11: ['Was just reset', 'just reset'], 12: ['Coin jam', 'warning'], 13: ['Possible credited coin removal', 'warning']}¶
-