Exemple #1
0
    def __init__(self, port, consts=None):
        port.setParity(PARITY_EVEN)
        port.setWriteTimeout(3)

        SerialBase.__init__(self, port)
        self._consts = consts or FiscNetConstants
        self._command_id = 0
        self._reset()
Exemple #2
0
    def __init__(self, port, consts=None):
        port.setParity(PARITY_EVEN)
        port.setWriteTimeout(3)

        SerialBase.__init__(self, port)
        self._consts = consts or FiscNetConstants
        self._command_id = 0
        self._reset()
Exemple #3
0
 def __init__(self, port, consts=None):
     self._consts = consts or MP25Constants
     port.timeout = 2
     port.writeTimeout = 5
     SerialBase.__init__(self, port)
     # XXX: Seems that Bematech doesn't contains any variable with the
     # coupon remainder value, so I need to manage it by myself.
     self.remainder_value = Decimal("0.00")
     self._reset()
Exemple #4
0
 def __init__(self, port, consts=None):
     self._consts = consts or MP25Constants
     port.setTimeout(2)
     port.setWriteTimeout(5)
     SerialBase.__init__(self, port)
     # XXX: Seems that Bematech doesn't contains any variable with the
     # coupon remainder value, so I need to manage it by myself.
     self.remainder_value = Decimal("0.00")
     self._reset()
Exemple #5
0
 def __init__(self, port, consts=None):       
     SerialBase.__init__(self, port)
     self._port.setTimeout(1.5)
     self._port.setWriteTimeout(5)
     self._port.setParity(serial.PARITY_EVEN)
     self._port.setXonXoff(0)
     self._port.setRtsCts(0)
     self.remainder_value = Decimal("0.0")       
     self._reset()
Exemple #6
0
 def __init__(self, port, consts=None):
     SerialBase.__init__(self, port)
     self._port.setTimeout(1.5)
     self._port.setWriteTimeout(5)
     self._port.setParity(serial.PARITY_EVEN)
     self._port.setXonXoff(0)
     self._port.setRtsCts(0)
     self.remainder_value = Decimal("0.0")
     self._reset()
Exemple #7
0
    def __init__(self, port, consts=None):
        SerialBase.__init__(self, port)

        # Make sure the printer is in ESC/BEMA mode
        self.write(GS + '\xF9\x20\x00')
        self._setup_charset()
        self.set_condensed()
        self.descentralize()
        self.unset_bold()
        self.unset_double_height()
Exemple #8
0
    def __init__(self, port, consts=None):
        SerialBase.__init__(self, port)

        # Make sure the printer is in ESC/BEMA mode
        self.write(GS + '\xF9\x20\x00')
        self._setup_charset()
        self.set_condensed()
        self.descentralize()
        self.unset_bold()
        self.unset_double_height()
Exemple #9
0
    def __init__(self, port, consts):
        SerialBase.__init__(self, port)
        BaseChequePrinter.__init__(self)
        self._consts = consts or EP375Constants
        self.coupon_discount = Decimal("0.0")
        self.coupon_surcharge = Decimal("0.0")
        self._command_id = self._item_counter = -1
        self.items_dict = {}
        self._is_coupon_open = False

        # The printer needs a little delay to shutdown/startup. Add this
        # number as a guard to make sure that the printer doesn't freeze
        # if we start up too fast.
        time.sleep(0.2)
Exemple #10
0
    def __init__(self, port, consts):
        SerialBase.__init__(self, port)
        BaseChequePrinter.__init__(self)
        self._consts = consts or EP375Constants
        self.coupon_discount = Decimal("0.0")
        self.coupon_surcharge = Decimal("0.0")
        self._command_id = self._item_counter = -1
        self.items_dict = {}
        self._is_coupon_open = False

        # The printer needs a little delay to shutdown/startup. Add this
        # number as a guard to make sure that the printer doesn't freeze
        # if we start up too fast.
        time.sleep(0.2)
