Class: Extface::Driver::DaisyFx1200
- Inherits:
-
Extface::Driver
- Object
- ActiveRecord::Base
- Extface::Driver
- Extface::Driver::DaisyFx1200
- Defined in:
- app/models/extface/driver/daisy_fx1200.rb
Constant Summary collapse
- NAME =
'Daisy FX1200 (Serial)'.freeze
- GROUP =
Extface::FISCAL_DRIVER
- DEVELOPMENT =
driver is not ready for production (not passing all tests or has major bugs)
true- RAW =
Select driver features
true- PRINT =
responds to #push(data) and #pull
false- FISCAL =
POS, slip printers
true- REPORT =
cash registers, fiscal printers
false
Constants inherited from Extface::Driver
Instance Method Summary collapse
Methods inherited from Extface::Driver
#check_status, #flush, has_serial_config, #notify, #pull, #push, #rpush, #set_job
Instance Method Details
#autocut(partial = true) ⇒ Object
33 34 35 36 37 38 |
# File 'app/models/extface/driver/daisy_fx1200.rb', line 33 def autocut(partial = true) # <ESC> “d” “0” - Full-cut command # <ESC> “d” “1” - Partial-cut command #push build_packet(CMD) #push partial ? "\x1B\x64\x31" : "\x1B\x64\x30" end |
#handle(buffer) ⇒ Object
28 29 30 31 |
# File 'app/models/extface/driver/daisy_fx1200.rb', line 28 def handle(buffer) rpush buffer return buffer.length # return number of bytes processed end |