Skip to content

Release 1.1.0

Martin edited this page Jul 20, 2020 · 1 revision

This release has better support for Linux and support for additional device classes:

  • The simulator scripts are able to run under Linux if a Tcl/Tk interpreter with name wish is available.
  • Support for native serial IO via JNA has been added for Linux and other operating systems that provide a compatible API. Only the OS calls open, close, read, write, poll and system must be supported with open modes o, 1, and 2 for read, write and update, poll with struct pollfd { int fd; short events; short revents; } array, all parameters int, byte array (read, write) or String (open, system). Setting serial parameters will be made via configurable command line parameters (optional property file de.gmxhome.conrad.JNALinux.JnaLinuxSerial.properties).
  • Support for device class BumpBar has been added. In combination with RemoteOrderDisplay, it should be possible to make JavaPOS services that support handheld devices with display and keyboard within an FM network controlled by a base station (e.g. systems from Orderman®), implementing hydra devices for RemoteOrderDisplay and BumpBar. Therefore, this seems to be a good enhancement to extend the usability of JavaPOS-SPF for such devices.
  • Support for device classes Gate, ItemDispenser, Lights, MotionDetector and SignatureCapture has been added. A new sample implementation for a hydra device supporting these device classes has been added as well.

Details for Serial IO on Linux And Other Supported Unix-Like Operating Systems

To support serial IO on Linux and Unix-like operating systems, you can use JNA. JavaPOS-SPF provides class JnaLinuxSerial (in addition to adaptors for jSSC and jSerialCom), which uses a property file for specific stty settings. Here a brief description of that file:

Default property values in de.gmxhome.conrad.JNALinux.JnaLinuxSerial.properties

Here the default values supported via property file for SerialIO via JNALinux:

  • STTYPREFIX: Part of the command to set serial IO parameters. Default: stty raw -echo
  • BD1200: Command switch for baud rate 1200. Default: 1200
  • BD4800: Command switch for baud rate 4800. Default: 4800
  • BD9600: Command switch for baud rate 9600. Default: 9600
  • BD19200: Command switch for baud rate 19200. Default: 19200
  • BD38400: Command switch for baud rate 38400. Default: 38400
  • BD57600: Command switch for baud rate 57600. Default: 57600
  • BD115200: Command switch for baud rate 115200. Default: 115200
  • BD128000: Command switch for baud rate 12800. Default: *
  • BD256000: Command switch for baud rate 25600. Default: *
  • CS7: Command switch for data size of 7 bit. Default: cs7
  • CS8: Command switch for data size of 8 bit. Default: cs8
  • SB1: Command switch for one stop bit. Default: -cstopb
  • SB2: Command switch for two stop bits. Default: cstopb
  • PARNO: Command switches for no parity. Default: -parenb
  • PARODD: Command switches for odd parity. Default: parenb parodd
  • PAREVEN: Command switches for even parity. Default: parenb -parodd
  • PARMARK: Command switches for mark parity. Default: *
  • PARSPACE: Command switches for space parity. Default: *

There is to entry for the command suffix, the suffix is always " < " + com_port_name and should be acceptable for all Unix-like operating systems.

* An empty default means this property is not supported by default. If any OS should support the specific value or if other command switches are necessary for a specific parameter, create a property file that contains name / value pairs for all parts of the command that need to be changed.

Clone this wiki locally