#include <qlabibm4694.h>
Inheritance diagram for QlabIbm4694:
Hardware abstraction is not really easy, specifically when we have to deal with non standard hardware.
One has to map whatever can happen to something able to send signals to connected widgets and slots that interact naturally with various hardware pieces.
This version is by no ways a definitive one. Some parts of the abstraction could not be built as I did not have the needed hardware for, namely scale and fiscal printers.
You might have to create in child class for Fiscal Printers as capabilities and management depend harshly on each and every country laws and usages.
|
Creates a new instance of QlabIbm4694 owned by parent with name name |
|
Deletes the instance |
|
Return the active printer.
Reimplemented from QlabCashboxInterfaceDefinition. |
|
nCurses ClearScreen emulation for device dev Reimplemented from QlabCashboxInterfaceDefinition. |
|
Close All opened devices This Method _MUST_ be called before shutting down POS software Reimplemented from QlabCashboxInterfaceDefinition. |
|
Closes device named device
Reimplemented from QlabCashboxInterfaceDefinition. |
|
For internal use only. Process device Status Online & offline messages |
|
Display in full screen emulation Write msg on device dev starting at cursor pos cursor Reimplemented from QlabCashboxInterfaceDefinition. |
|
Displays msg on device dev at line lineno.
Reimplemented from QlabCashboxInterfaceDefinition. |
|
Displays string msg on display & dev at position cursor Warning: This tries to emulate nCurses, but the displays don't really do what we need. The only safe cursors are 0 and 20. Others may lead to inconsistencies, depending on display versions and release levels. Reimplemented from QlabCashboxInterfaceDefinition. |
|
Returns current Cash Drawer Status Reimplemented from QlabCashboxInterfaceDefinition. |
|
Evaluates the print line and returns a converted version. allows for dashing the message.
Reimplemented from QlabCashboxInterfaceDefinition. |
|
Starts the event management loop for the hardware. This is a hardware replica of Dialog behaviour in graphics mode. While the loop stays alive, we scan the messages and send signals when we need them. An in depth explanation of message loops and message queues can be found in Qt documentation. This is only a Dialog rewrite in a non graphics model. The POSM_ stuff comes from IBM documentation, sorry... Reimplemented from QlabCashboxInterfaceDefinition. |
|
Returns cashbox available features. The available feature list is left to implementor's choice. The preconized style for the list is (note: no QStringList declaration, only a result): OperatorDisplay_YES CustomerDisplay_YES CustomerReceiptPrinter_YES DocumentInsertPrinter_NO CheckPrinter_NO Scanner_YES MagneticStripReader_NO ElectronicPayment_NO FlyingSaucerGenerator_YES AlienFood_YES and so on for all features. Reimplemented from QlabCashboxInterfaceDefinition. |
|
For internal use only. This is only called by constructor. One should never try to call this by other means as this would reset the deviceList parameters and you would have to rescan all the devices. Reimplemented from QlabCashboxInterfaceDefinition. |
|
Returns the Keyboard Supervisor Key Status. It's up to implementor to do the real thing with this. Sample Implementation Code: long QlabIbm4694::keyboardSupervisorStatus() { PosArg args ; device d = deviceList[KEYBOARD] ; if ( d.descriptor > 0 ) { args.name = PosNkeyLock ; args.value = 0 ; if ( PosIOCtl( d.descriptor, POS_SYS_GET_VALUES, &args, 1) == -1) { emit deviceError( PosErrno(), SeverityWarning, QString( tr( "Device Error: Keyboard Error: %1" ) ) .arg( GetTableEntry( ErrnoTable, PosErrno() ) ) ) ; return 0 ; } } return args.value ; } Reimplemented from QlabCashboxInterfaceDefinition. |
|
Try to grab a lock on device dev.
Reimplemented from QlabCashboxInterfaceDefinition. |
|
For internal use only. Opens and Acquires a device dev with arguments args and a number of args nargs. As this uses the POSQMSG structure which is NEVER exported, you should not try to access this from outer classes!!! Only called by openDevice Protected method. |
|
Opens cash drawer Reimplemented from QlabCashboxInterfaceDefinition. |
|
Opens the device posted to us by the Message Queue This is a huge method implementing most of (huge and indigest [hai]) IBM Reference Manual. Device information is stored in the deviceList Map. Sorry, but if you want to understand what's done inside, you'll have to read the hai booklet.
|
|
Returns current printer status Reimplemented from QlabCashboxInterfaceDefinition. |
|
Print a line li to current Printer
Reimplemented from QlabCashboxInterfaceDefinition. |
|
Prints text stream txt to currentPrinter This is a wrapper to printLine() method allowing to pass full text. Reimplemented from QlabCashboxInterfaceDefinition. |
|
For internal use only. Internal Message Processor for events from keyboard. |
|
Chase process completed. This means we are ready for a new ticket Reimplemented from QlabCashboxInterfaceDefinition. |
|
Returns MSR data. Note that the event manager uses this when queing. Thus, an outside world call will always return a blank string. You access to the real data by connecting to MSRdataAvailable() signal which returns real data. Reimplemented from QlabCashboxInterfaceDefinition. |
|
Processes data sent by the printer. This is not so linear. |
|
Error recovery routine for printer errors |
|
For internal use only. Process printerStatus messages. This is mainly used to follow DI printing & check printing As many steps are required, we have to handle a bunch of status changes. |
|
Scanner data available. Must process and release scanner
Reimplemented from QlabCashboxInterfaceDefinition. |
|
For internal use only. Received drawer close message Reimplemented from QlabCashboxInterfaceDefinition. |
|
For internal use only. Received drawer open message Reimplemented from QlabCashboxInterfaceDefinition. |
|
Reads MICR data. On failure, posts an error and returns an empty string. Reimplemented from QlabCashboxInterfaceDefinition. |
|
Returns Scanner data. Note that the event manager uses this when queing. Thus, an outside world call will always return a blank string. You access to the real data by connecting to scannerDataAvailable() signal which returns real data. Reimplemented from QlabCashboxInterfaceDefinition. |
|
Releases all locked devices. This method _MUST_ be called before closeAll() If not released, the close may fail. If the app closes without closing devices, a concurrent app could crash on startup. Reimplemented from QlabCashboxInterfaceDefinition. |
|
Sets printing to Document Insert device Reimplemented from QlabCashboxInterfaceDefinition. |
|
Sets printing to Roll paper Customer Receipt Reimplemented from QlabCashboxInterfaceDefinition. |
|
Sets the active Printer to device prn. |
|
For internal use only. Numpad Style manager used only my the Checkout style keyboard PRIVATE use only. Don't even try to access this from outside. |
|
Sets up everything for normal use. This method must be called before starting the exec() event loop. It mainly checks all hardware, opens and acquires devices and reports hardware failures...
Reimplemented from QlabCashboxInterfaceDefinition. |
|
Default Error Beep Long high pitch tone Reimplemented from QlabCashboxInterfaceDefinition. |
|
Default Reject beep MidTime low pitch tone Reimplemented from QlabCashboxInterfaceDefinition. |
|
Sounds some beeps qualifies by frequency, duration and volume.
Reimplemented from QlabCashboxInterfaceDefinition. |
|
Default warning beep Short Medium Pitch tone Reimplemented from QlabCashboxInterfaceDefinition. |
|
Unlock eventually locked device dev
Reimplemented from QlabCashboxInterfaceDefinition. |
|
Wait for the user closing Drawer Reimplemented from QlabCashboxInterfaceDefinition. |
|
Used to write to CR and SJ station the buffer text Used by most printers except the 4610 series. Defining 2 methods is mandatory due to some inconsistencies in IBM aip driver. One should consider rewriting a really coherent aip. But this is a heavy task cause aip was never opened by IBM. Reimplemented from QlabCashboxInterfaceDefinition. |
|
Used to write to CR station the line text This is needed cause 4610 printers to not have SJ printing. CR+SJ must be implemented in different ways as 4610 printer does not discard SJ queries. Reimplemented from QlabCashboxInterfaceDefinition. |
|
Write the buffer to the DI Station One should consider making this more efficient. The DI interface is very confusing in aip driver. Reimplemented from QlabCashboxInterfaceDefinition. |
|
Temporary only for devel prurposes. Will disappear soon.
For internal use only.
|
|
Temporary only for devel prurposes. Will disappear soon.
For internal use only.
|
|
Temporary only for devel prurposes. Will disappear soon.
For internal use only.
|
|
Temporary only for devel prurposes. Will disappear soon.
For internal use only.
|
|
Handle to Message from internal queue.
For internal use only.
|