public class HasarFiscalDevice extends BasicFiscalDevice
eventHandler
Constructor and Description |
---|
HasarFiscalDevice(FiscalPort port,
int timeout,
boolean extendedProtocol,
boolean handleExtendedProtocol,
int maxTries,
java.lang.String encoding,
int baseRolloverYear) |
Modifier and Type | Method and Description |
---|---|
void |
execute(FiscalPacket request,
FiscalPacket response)
Execute a fiscal request.
|
boolean |
getHandleExtendedProtocol()
True to handle STATPRN responses via the FiscalDeviceEventHandler.onExtendedStatus() event.
|
protected boolean |
onExtendedStatus(FiscalPacket request,
FiscalPacket status)
onExtendedStatus() event dispacther.
|
void |
open()
Open the device.
|
void |
setHandleExtendedProtocol(boolean handleExtendedProtocol)
True to handle STATPRN responses via the FiscalDeviceEventHandler.onExtendedStatus() event.
|
void |
synchronize()
Test and synchronize communication with the device.
|
basicExecute, close, createFiscalPacket, execute, getBaseRolloverYear, getEncoding, getEventHandler, getExtendedProtocol, getFiscalPort, getMaxTries, getTimeout, isOpen, onExecute, onStatus, onTimeout, receivedInvalidChecksum, receivedInvalidChecksumByte, receivedInvalidFieldByte, receivedInvalidSerialNumberByte, receivedLongRequestWarning, receivedRepeatedPacket, receivedUnexpectedByte, receivedUnexpectedExtendedProtocol, receivedUnexpectedPacket, receivedUnexpectedStandardProtocol, setBaseRolloverYear, setEncoding, setEventHandler, setExtendedProtocol, setFiscalPort, setMaxTries, setTimeout
public HasarFiscalDevice(FiscalPort port, int timeout, boolean extendedProtocol, boolean handleExtendedProtocol, int maxTries, java.lang.String encoding, int baseRolloverYear)
public void open() throws java.lang.Exception
FiscalDevice
open
in interface FiscalDevice
open
in class BasicFiscalDevice
java.lang.Exception
public void synchronize() throws java.io.IOException
FiscalDevice
synchronize
in interface FiscalDevice
synchronize
in class BasicFiscalDevice
java.io.IOException
public void setHandleExtendedProtocol(boolean handleExtendedProtocol)
public boolean getHandleExtendedProtocol()
public void execute(FiscalPacket request, FiscalPacket response) throws java.io.IOException
FiscalDevice
execute
in interface FiscalDevice
execute
in class BasicFiscalDevice
java.io.IOException
protected boolean onExtendedStatus(FiscalPacket request, FiscalPacket status)