Exemple #11
0
    def __init__(self, port, consts=None):
        port.parity = PARITY_EVEN
        port.writeTimeout = 3

        SerialBase.__init__(self, port)
        self._consts = consts or FiscNetConstants
        self._command_id = 0
        config = configparser.RawConfigParser()
        has_conf = config.read([os.path.expanduser('~/.stoq/stoqdrivers.conf')])
        if has_conf:
            try:
                self.CASH_SUPPLY = config.get('fiscnet', 'cash_supply')
                self.CASH_REMOVAL = config.get('fiscnet', 'cash_removal')
            except configparser.NoOptionError:
                log.info("Option not found, check stoqdrivers.conf")
        else:
            log.info("file: stoqdrivers.conf not found")
        self._reset()
Exemple #12
0
 def __init__(self, port, consts=None):
     SerialBase.__init__(self, port)
     EscPosMixin.__init__(self)
Exemple #13
0
 def __init__(self, port, consts=None):
     SerialBase.__init__(self, port)
     self._consts = consts or FBIIConstants
     self._command_id = FIRST_COMMAND_ID - 1  # 0x80
     self._reset()
Exemple #14
0
 def __init__(self, port, consts=None):
     SerialBase.__init__(self, port)
     self.set_condensed()
     self.descentralize()
     self.unset_bold()
     self.unset_double_height()
Exemple #15
0
 def readline(self):
     self._port.setDTR()
     return SerialBase.readline(self)
Exemple #16
0
 def __init__(self, port, consts=None):
     self._text_mode = 0
     SerialBase.__init__(self, port)
     EscPosMixin.__init__(self)
Exemple #17
0
 def __init__(self, port, consts=None):
     self._is_bold = False
     self._is_centralized = False
     SerialBase.__init__(self, port)
     self.write(CONDENSED_MODE)
Exemple #18
0
 def __init__(self, port, consts=None):
     SerialBase.__init__(self, port)
     BaseChequePrinter.__init__(self)
Exemple #19
0
 def writeline(self, data):
     while not self._port.getDSR():
         pass
     return SerialBase.writeline(self, data)
Exemple #20
0
 def __init__(self, device, consts=None):
     SerialBase.__init__(self, device)
     self._package = None
Exemple #21
0
 def __init__(self, port, consts=None):
     SerialBase.__init__(self, port)
     # Make sure the printer is in ESC/BEMA mode
     self.write(GS + '\xF9\x20\x00')
     EscPosMixin.__init__(self)
Exemple #22
0
 def __init__(self, port, consts=None):
     SerialBase.__init__(self, port)
     self.set_condensed()
     self.descentralize()
     self.unset_bold()
     self.unset_double_height()
Exemple #23
0
 def __init__(self, port, consts=None):
     SerialBase.__init__(self, port)
     self._consts = consts or FBIIConstants
     self._command_id = FIRST_COMMAND_ID - 1  # 0x80
     self._reset()
Exemple #24
0
 def __init__(self, port, consts=None):
     SerialBase.__init__(self, port)
     BaseChequePrinter.__init__(self)
Exemple #25
0
 def __init__(self, port, consts=None):
     self._consts = consts or FS345Constants
     SerialBase.__init__(self, port)
     self._reset()
Exemple #26
0
 def __init__(self, device, consts=None):
     SerialBase.__init__(self, device)
     self._package = None
Exemple #27
0
 def readline(self):
     self._port.setDTR()
     return SerialBase.readline(self)
Exemple #28
0
 def __init__(self, port, consts=None):
     self._consts = consts or IFS9000IConstants
     SerialBase.__init__(self, port)
     self._customer_document = None
Exemple #29
0
 def __init__(self, port, consts=None):
     self._is_bold = False
     self._is_centralized = False
     SerialBase.__init__(self, port)
     self.write(CONDENSED_MODE)
Exemple #30
0
 def __init__(self, port, consts=None):
     self._consts = consts or FS345Constants
     SerialBase.__init__(self, port)
     self._reset()
Exemple #31
0
 def __init__(self, port, consts=None):
     SerialBase.__init__(self, port)
Exemple #32
0
 def __init__(self, port, consts=None):
     self._consts = consts or IFS9000IConstants
     SerialBase.__init__(self, port)
     self._customer_document = None
Exemple #33
0
 def writeline(self, data):
     while not self._port.getDSR():
         pass
     return SerialBase.writeline(self, data)