com.meiglobal.ebds.api
Class Acceptor

java.lang.Object
  extended by com.meiglobal.ebds.api.event.AcceptorEventSource
      extended by com.meiglobal.ebds.api.Acceptor
All Implemented Interfaces:
AcceptorEventListener, java.util.EventListener

public class Acceptor
extends AcceptorEventSource
implements AcceptorEventListener

Main API class used to communicate with the Device.


Constructor Summary
Acceptor()
          Default constructor.
 
Method Summary
 void acceptorEventOccurred(AcceptorEvent evt)
          Logs when an event occurs.
 void calibrate()
          Issues a calibration command to the device for it to perform the calibration process.
 boolean cancelAdvancedBookmarkMode()
          Exits the Advanced Bookmark Mode.
 boolean clearAudit()
          Issues a request to clear the audit information in the device.
 void clearCashBoxTotal()
          Issues a command to the device to clear the cashbox total.
 void close()
          Closes the connection with the device.
protected  byte[] constructOmnibusCommand(int payloadLength, byte controlCode, int data0Index)
          Constructs a standard omnibus command with the payload length specified and the bit control.
 boolean disableCashboxCleanlinessReporting()
          Disables the reporting of Cashbox Cleanliness Events.
 boolean enableCashboxCleanlinessReporting()
          Enables the reporting of Cashbox Cleanliness Events.
 boolean enterAdvancedBookmarkMode()
          Sets the device in Advanced Bookmark Mode.
 void escrowReturn()
          Informs the device that the escrowed document should be returned.
 void escrowStack()
          Informs the device that the escrowed document should be stacked.
 void flashDownload(java.lang.String filePath)
          Performs the download of a flash file into the device.
 java.lang.String getApplicationId()
          Retrieves the application Id from the device.
 java.lang.String getApplicationPN()
          Retrieves the device's part number.
 java.lang.String getAssetNumber()
          Gets the device's asset number.
 AuditLifeTimeTotals GetAuditLifeTimeTotals()
          Used to retrieve the device's audit life time totals.
 AuditPerformance GetAuditPerformance()
          Used to retrieve the device's performance values.
 AuditQP GetAuditQP()
          Used to retrieve the device's Audit QP.
 boolean getAutoStack()
          Getter for the Auto Stack property.
 AuditContainer getBanknoteAuditData()
          Requests the banknote audit data structure object.
 java.lang.String getBarCode()
          Getter for the bar code value for the escrowed document.
 Bill getBill()
          Getter for the Bill object for the escrowed document.
 java.util.List<java.lang.Boolean> getBillTypeEnables()
          Returns a List of the bill types that are enabled on the the device.
 java.util.List<Bill> getBillTypes()
          Returns a List of the bill types for the device.
 java.util.List<java.lang.Boolean> getBillValueEnables()
          Returns a list of the bill values that are enabled on the device.
 java.util.List<Bill> getBillValues()
          Returns a list of the bill values on the device.
 BNFStatus GetBNFStatus()
          Returns the device's BNF status.
 java.lang.String getBootPN()
          Returns the device's Boot PN.
 boolean getCapAdvBookmark()
          Getter for the device's Advanced Bookmark capability.
 boolean getCapApplicationId()
          Getter for the device's application id capability.
 boolean getCapApplicationPN()
          Getter for the device's application PN capability.
 boolean getCapAssetNumber()
          Getter for the device's asset number capability.
 boolean getCapAudit()
          Getter for the device's auditing capability.
 boolean getCapBarCodes()
          Getter for the device's bar code support.
 boolean getCapBarCodesExt()
          Getter for the device's bar codes extended support.
 boolean getCapBNFStatus()
          Getter for the device's BNF status capability.
 boolean getCapBookmark()
          Getter for the device's Bookmark capability.
 boolean getCapBootPN()
          Getter for the device's Boot PN capability.
 boolean getCapCalibrate()
          Getter for the device's calibration capability.
 boolean getCapCashBoxTotal()
          Getter for the device's cash box total capability.
 boolean getCapClearAudit()
          Getter for the device's Clear Audit capability.
 boolean getCapCouponExt()
          Getter for the device's coupon extention capability.
 boolean getCapDevicePaused()
          Getter for the device's paused capability.
 boolean getCapDeviceResets()
          Getter for the device's reset count capability.
 boolean getCapDeviceSerialNumber()
          Getter for the device's serial number capability.
 boolean getCapDeviceSoftReset()
          Getter for the device's soft reset capability.
 boolean getCapDeviceType()
          Getter for the device's type support.
 boolean getCapEasitrax()
          Getter for the device's Easitrax capability.
 boolean getCapEscrowTimeout()
          Getter for the device's escrow timeout capability.
 boolean getCapFlashDownload()
          Getter for the device's flash upgrade capability.
 boolean getCapNoPush()
          Getter for the device's no push capability.
 boolean getCapNoteRetrieved()
          Getter for the device's note retrieved capability.
 boolean getCapOrientationExt()
          Getter for the device's orientation extention support.
 boolean getCapPupExt()
          Getter for the device's PUP extention.
 boolean getCapSetBezel()
          Getter for the device's set bezel support.
 boolean getCapTestDoc()
          Getter for the device's test document support.
 boolean getCapVariantId()
          Getter for the device's variant id capability.
 boolean getCapVariantPN()
          Getter for the device's variant PN capability.
 boolean getCashBoxAttached()
          Getter for the device's cash box status.
 boolean getCashBoxFull()
          Getter for the device's cash box full status.
 long getCashBoxTotal()
          Getter for the device's cash box total.
 boolean getConnected()
          Getter for the Device's connected status.
 Coupon getCoupon()
          Returns the device's escrowed coupon.
 boolean getDebugLog()
          Getter for the device's debug log status.
 java.lang.String getDebugLogPath()
          Getter for the debug log file path.
 boolean getDeviceBusy()
          Informs of the device status.
 long getDeviceCRC()
          Retrieves the device CRC value.
 boolean getDeviceFailure()
          Returns the device failure status.
 boolean getDeviceJammed()
          Returns the device jam status.
 long getDeviceModel()
          Returns the device Model.
 boolean getDevicePaused()
          Returns the device pause state.
 PowerUp getDevicePowerUp()
          Informs of the device power up policy option.
 long getDeviceResets()
          Retrieves the device's total resets.
 long getDeviceRevision()
          Retrieves the device's revision.
 java.lang.String getDeviceSerialNumber()
          Retrieves the device's serial number.
 State getDeviceState()
          Current device state.
 java.lang.String getDeviceType()
          Retrieves the device type.
 int getDisconnectTimeout()
          Gets the Disconnect Timeout property in milliseconds.
 DocumentType getDocType()
          Informs of the escrowed document type.
 int getDownloadTimeout()
          Deprecated. Not used
 boolean getEnableAcceptance()
          Returns the device current acceptance status.
 boolean getEnableBarCodes()
          Informs of the device's barcode acceptance.
 boolean getEnableBookmarks()
          Informs the device's bookmarks status.
 boolean getEnableCouponExt()
          Informs the device's Coupon extension status.
 boolean getEnableNoPush()
          Informs the device's No Push status.
 Orientation getEscrowOrientation()
          Returns the device's escrow orientation.
 boolean getHighSecurity()
          Returns the device's high security status.
 BNFErrorStatus GetLastBNFError()
          Returns the last BNF error reason.
 OrientationControl getOrientationControl()
          Informs the device's orientation control.
 OrientationControl getOrientationCtlExt()
          Informs the device's orientation control ext.
 java.lang.String getPort()
          Returns the currently set port.
 boolean getSupressStandardPoll()
          Informs if the standard poll has been supressed.
 int getTransactionTimeout()
          Deprecated. Transaction timeout no longer has meaning
 java.lang.String getVariantID()
          Retrieves the device's variant id.
 java.util.List<java.lang.String> getVariantNames()
          Retrieves the device's variant name.
 java.lang.String getVariantPN()
          Retrieves the device's part number.
static java.lang.String getVersion()
          Retrieves the API's version.
 boolean isInSoftResetWaitForReply()
          Informs if the device is in soft reset.
static java.lang.String[] listPorts()
          Gets a list of available ports that can be used by the application.
 void open(java.lang.String port)
          Opens the connection between the API and the device.
 void open(java.lang.String port, PowerUp powerUp)
          Opens the connection between the host and the device.
protected  void processReply(byte[] reply)
          Processes the reply received from the device.
 byte[] rawTransaction(byte[] command)
          Allows the Host to send a raw transaction.
 void setAssetNumber(java.lang.String asset)
          Sets the device's asset number.
 void setAutoStack(boolean autoStack)
          Setter for the Auto Stack property.
 void setBezel(Bezel bezel)
          Sets the bezel policy for the device.
 void setBillTypesEnables(java.util.List<java.lang.Boolean> enablesTypes)
          Sets the List of enabled bill types on the device.
 void setBillValueEnables(java.util.List<java.lang.Boolean> enablesValue)
          Sets the List of enabled bill values on the device.
 void setDebugLog(boolean newVal)
          Sets the status for the debug log.
 void setDebugLogPath(java.lang.String debugLogPath)
          Setter for the debug log file path.
 void setDisconnectTimeout(int timeout)
          Sets the Disconnect Timeout property in milliseconds.
 void setDownloadTimeout(int downloadTimeout)
          Deprecated. Not used
 void setEnableAcceptance(boolean enableAcceptance)
          Sets the device's acceptance status.
 void setEnableBarCodes(boolean enableBarCodes)
          Sets the device's barcode acceptance.
 void setEnableBookmarks(boolean enableBookmarks)
          Sets the device's bookmarks status.
 void setEnableCouponExt(boolean enableCouponExt)
          Sets the device's coupon extension status.
 void setEnableNoPush(boolean enableNoPush)
          Sets the device's No Push status.
 void setHighSecurity(boolean highSecurity)
          Sets the device's high security status.
 void setOrientationControl(OrientationControl orientationControl)
          Sets the device's orientation control.
 void SetOrientationCtlExt(OrientationControl orientationControlExt)
          Sets the device's orientation control ext.
 void setTransactionTimeout(int timeout)
          Deprecated. Can no longer modify transaction timeout
 void SoftReset()
          Performs a soft reset on the device.
 void specifyEscrowTimeout(int billTimeout, int barcodeTimeout)
          Specifies the escrow timeout for the device.
 void specifyPupExt(char pupMode, PupExt preEscrow, PupExt atEscrow, PupExt postEscrow, PupExt preStack)
          Deprecated. This feature is not supported
 boolean stopDownload()
          Signals the acceptor to stop the download process.
 
Methods inherited from class com.meiglobal.ebds.api.event.AcceptorEventSource
addAcceptorEventListener, fireAcceptorEvent, removeAcceptorEventListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Acceptor

public Acceptor()
Default constructor.

Method Detail

listPorts

public static java.lang.String[] listPorts()
Gets a list of available ports that can be used by the application.

Returns:
String array of available ports

getSupressStandardPoll

public boolean getSupressStandardPoll()
Informs if the standard poll has been supressed.

Returns:
True if it is supressed.

stopDownload

public boolean stopDownload()
Signals the acceptor to stop the download process.

Returns:
Always returns true.

open

public void open(java.lang.String port)
          throws AcceptorException
Opens the connection between the API and the device. The device will be opened with the default power up policy of "A."

Parameters:
port - The name of the port to use.
Throws:
AcceptorException - If an error occurs during connection.

open

public void open(java.lang.String port,
                 PowerUp powerUp)
          throws AcceptorException
Opens the connection between the host and the device.

Parameters:
port - The name of the port to use.
powerUp - The power up policy to be used.
Throws:
AcceptorException - If an error occurs during connection.

close

public void close()
Closes the connection with the device.


escrowReturn

public void escrowReturn()
                  throws AcceptorException
Informs the device that the escrowed document should be returned. This function should not be called unless the device state == Escrowed.

Throws:
AcceptorException - If the device is not connected.

escrowStack

public void escrowStack()
                 throws AcceptorException
Informs the device that the escrowed document should be stacked. This function should not be called unless the device state == Escrowed.

Throws:
AcceptorException - If the device is not connected.

getApplicationId

public java.lang.String getApplicationId()
                                  throws AcceptorException
Retrieves the application Id from the device.

Returns:
The application Id.
Throws:
AcceptorException - If this property is not supported or there is an exception with the response.

getApplicationPN

public java.lang.String getApplicationPN()
                                  throws AcceptorException
Retrieves the device's part number.

Returns:
The device part number.
Throws:
AcceptorException - If this property is not supported or there is an exception with the response.

GetAuditLifeTimeTotals

public AuditLifeTimeTotals GetAuditLifeTimeTotals()
                                           throws AcceptorException
Used to retrieve the device's audit life time totals.

Returns:
An object representing the totals.
Throws:
AcceptorException - If this property is not supported or there is an error with the device.

GetAuditPerformance

public AuditPerformance GetAuditPerformance()
                                     throws AcceptorException
Used to retrieve the device's performance values.

Returns:
An object representing the performance values.
Throws:
AcceptorException - If this property is not supported or there is an error with the device.

GetAuditQP

public AuditQP GetAuditQP()
                   throws AcceptorException
Used to retrieve the device's Audit QP.

Returns:
An object representing the Audit QP values.
Throws:
AcceptorException - If this property is not supported or there is an error with the device.

getAutoStack

public boolean getAutoStack()
Getter for the Auto Stack property.

Returns:
The autostack status.

setAutoStack

public void setAutoStack(boolean autoStack)
                  throws AcceptorException
Setter for the Auto Stack property. If autostack is being set to true and there is a document in escrow, the note will be stacked.

Parameters:
autoStack - The new value for the property.
Throws:
AcceptorException - If the device is not connected.

getBarCode

public java.lang.String getBarCode()
                            throws AcceptorException
Getter for the bar code value for the escrowed document.

Returns:
The bar code value as a String.
Throws:
AcceptorException - If the document type is not a barcode.

getBill

public Bill getBill()
             throws AcceptorException
Getter for the Bill object for the escrowed document.

Returns:
The Bill object.
Throws:
AcceptorException - If the document type is not a bill.

getBillTypes

public java.util.List<Bill> getBillTypes()
Returns a List of the bill types for the device.

Returns:
The Bill Types List.

getBillTypeEnables

public java.util.List<java.lang.Boolean> getBillTypeEnables()
Returns a List of the bill types that are enabled on the the device.

Returns:
The list of enabled bill types.

setBillTypesEnables

public void setBillTypesEnables(java.util.List<java.lang.Boolean> enablesTypes)
                         throws AcceptorException
Sets the List of enabled bill types on the device.

Parameters:
enablesTypes - The list of enabled bill types.
Throws:
AcceptorException - If the device is not connected, or the size of the enabled bill types is different from the bill types list.

getBillValues

public java.util.List<Bill> getBillValues()
Returns a list of the bill values on the device.

Returns:
The list of bill values.

getBillValueEnables

public java.util.List<java.lang.Boolean> getBillValueEnables()
Returns a list of the bill values that are enabled on the device.

Returns:
List of bill value enables.

setBillValueEnables

public void setBillValueEnables(java.util.List<java.lang.Boolean> enablesValue)
                         throws AcceptorException
Sets the List of enabled bill values on the device.

Parameters:
enablesValue - The list of enabled bill values to set.
Throws:
AcceptorException - If the device is not connected.

GetBNFStatus

public BNFStatus GetBNFStatus()
                       throws AcceptorException
Returns the device's BNF status.

Returns:
The device's BNF status.
Throws:
AcceptorException - If the property is not allowed or an error occurs.

GetLastBNFError

public BNFErrorStatus GetLastBNFError()
                               throws AcceptorException
Returns the last BNF error reason.

Returns:
Last BNF error reason.
Throws:
AcceptorException - If the BNFStatus property is not allowed.

getBootPN

public java.lang.String getBootPN()
                           throws AcceptorException
Returns the device's Boot PN.

Returns:
The device's Boot PN.
Throws:
AcceptorException - If the property is not allowed or an error occurs.

getCapAdvBookmark

public boolean getCapAdvBookmark()
Getter for the device's Advanced Bookmark capability.

Returns:
The support for this property.

getCapApplicationId

public boolean getCapApplicationId()
Getter for the device's application id capability.

Returns:
The support status for this property.

getCapApplicationPN

public boolean getCapApplicationPN()
Getter for the device's application PN capability.

Returns:
The support status for this property.

getCapDeviceSoftReset

public boolean getCapDeviceSoftReset()
Getter for the device's soft reset capability.

Returns:
The support status for this property.

getCapAssetNumber

public boolean getCapAssetNumber()
Getter for the device's asset number capability.

Returns:
The support status for this property.

getCapAudit

public boolean getCapAudit()
Getter for the device's auditing capability.

Returns:
The support status for this property.

getCapBarCodes

public boolean getCapBarCodes()
Getter for the device's bar code support.

Returns:
The support status for this property.

getCapBarCodesExt

public boolean getCapBarCodesExt()
Getter for the device's bar codes extended support.

Returns:
The support status for this property.

getCapBNFStatus

public boolean getCapBNFStatus()
Getter for the device's BNF status capability.

Returns:
The support status for this property.

getCapBookmark

public boolean getCapBookmark()
Getter for the device's Bookmark capability.

Returns:
The support status for this property.

getCapBootPN

public boolean getCapBootPN()
Getter for the device's Boot PN capability.

Returns:
The support status for this property.

getCapCalibrate

public boolean getCapCalibrate()
Getter for the device's calibration capability.

Returns:
The support status for this property.

getCapCashBoxTotal

public boolean getCapCashBoxTotal()
Getter for the device's cash box total capability.

Returns:
The support status for this property.

getCapClearAudit

public boolean getCapClearAudit()
Getter for the device's Clear Audit capability.

Returns:
The support status for this property.

getCapCouponExt

public boolean getCapCouponExt()
Getter for the device's coupon extention capability.

Returns:
The support status for this property.

getCapDevicePaused

public boolean getCapDevicePaused()
Getter for the device's paused capability.

Returns:
The support status for this property.

getCapDeviceType

public boolean getCapDeviceType()
Getter for the device's type support.

Returns:
The support status for this property.

getCapDeviceResets

public boolean getCapDeviceResets()
Getter for the device's reset count capability.

Returns:
The support status for this property.

getCapDeviceSerialNumber

public boolean getCapDeviceSerialNumber()
Getter for the device's serial number capability.

Returns:
The support status for this property.

getCapEasitrax

public boolean getCapEasitrax()
Getter for the device's Easitrax capability.

Returns:
The support status for this property.

getCapEscrowTimeout

public boolean getCapEscrowTimeout()
Getter for the device's escrow timeout capability.

Returns:
The support status for this property.

getCapFlashDownload

public boolean getCapFlashDownload()
Getter for the device's flash upgrade capability.

Returns:
The support status for this property.

getCapNoPush

public boolean getCapNoPush()
Getter for the device's no push capability.

Returns:
The support status for this property.

getCapNoteRetrieved

public boolean getCapNoteRetrieved()
Getter for the device's note retrieved capability.

Returns:
The support status for this property.

getCapOrientationExt

public boolean getCapOrientationExt()
Getter for the device's orientation extention support.

Returns:
The support status for this property.

getCapPupExt

public boolean getCapPupExt()
Getter for the device's PUP extention.

Returns:
The support status for this property.

getCapTestDoc

public boolean getCapTestDoc()
Getter for the device's test document support.

Returns:
The support status for this property.

getCapSetBezel

public boolean getCapSetBezel()
Getter for the device's set bezel support.

Returns:
The support status for this property.

getCapVariantId

public boolean getCapVariantId()
Getter for the device's variant id capability.

Returns:
The support status for this property.

getCapVariantPN

public boolean getCapVariantPN()
Getter for the device's variant PN capability.

Returns:
The support status for this property.

getCashBoxAttached

public boolean getCashBoxAttached()
Getter for the device's cash box status.

Returns:
True if the cashbox is attached.

getCashBoxFull

public boolean getCashBoxFull()
Getter for the device's cash box full status.

Returns:
True if the cashbox is full.

getCashBoxTotal

public long getCashBoxTotal()
                     throws AcceptorException
Getter for the device's cash box total.

Returns:
the total in the device's cash box.
Throws:
AcceptorException - If the property is not supported or if there is an error.

getConnected

public boolean getConnected()
Getter for the Device's connected status.

Returns:
True if the device is connected to the API.

getCoupon

public Coupon getCoupon()
                 throws AcceptorException
Returns the device's escrowed coupon.

Returns:
The coupon object.
Throws:
AcceptorException - If the document type is not a coupon

getDebugLog

public boolean getDebugLog()
Getter for the device's debug log status.

Returns:
True if the debug log is active.

setDebugLog

public void setDebugLog(boolean newVal)
                 throws AcceptorException
Sets the status for the debug log.

Parameters:
newVal - The status to set.
Throws:
AcceptorException - If there is a problem with the debug log file.

getDebugLogPath

public java.lang.String getDebugLogPath()
Getter for the debug log file path.

Returns:
The path of the debug log.

setDebugLogPath

public void setDebugLogPath(java.lang.String debugLogPath)
Setter for the debug log file path.

Parameters:
debugLogPath - The path for the file.

getDeviceBusy

public boolean getDeviceBusy()
Informs of the device status. If the device is busy, then that means the device may not be ready to process commands from the host.

Returns:
True if the device is NOT in IDLE state, false if IDLE.

getDeviceCRC

public long getDeviceCRC()
                  throws AcceptorException
Retrieves the device CRC value.

Returns:
The device CRC.
Throws:
AcceptorException - If the property is not allowed or an error occurs.

getDeviceFailure

public boolean getDeviceFailure()
Returns the device failure status.

Returns:
True if the device state is FAILED, false otherwise.

getDeviceJammed

public boolean getDeviceJammed()
Returns the device jam status.

Returns:
True if the device is JAMMED. false otherwise.

getDeviceModel

public long getDeviceModel()
Returns the device Model.

Returns:
The device model.

getDevicePaused

public boolean getDevicePaused()
Returns the device pause state.

Returns:
True if the device is paused, false otherwise.

getDevicePowerUp

public PowerUp getDevicePowerUp()
Informs of the device power up policy option.

Returns:
The device power up policy option.

getDeviceResets

public long getDeviceResets()
                     throws AcceptorException
Retrieves the device's total resets.

Returns:
The number of resets.
Throws:
AcceptorException - If the property is not supported or there is a communications error.

getDeviceRevision

public long getDeviceRevision()
Retrieves the device's revision.

Returns:
The device revision.

getDeviceSerialNumber

public java.lang.String getDeviceSerialNumber()
                                       throws AcceptorException
Retrieves the device's serial number.

Returns:
The device's serial number.
Throws:
AcceptorException - If the property is not supported or a communications error occurs.

getDeviceState

public State getDeviceState()
Current device state.

Returns:
The device state.

getDeviceType

public java.lang.String getDeviceType()
                               throws AcceptorException
Retrieves the device type.

Returns:
The device type.
Throws:
AcceptorException - If the property is not supported or there is an error.

getDocType

public DocumentType getDocType()
Informs of the escrowed document type.

Returns:
The document type.

getTransactionTimeout

public int getTransactionTimeout()
Deprecated. Transaction timeout no longer has meaning

Informs the transaction timeout.

Returns:
The transaction timeout.

setTransactionTimeout

public void setTransactionTimeout(int timeout)
Deprecated. Can no longer modify transaction timeout

Sets the transaction timeout.

Parameters:
timeout - The timeout to set.

getDisconnectTimeout

public int getDisconnectTimeout()
Gets the Disconnect Timeout property in milliseconds. This value controls how long before the API raises a disconnected event when communications are lost.

Returns:
Timeout value in milliseconds.

setDisconnectTimeout

public void setDisconnectTimeout(int timeout)
                          throws AcceptorException
Sets the Disconnect Timeout property in milliseconds. This value controls how long before the API raises a disconnected event when communications are lost.

Parameters:
timeout - Timeout in milliseconds.
Throws:
AcceptorException - If the timeout value is less than or equal to zero.

getDownloadTimeout

public int getDownloadTimeout()
Deprecated. Not used

Informs the download timeout.

Returns:
The download timeout.

setDownloadTimeout

public void setDownloadTimeout(int downloadTimeout)
Deprecated. Not used

Sets the download timeout.

Parameters:
downloadTimeout - The timeout to set.

getEnableAcceptance

public boolean getEnableAcceptance()
Returns the device current acceptance status.

Returns:
True if acceptance is enabled, false otherwise.

setEnableAcceptance

public void setEnableAcceptance(boolean enableAcceptance)
                         throws AcceptorException
Sets the device's acceptance status.

Parameters:
enableAcceptance - The status to set.
Throws:
AcceptorException - If the device is not connected.

getEnableBarCodes

public boolean getEnableBarCodes()
Informs of the device's barcode acceptance.

Returns:
The barcode acceptance status.

setEnableBarCodes

public void setEnableBarCodes(boolean enableBarCodes)
                       throws AcceptorException
Sets the device's barcode acceptance.

Parameters:
enableBarCodes - Value to set.
Throws:
AcceptorException - If the device is not connected or the property is not allowed.

getEnableBookmarks

public boolean getEnableBookmarks()
Informs the device's bookmarks status.

Returns:
true if bookmarks are enabled.

setEnableBookmarks

public void setEnableBookmarks(boolean enableBookmarks)
                        throws AcceptorException
Sets the device's bookmarks status.

Parameters:
enableBookmarks - The status to set.
Throws:
AcceptorException - If the device is not connected or the property is not allowed.

getEnableCouponExt

public boolean getEnableCouponExt()
Informs the device's Coupon extension status.

Returns:
True if the coupon extension is enabled.

setEnableCouponExt

public void setEnableCouponExt(boolean enableCouponExt)
                        throws AcceptorException
Sets the device's coupon extension status.

Parameters:
enableCouponExt - The status to set.
Throws:
AcceptorException - If the device is not connected or the property is not allowed.

getEnableNoPush

public boolean getEnableNoPush()
Informs the device's No Push status.

Returns:
True if No Push mode is enabled.

setEnableNoPush

public void setEnableNoPush(boolean enableNoPush)
                     throws AcceptorException
Sets the device's No Push status.

Parameters:
enableNoPush - The status to set.
Throws:
AcceptorException - If the device is not connected or the property is not allowed.

getEscrowOrientation

public Orientation getEscrowOrientation()
Returns the device's escrow orientation.

Returns:
The orientation. Will return Orientation.UnknownOrientation if the capability is not allowed.

getHighSecurity

public boolean getHighSecurity()
Returns the device's high security status.

Returns:
True if the device is set to high security.

setHighSecurity

public void setHighSecurity(boolean highSecurity)
Sets the device's high security status.

Parameters:
highSecurity - The status to set.

getOrientationControl

public OrientationControl getOrientationControl()
Informs the device's orientation control.

Returns:
The device's orientation control.

setOrientationControl

public void setOrientationControl(OrientationControl orientationControl)
Sets the device's orientation control.

Parameters:
orientationControl - The orientation control to set.

getOrientationCtlExt

public OrientationControl getOrientationCtlExt()
Informs the device's orientation control ext. This only pertains to extended note mode.

Returns:
The device's orientation control ext.

SetOrientationCtlExt

public void SetOrientationCtlExt(OrientationControl orientationControlExt)
Sets the device's orientation control ext. This only pertains to extended note mode.

Parameters:
orientationControlExt - The orientation control to set.

getPort

public java.lang.String getPort()
Returns the currently set port.

Returns:
Port identifier String.

getVariantNames

public java.util.List<java.lang.String> getVariantNames()
                                                 throws AcceptorException
Retrieves the device's variant name.

Returns:
The variant name.
Throws:
AcceptorException - If the property is not supported or there is an error.

getVariantID

public java.lang.String getVariantID()
                              throws AcceptorException
Retrieves the device's variant id.

Returns:
The device's variant id.
Throws:
AcceptorException - If the property is not supported or there is an error.

getVariantPN

public java.lang.String getVariantPN()
                              throws AcceptorException
Retrieves the device's part number.

Returns:
The device's part number.
Throws:
AcceptorException - If the property is not supported or there is an error.

getVersion

public static java.lang.String getVersion()
Retrieves the API's version.

Returns:
The API's version.

calibrate

public void calibrate()
               throws AcceptorException
Issues a calibration command to the device for it to perform the calibration process.

Throws:
AcceptorException - If the device is not connected or the device is not in IDLING state.

flashDownload

public void flashDownload(java.lang.String filePath)
                   throws AcceptorException
Performs the download of a flash file into the device.

Parameters:
filePath - The path to the flash file.
Throws:
AcceptorException - If the device is not in either "DownloadRestart" state or connected in "Idling" state. Will also throw the exception if the flashdownload file does not exist or is corrupted.

rawTransaction

public byte[] rawTransaction(byte[] command)
                      throws AcceptorException
Allows the Host to send a raw transaction. This takes a byte array of an EBDS message and returns the device's response to this message.

Parameters:
command - The command to send.
Returns:
The command response.
Throws:
AcceptorException - If an error occurs during communication.

clearCashBoxTotal

public void clearCashBoxTotal()
                       throws AcceptorException
Issues a command to the device to clear the cashbox total.

Throws:
AcceptorException - If the device is not connected.

getAssetNumber

public java.lang.String getAssetNumber()
                                throws AcceptorException
Gets the device's asset number.

Returns:
Asset number String.
Throws:
AcceptorException - If the property is not supported or there is an error.

setAssetNumber

public void setAssetNumber(java.lang.String asset)
                    throws AcceptorException
Sets the device's asset number. The asset number must be a String value with 16 or fewer characters.

Parameters:
asset - The asset number to set.
Throws:
AcceptorException - If the device is not connected or the asset String is greater than 16 characters. Will also throw an exception if the device state is not either Idling or Failed.

setBezel

public void setBezel(Bezel bezel)
              throws AcceptorException
Sets the bezel policy for the device.

Parameters:
bezel - The bezel to set.
Throws:
AcceptorException - If the device is not connected or an error occurs.

SoftReset

public void SoftReset()
               throws AcceptorException
Performs a soft reset on the device.

Throws:
AcceptorException - If not connected.

specifyEscrowTimeout

public void specifyEscrowTimeout(int billTimeout,
                                 int barcodeTimeout)
                          throws AcceptorException
Specifies the escrow timeout for the device. The values are in seconds and a value of 0 (zero) represents no timeout.

Parameters:
billTimeout - Timeout for bills in seconds.
barcodeTimeout - Timeout for barcode documents in seconds.
Throws:
AcceptorException - If the device is not connected.

specifyPupExt

public void specifyPupExt(char pupMode,
                          PupExt preEscrow,
                          PupExt atEscrow,
                          PupExt postEscrow,
                          PupExt preStack)
                   throws AcceptorException
Deprecated. This feature is not supported

Specifies the device's PUP extension mode.

Parameters:
pupMode - PUP mode to set.
preEscrow - PUP mode to set for preEscrow state.
atEscrow - PUP mode to set during escrow.
postEscrow - PUP mode to set for post escrow state.
preStack - PUP mode to set for pre Stack state.
Throws:
AcceptorException - If the device is not connected or an error occurs.

enterAdvancedBookmarkMode

public boolean enterAdvancedBookmarkMode()
                                  throws AcceptorException
Sets the device in Advanced Bookmark Mode. This is a temporary state. It will accept the next document without discrimination. If the next document is a valid note, it will automatically reject the note.

Returns:
True if the device was successfully placed in Advanced Bookmark Mode. False if the device cannot be place in the mode at this time (perhaps it is processing a note).
Throws:
AcceptorException - If the device is not connected or the device does not support this feature.

cancelAdvancedBookmarkMode

public boolean cancelAdvancedBookmarkMode()
                                   throws AcceptorException
Exits the Advanced Bookmark Mode.

Returns:
True if the device successfully exited Advanced Bookmark Mode. False if the device cannot exit the mode at this time (perhaps it is processing a note). Will also return true if the device was not in this mode to begin with.
Throws:
AcceptorException - If the device is not connected or the device does not support this feature.

clearAudit

public boolean clearAudit()
                   throws AcceptorException
Issues a request to clear the audit information in the device.

Returns:
True if the request will be honored (An event confirming the completion status will follow shortly). False if the device cannot honor this request.
Throws:
AcceptorException - If the device is not connected or the device state is not either 'Idling' or 'Failed'.

getBanknoteAuditData

public AuditContainer getBanknoteAuditData()
                                    throws AcceptorException
Requests the banknote audit data structure object. This is a blocking call so no API requests can be honored until this function returns.

Returns:
Audit object containing the total counts for Recognized, Validated, and Stacked documents based on index.
Throws:
AcceptorException - If the device is not connected or the device state is not either 'Idling' or 'Failed'.

disableCashboxCleanlinessReporting

public boolean disableCashboxCleanlinessReporting()
                                           throws AcceptorException
Disables the reporting of Cashbox Cleanliness Events.

Returns:
True if the device successfully acknowledged the disable command. False if the device did not exit the mode or the feature is not supported.
Throws:
AcceptorException - If the device is not connected.

enableCashboxCleanlinessReporting

public boolean enableCashboxCleanlinessReporting()
                                          throws AcceptorException
Enables the reporting of Cashbox Cleanliness Events. When this feature is enabled, the device will send out an event whenever a cashbox is inserted and it is in need of servicing. Events are only raised when a cashbox is inserted or when this feature is first enabled. Also, no event is raised if the cashbox does not required any maintenance.

Returns:
True if the device successfully acknowledged the enable command. False if the device did not enter the mode or the feature is not supported.
Throws:
AcceptorException - If the device is not connected.

constructOmnibusCommand

protected byte[] constructOmnibusCommand(int payloadLength,
                                         byte controlCode,
                                         int data0Index)
Constructs a standard omnibus command with the payload length specified and the bit control.

Parameters:
payloadLength - The lenght of the message array.
controlCode - The control code value.
data0Index - The index for the control code value.
Returns:
An array with the results of building the command.

processReply

protected void processReply(byte[] reply)
                     throws AcceptorException
Processes the reply received from the device.

Parameters:
reply - The device's reply.
Throws:
AcceptorException - If an error occurs.

acceptorEventOccurred

public void acceptorEventOccurred(AcceptorEvent evt)
Logs when an event occurs.

Specified by:
acceptorEventOccurred in interface AcceptorEventListener
Parameters:
evt - The event that was raised.

isInSoftResetWaitForReply

public boolean isInSoftResetWaitForReply()
Informs if the device is in soft reset.

Returns:
True if it is in soft reset waiting for reply.