FabLabKasse.cashPayment.server.NV11 package¶
Submodules¶
FabLabKasse.cashPayment.server.NV11.NV11Device module¶
-
class
FabLabKasse.cashPayment.server.NV11.NV11Device.
ESSPDevice
(port, presharedKey=81985526925837671, slaveID=0)[source]¶ Bases:
object
low layer eSSP protocol - implements the network layer and all communication-related commands
-
class
Helper
[source]¶ Bases:
object
-
CRC
= <FabLabKasse.cashPayment.server.NV11.crc_algorithms.Crc object>¶
-
-
class
Response
(data)[source]¶ Bases:
object
status + data
-
statusStrings
= {-1: 'decoded response contains no data', 126: 'Encrypted Data', 240: 'OK', 242: 'Command not known', 243: 'Wrong number of parameters', 244: 'Param out of range', 245: 'Command cannot be processed at this time, possibly busy or not correctly configured', 246: 'Software error', 248: 'Command failure', 250: 'Encryption key not set'}¶
-
-
class
-
class
FabLabKasse.cashPayment.server.NV11.NV11Device.
NV11Device
(port, presharedKey=81985526925837671, slaveID=0)[source]¶ Bases:
FabLabKasse.cashPayment.server.NV11.NV11Device.ESSPDevice
Interface client for Innovative Technology NV11 banknote validator/changer with eSSP Protocol
-
getPayoutValues
()[source]¶ get values of notes on payout stack. The last one of these is on top of the stack and will be paid out by the payout-command.
-
setEnabledChannels
(enabledChannels=None, upTo=0)[source]¶ enable cash input for certain channels (denominations). Use either of the two parameters. If both are used, the result will be combined with logical
or
.Parameters: - enabledChannels (list[int]) – IDs of channels to explicitly enable, even if their denominaion is
below the value of
upTo
. - upTo (int) – maximum allowed denomination, or 0
- enabledChannels (list[int]) – IDs of channels to explicitly enable, even if their denominaion is
below the value of
-
setRouteToPayout
(values)[source]¶ route all notes in the given list of values to the payout-store. others will be directly put to the cashbox and are not availble for return.
-
FabLabKasse.cashPayment.server.NV11.crc_algorithms module¶
CRC algorithms implemented in Python. If you want to study the Python implementation of the CRC routines, then this is a good place to start from.
The algorithms Bit by Bit, Bit by Bit Fast and Table-Driven are implemented.
This module can also be used as a library from within Python.
Examples¶
This is an example use of the different algorithms:
>>> from crc_algorithms import Crc
>>>
>>> crc = Crc(width=16, poly=0x8005,
... reflect_in=True, xor_in=0x0000,
... reflect_out=True, xor_out=0x0000)
>>> print("0x%x" % crc.bit_by_bit("123456789"))
>>> print("0x%x" % crc.bit_by_bit_fast("123456789"))
>>> print("0x%x" % crc.table_driven("123456789"))
-
class
FabLabKasse.cashPayment.server.NV11.crc_algorithms.
Crc
(width, poly, reflect_in, xor_in, reflect_out, xor_out, table_idx_width=None)[source]¶ Bases:
object
A base class for CRC routines.
-
bit_by_bit
(in_data)[source]¶ Classic simple and slow CRC implementation. This function iterates bit by bit over the augmented input message and returns the calculated CRC value at the end.
-
bit_by_bit_fast
(in_data)[source]¶ This is a slightly modified version of the bit-by-bit algorithm: it does not need to loop over the augmented bits, i.e. the Width 0-bits which are appended to the input message in the bit-by-bit algorithm.
-