|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.meiglobal.ebds.api.event.AcceptorEventSource
com.meiglobal.ebds.api.Acceptor
public class Acceptor
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 |
---|
public Acceptor()
Method Detail |
---|
public static java.lang.String[] listPorts()
public boolean getSupressStandardPoll()
public boolean stopDownload()
public void open(java.lang.String port) throws AcceptorException
port
- The name of the port to use.
AcceptorException
- If an error occurs during connection.public void open(java.lang.String port, PowerUp powerUp) throws AcceptorException
port
- The name of the port to use.powerUp
- The power up policy to be used.
AcceptorException
- If an error occurs during connection.public void close()
public void escrowReturn() throws AcceptorException
AcceptorException
- If the device is not connected.public void escrowStack() throws AcceptorException
AcceptorException
- If the device is not connected.public java.lang.String getApplicationId() throws AcceptorException
AcceptorException
- If this property
is not supported or there is an exception with the response.public java.lang.String getApplicationPN() throws AcceptorException
AcceptorException
- If this property
is not supported or there is an exception with the response.public AuditLifeTimeTotals GetAuditLifeTimeTotals() throws AcceptorException
AcceptorException
- If this property
is not supported or there is an error with the device.public AuditPerformance GetAuditPerformance() throws AcceptorException
AcceptorException
- If this property
is not supported or there is an error with the device.public AuditQP GetAuditQP() throws AcceptorException
AcceptorException
- If this property
is not supported or there is an error with the device.public boolean getAutoStack()
public void setAutoStack(boolean autoStack) throws AcceptorException
autoStack
- The new value for the property.
AcceptorException
- If the device is not connected.public java.lang.String getBarCode() throws AcceptorException
AcceptorException
- If the document type is not a barcode.public Bill getBill() throws AcceptorException
AcceptorException
- If the document type is not a bill.public java.util.List<Bill> getBillTypes()
public java.util.List<java.lang.Boolean> getBillTypeEnables()
public void setBillTypesEnables(java.util.List<java.lang.Boolean> enablesTypes) throws AcceptorException
enablesTypes
- The list of enabled bill types.
AcceptorException
- If the device is
not connected, or the size of the enabled bill types is different from the bill types list.public java.util.List<Bill> getBillValues()
public java.util.List<java.lang.Boolean> getBillValueEnables()
public void setBillValueEnables(java.util.List<java.lang.Boolean> enablesValue) throws AcceptorException
enablesValue
- The list of enabled bill values to set.
AcceptorException
- If the device is not connected.public BNFStatus GetBNFStatus() throws AcceptorException
AcceptorException
- If the property
is not allowed or an error occurs.public BNFErrorStatus GetLastBNFError() throws AcceptorException
AcceptorException
- If the
BNFStatus property is not allowed.public java.lang.String getBootPN() throws AcceptorException
AcceptorException
- If the property
is not allowed or an error occurs.public boolean getCapAdvBookmark()
public boolean getCapApplicationId()
public boolean getCapApplicationPN()
public boolean getCapDeviceSoftReset()
public boolean getCapAssetNumber()
public boolean getCapAudit()
public boolean getCapBarCodes()
public boolean getCapBarCodesExt()
public boolean getCapBNFStatus()
public boolean getCapBookmark()
public boolean getCapBootPN()
public boolean getCapCalibrate()
public boolean getCapCashBoxTotal()
public boolean getCapClearAudit()
public boolean getCapCouponExt()
public boolean getCapDevicePaused()
public boolean getCapDeviceType()
public boolean getCapDeviceResets()
public boolean getCapDeviceSerialNumber()
public boolean getCapEasitrax()
public boolean getCapEscrowTimeout()
public boolean getCapFlashDownload()
public boolean getCapNoPush()
public boolean getCapNoteRetrieved()
public boolean getCapOrientationExt()
public boolean getCapPupExt()
public boolean getCapTestDoc()
public boolean getCapSetBezel()
public boolean getCapVariantId()
public boolean getCapVariantPN()
public boolean getCashBoxAttached()
public boolean getCashBoxFull()
public long getCashBoxTotal() throws AcceptorException
AcceptorException
- If the property
is not supported or if there is an error.public boolean getConnected()
public Coupon getCoupon() throws AcceptorException
AcceptorException
- If the document type is not a couponpublic boolean getDebugLog()
public void setDebugLog(boolean newVal) throws AcceptorException
newVal
- The status to set.
AcceptorException
- If there is a problem with the debug log file.public java.lang.String getDebugLogPath()
public void setDebugLogPath(java.lang.String debugLogPath)
debugLogPath
- The path for the file.public boolean getDeviceBusy()
public long getDeviceCRC() throws AcceptorException
AcceptorException
- If the property
is not allowed or an error occurs.public boolean getDeviceFailure()
public boolean getDeviceJammed()
public long getDeviceModel()
public boolean getDevicePaused()
public PowerUp getDevicePowerUp()
public long getDeviceResets() throws AcceptorException
AcceptorException
- If the property
is not supported or there is a communications error.public long getDeviceRevision()
public java.lang.String getDeviceSerialNumber() throws AcceptorException
AcceptorException
- If the property
is not supported or a communications error occurs.public State getDeviceState()
public java.lang.String getDeviceType() throws AcceptorException
AcceptorException
- If the property
is not supported or there is an error.public DocumentType getDocType()
public int getTransactionTimeout()
public void setTransactionTimeout(int timeout)
timeout
- The timeout to set.public int getDisconnectTimeout()
public void setDisconnectTimeout(int timeout) throws AcceptorException
timeout
- Timeout in milliseconds.
AcceptorException
- If the timeout value is less than or equal to zero.public int getDownloadTimeout()
public void setDownloadTimeout(int downloadTimeout)
downloadTimeout
- The timeout to set.public boolean getEnableAcceptance()
public void setEnableAcceptance(boolean enableAcceptance) throws AcceptorException
enableAcceptance
- The status to set.
AcceptorException
- If the device is not connected.public boolean getEnableBarCodes()
public void setEnableBarCodes(boolean enableBarCodes) throws AcceptorException
enableBarCodes
- Value to set.
AcceptorException
- If the device
is not connected or the property is not allowed.public boolean getEnableBookmarks()
public void setEnableBookmarks(boolean enableBookmarks) throws AcceptorException
enableBookmarks
- The status to set.
AcceptorException
- If the device
is not connected or the property is not allowed.public boolean getEnableCouponExt()
public void setEnableCouponExt(boolean enableCouponExt) throws AcceptorException
enableCouponExt
- The status to set.
AcceptorException
- If the device
is not connected or the property is not allowed.public boolean getEnableNoPush()
public void setEnableNoPush(boolean enableNoPush) throws AcceptorException
enableNoPush
- The status to set.
AcceptorException
- If the device
is not connected or the property is not allowed.public Orientation getEscrowOrientation()
public boolean getHighSecurity()
public void setHighSecurity(boolean highSecurity)
highSecurity
- The status to set.public OrientationControl getOrientationControl()
public void setOrientationControl(OrientationControl orientationControl)
orientationControl
- The orientation control to set.public OrientationControl getOrientationCtlExt()
public void SetOrientationCtlExt(OrientationControl orientationControlExt)
orientationControlExt
- The orientation control to set.public java.lang.String getPort()
public java.util.List<java.lang.String> getVariantNames() throws AcceptorException
AcceptorException
- If the property
is not supported or there is an error.public java.lang.String getVariantID() throws AcceptorException
AcceptorException
- If the property
is not supported or there is an error.public java.lang.String getVariantPN() throws AcceptorException
AcceptorException
- If the property
is not supported or there is an error.public static java.lang.String getVersion()
public void calibrate() throws AcceptorException
AcceptorException
- If the device is not connected or the device is not in IDLING state.public void flashDownload(java.lang.String filePath) throws AcceptorException
filePath
- The path to the flash file.
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.public byte[] rawTransaction(byte[] command) throws AcceptorException
command
- The command to send.
AcceptorException
- If an error occurs during communication.public void clearCashBoxTotal() throws AcceptorException
AcceptorException
- If the device is not connected.public java.lang.String getAssetNumber() throws AcceptorException
AcceptorException
- If the property
is not supported or there is an error.public void setAssetNumber(java.lang.String asset) throws AcceptorException
asset
- The asset number to set.
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.public void setBezel(Bezel bezel) throws AcceptorException
bezel
- The bezel to set.
AcceptorException
- If the device is not connected or an error occurs.public void SoftReset() throws AcceptorException
AcceptorException
- If not connected.public void specifyEscrowTimeout(int billTimeout, int barcodeTimeout) throws AcceptorException
billTimeout
- Timeout for bills in seconds.barcodeTimeout
- Timeout for barcode documents in seconds.
AcceptorException
- If the device is not connected.public void specifyPupExt(char pupMode, PupExt preEscrow, PupExt atEscrow, PupExt postEscrow, PupExt preStack) throws AcceptorException
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.
AcceptorException
- If the device is not connected or an error occurs.public boolean enterAdvancedBookmarkMode() throws AcceptorException
AcceptorException
- If the device is not connected
or the device does not support this feature.public boolean cancelAdvancedBookmarkMode() throws AcceptorException
AcceptorException
- If the device is not connected
or the device does not support this feature.public boolean clearAudit() throws AcceptorException
AcceptorException
- If the device is not connected or the device state
is not either 'Idling' or 'Failed'.public AuditContainer getBanknoteAuditData() throws AcceptorException
AcceptorException
- If the device is not connected or the device state
is not either 'Idling' or 'Failed'.public boolean disableCashboxCleanlinessReporting() throws AcceptorException
AcceptorException
- If the device is not connected.public boolean enableCashboxCleanlinessReporting() throws AcceptorException
AcceptorException
- If the device is not connected.protected byte[] constructOmnibusCommand(int payloadLength, byte controlCode, int data0Index)
payloadLength
- The lenght of the message array.controlCode
- The control code value.data0Index
- The index for the control code value.
protected void processReply(byte[] reply) throws AcceptorException
reply
- The device's reply.
AcceptorException
- If an error occurs.public void acceptorEventOccurred(AcceptorEvent evt)
acceptorEventOccurred
in interface AcceptorEventListener
evt
- The event that was raised.public boolean isInSoftResetWaitForReply()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |