CORE POS - IS4C
The CORE POS front end
Public Member Functions | Static Public Member Functions | List of all members
COREPOS\pos\lib\DriverWrappers\ScaleDriverWrapper Class Reference
Inheritance diagram for COREPOS\pos\lib\DriverWrappers\ScaleDriverWrapper:
COREPOS\pos\lib\DriverWrappers\NewMagellan COREPOS\pos\lib\DriverWrappers\ssd

Public Member Functions

 javascriptFile ()
 
 ReadFromScale ()
 
 WriteToScale ($str)
 
 ReadReset ()
 

Static Public Member Functions

static factory ($class)
 

Detailed Description

PHP Module for talking to hardware

This class deals with reading and writing to hardware devices that PHP can't talk to directly. Normally this means "scanner scale". All drivers should provide a ScaleDriverWrapper subclass.

Modules that extend this class must at least define ReadFromScale and WriteToScale.

Member Function Documentation

COREPOS\pos\lib\DriverWrappers\ScaleDriverWrapper::javascriptFile ( )

Javascript used to interact with scale driver. Default is poll-scale.js.

Javascript file must provide a function named pollScale.

COREPOS\pos\lib\DriverWrappers\ScaleDriverWrapper::ReadFromScale ( )

Reads available scale and scanner input Function should print a JSON object with two fields: 'scale' is an HTML string to display current scale weight/status 'scans' is a string representing a UPC Use scaledisplaymsg() to generate scale HTML. This ensures appropriate weight-related session variables are updated.

COREPOS\pos\lib\DriverWrappers\ScaleDriverWrapper::ReadReset ( )

Clear all pending input

If the driver has been running in the backgounrd and the browser hasn't, there could be a lot of accumulated weight data. POS uses this method to discard everything on startup.

COREPOS\pos\lib\DriverWrappers\ScaleDriverWrapper::WriteToScale (   $str)

Sends output to the scale.

Parameters
$strthe output Currently supported messages (not case sensitive):
  1. goodBeep
  2. errorBeep
  3. twoPairs
  4. rePoll
  5. wakeup

The documentation for this class was generated from the following file: