Documente Academic
Documente Profesional
Documente Cultură
CONFIDENTIAL PROPERTY
This document and the information contained herein is the confidential property of MEI,
Inc. It must not be copied, duplicated, or used in any manner, or transmitted to others
without the prior written permission of MEI.
Table of Contents
1 Change History ...................................................................................................................................... 5
2 Introduction .......................................................................................................................................... 6
2.1 Acronyms and Definitions ............................................................................................................. 6
2.2 Scope ............................................................................................................................................. 6
2.3 Requirements ................................................................................................................................ 7
2.3.1 Products ................................................................................................................................ 7
2.3.2 Software ................................................................................................................................ 7
2.3.3 Hardware............................................................................................................................... 7
3 SCR Toolkit ............................................................................................................................................ 8
3.1 Namespace architecture ............................................................................................................... 8
3.2 Enumerations ................................................................................................................................ 9
3.2.1 eDeviceState ......................................................................................................................... 9
3.2.2 eDisabledReason ................................................................................................................. 10
3.2.3 eDocumentEvent ................................................................................................................ 10
3.2.4 eOrientation ........................................................................................................................ 11
3.2.5 ePowerUpPolicy .................................................................................................................. 11
3.2.6 eSessionType....................................................................................................................... 11
3.2.7 eTerminationCondtion ........................................................................................................ 12
3.2.8 eTransportStatus................................................................................................................. 12
3.3 SCR API Core Class....................................................................................................................... 13
3.3.1 SCR ...................................................................................................................................... 13
3.4 Event Arguments......................................................................................................................... 33
3.4.1 BoolResponseEventArgs ..................................................................................................... 33
3.4.2 CassetteStatusEventArgs .................................................................................................... 33
3.4.3 CassetteStatusEventArgs .................................................................................................... 34
3.4.4 DeviceStateEventArgs ......................................................................................................... 34
3.4.5 DocumentStatusEventArgs ................................................................................................. 34
3.4.6 MissingNotesEventArgs ...................................................................................................... 35
3.4.7 TransportStatusEventArgs .................................................................................................. 35
3.5 Document Classes ....................................................................................................................... 36
3.5.1 IDocument : Interface ......................................................................................................... 36
2.2 Scope
The purpose of this document is to provide a detailed description of the best practices for integrating
the SCR device. This document will focus on the SCR API and its use.
A more technical description of many of the concepts and settings described in this document can be
found in the EBDS Protocol Specification Document. If operators are planning to integrate the EBDS
protocol themselves (without using the API), please request the specification document through our
technical support team or account manager.
Cashflow STS User Manual - This document is available as part of the STS installation package
and can be referenced to get an understanding of how to use the tool to configure the SCR
device.
EBDS Protocol Specification (PCN 20105-002850209-PS) - This manual covers the low level
protocol on which the API is built. No knowledge of EBDS is required to use the API and is only
mentioned here as a reference if the reader wishes to get a deeper understanding of the
framework on which the device operates.
2.4.2 Software
SCR Toolkit supports the .NET framework 2.0. The API was also designed to support legacy COM
applications.
The demonstration tools and associated source code projects were created with Microsoft Visual Studio
2010.
This document also references the Cashflow STS program which is required to change some of the more
advanced configuration settings for banknote recycling.
2.4.3 Hardware
The connected host machine must have either a serial port or a USB port. USB support is only available
on Windows Operating system through a USB to Serial Communications Driver. (USB SUPPORT IS
FUTURE DEVELOPMENT)
The Exceptions have been enhanced to add a unique HRESULT to each instance as shown in the
following table:
Exception Class HRESULT Value
DocumentIndexOutOfRangeException 0xA0130001
InsufficientFundsException 0xA0130002
InvalidMessageException 0xA0130003
NegativeAcknowledgementException 0xA0130004
OperationNotAllowedException 0xA0130005
Exceptions
3.2.1 eDeviceState
The device state enumeration captures all of the possible states for the SCR Device. Some states can
occur at the same time (ex. Escrowed and Initializing) so the following list has been ordered with the
highest priority at the top. Therefore, Escrowed takes precedence over Initializing and will be reported
as such.
Type Overview
DOWNLOADING The device is either actively downloading firmware or prepared for the
download to begin.
FAILURE The device has encountered a severe error. The situation must be
corrected and the device requires a power cycle before operations can
resume.
CALIBRATING The device is either actively being calibrated or prepared for calibration
to begin.
ESCROWED A document is in the escrow position and the device is waiting for a
host command to either stack or return the document.
DISABLED The device is out of service. The operator may be able to take actions to
correct the situation and place the device back in service.
(Example - insert cashbox, clear a jam)
POWERING_UP The device is performing its start-up sequence. Many operations are not
allowed during this state.
UNKNOWN_DOCUMENTS The device has completed the inventory routine and one or more
_DETECTED unknown documents are present on one or both recycler drums.
INITIALIZING The API is creating a baseline and fetching data from the device. No
other operations are permitted until the initialization sequence is
complete.
STACKING The device is currently moving a document from the customer to either
the cashbox or a recycler.
DISPENSING The device is currently moving a document from a recycler to the
customer.
FLOATING_DOWN The device is currently moving a document from the recycler to the
cashbox.
RETURNING The device is currently moving a document from escrow to the
customer.
ACCEPTING The device is currently moving a document from the customer to the
escrow position.
HOST_DISABLED The device is out of service at the request of the host. No documents
can be inserted.
IDLE The device is idle and ready to initiate a transaction. In this state, all
commands are allowed.
DISCONNECTED Communications with the device have not yet been established or they
have been lost.
3.2.3 eDocumentEvent
The document event enumeration lists all of the possible significant scenarios that occur while
processing a document. Two events are considered credit changing events { DISPENSED, STACKED }
while the remaining are informative.
Type Overview
DISPENSED The document is in the process of being issued to the customer and has
just left the secure control of the device. Credit should be adjusted with
this event.
ESCROWED A document has reached the escrow state. The host make a decision as
to whether to stack or return the document.
REJECTED An invalid document has been ejected from the system.
RETRIEVED A document that was previously returned or dispensed has been
retrieved by the customer. This event signifies that the document has
completely left the system.
RETURNED A valid document has been issued to the customer and they are now
able to retrieve the document. This event can occur when the host does
not want to stack an escrowed document or during a dispense
operation. In a dispense operation, RETURNED always comes after
DISPENSED.
STACKED A valid document has been added to the device's inventory. Credit
should be adjusted with this event. This event can also occur for a
document that is already part of the inventory system (example -
floating down a document).
Type Overview
FAILED The flash download process has failed for some reason. Most likely
reason is that communications were interrupted.
IN_PROGRESS The device is in the process of being updated.
SUCCESSFUL The flash download process has completed successfully.
3.2.5 eOrientation
The orientation enumeration is used only within the NoteTableAudit class to retrieve the data structure
for the associated orientation.
Type Overview
LEFT_DOWN Document fed in the left- down position
LEFT_UP Document fed in the left -up position
RIGHT_DOWN Document fed in the right-down position
RIGHT_UP Document fed in the right-up position
3.2.6 ePowerUpPolicy
Type Overview
R The R power up policy will always complete the original operation after
power is resumed.
S The S power up policy differs from the R version only in that an
interrupted dispense operation attempt to draw the banknote back to
the escrow position and report no value. This is done prevent leaving a
banknote unattended in the event the customer is no longer present.
3.2.7 eSessionType
Type Overview
CUSTOMER_TO_CASSETTE Documents were stacked to the cassette from the customer.
CUSTOMER_TO_RECYCLER Documents were stacked to the recycler from the customer.
NO_MOVEMENT_RECORD No documents have been moved as there has not been any movement
request. Will occur after a power up assuming power was not lost
during a document movement - see eTerminationCondition.
POWER_FAILED.
RECYCLER_TO_CASSETTE Documents were floated down to the cassette.
RECYCLER_TO_CUSTOMER Documents were dispensed to the customer.
3.2.9 eTransportStatus
Type Overview
CLOSED The device's bill path is closed and secured.
OPENED The device's bill path is open. The system is out of service.
SCR
SCR
3.3.1 SCR
The SCR Class is the main class that will be used to interact with the SCR device. The tables below list the
events, properties, and methods available.
3.3.1.1 Events
Event Name Overview
OnCassetteStatusChanged This event is raised when the cassette status changes either due to
operator intervention (inserting / removal) or when the cassette
becomes full.
Recommended Action: Operator should insert an empty cassette for any
value except eCassetteStatus.PRESENT.
OnCheatDetected This event is raised when the system has detected possible fraudulent
activity. The system cannot guarantee the exact location of any
document in progress.
Recommended Action: CPI cannot recommend the actions to perform in
relation to a cheated event. The host system should take the
environment and any regulatory implications into account when deciding
whether or not to keep the system in service.
OnClearAuditCompleted This event is raised to the host after a request to Clear Audit has been
made. This event states whether or not the request was successful. It is
only sent if the original call to ClearAudit returned ‘true’, meaning the
device acknowledged the request.
Recommended Action: a False (failure) value in the event arguments
signifies a critical error with the device memory. The host should log the
event and the device should be analyzed for defects.
<Table Continues on Next Page>
Each event raises its own event arguments object. Please see the Event Arguments section for more
detail on the custom event arguments used by the library.
ApiVersion
Access Type Version Read Point Write Point
Read Only string 1.00 API Variable N/A
Description
Gets the CPI part number of this API.
The return value can be parsed as follows: first 6 digits are a 'component' identifier and should
remain the same over time while the remaining 3 digits specify the version and will change as
new releases are made available.
CassetteStatus
Access Type Version Read Point Write Point
Read Only eCassetteStatus 1.00 IsOpen == true N/A
Description
Gets the status of the cassette system. Any detected changes to this property will be reported
through the OnCassetteStatusChanged event. The recommended handling of status changes is
to process them in the associated event handler but this property was added as a convenience
for reporting purposes. Note, will return the default value of eCassetteStatus.PRESENT if not
currently connected to a device.
Returns:
eCassetteStatus.PRESENT if the cassette is present and operational.
eCassetteStatus.REMOVED and eCassetteStatus.FULL represent out of service conditions that
must be corrected.
DeviceState
Access Type Version Read Point Write Point
Read Only eDeviceState 1.00 API Variable N/A
Description
Gets the current operational state of the device.
The recommended handling of status changes is to process them in the associated event
handler (see OnDeviceStateChanged).
DisabledReason
Access Type Version Read Point Write Point
Read Only eDisabledReason 1.00 DeviceState == N/A
eDeviceState.DISABLED
Description
Gets the out of service reason for the device.
This value is valid all of the time but will report eDisabledReason.NOT_DISABLED unless the
DeviceState == eDeviceState.DISABLED
IsBarcodeAcceptanceEnabled
Access Type Version Read Point Write Point
Read / Write bool 1.00 API Variable API Variable
Description
Gets or sets the barcode acceptance feature of the device.
IsOpen
Access Type Version Read Point Write Point
Read Only bool 1.00 API Variable N/A
Description
Gets the value indicating whether or not the communications are active. Active communications
means the SCR object either currently communicating with the device or attempting to
communicate.
If the device loses communications during operations (DeviceState ==
eDeviceState.DISCONNECTED) the value will still be true because the API will continue to send
messages until a Close operation is requested.
TransportStatus
Access Type Version Read Point Write Point
Read Only eTransportStatus 1.00 IsOpen == true N/A
Description
Gets the status of the transport system. Any detected changes to this property will be reported
through the OnTransportStatusChanged event. The recommended handling of status changes is
to process them in the associated event handler.
Returns
eTransportStatus.OPENED if the device's transport system or open or the vault module is
removed. The transport system must be closed before the system can enter normal operations.
eTransportStatus.CLOSED if the device's transport system is closed.
CanDispenseValue
Parameters Return Version When Usable
double value bool 1.00 DeviceState in { IDLE, HOST_DISABLED }
Description
Determines if the given value can be dispensed.
The algorithm will account for different denom levels. Meaning if the device only have $5 notes
on the recycler, the function will still return false for a request of $3 is made even though the
total value on the recycler is greater than the requested amount.
This function does not support multi-variant currencies and will always return false when
configured with more than one currency code.
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED }
InvalidMessageException: If there is an unexpected comms loss.
ClearPerformanceAudit
Parameters Return Version When Usable
<none> void 1.00 DeviceState in { IDLE, HOST_DISABLED,
POWERING_UP, DISABLED}
Description
Resets all of the counts under the performance audit category. Will not affect lifetime audit.
If acknowledged, a delayed response will be posted back at a later time in the form of an event -
usually only a second or two. The event will contain a value as to whether or not the request
was successful. The delay was necessary because of the time consuming nature of the memory
requests. The device will continue to operate as normal during the short delay. The post back
event should return true in all cases. If the event ever reports false, this could mean there is a
problem with the memory of the device.
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED,
POWERING_UP, DISABLED }
NegativeAcknowledgementException: If the device is not able to honor the request. No
OnClearAuditCompleted event will be raised.
InvalidMessageException: If there is an unexpected comms loss.
Close
Parameters Return Version When Usable
<none> void 1.00 IsOpen == true
Description
Closes the SCR object and cleans up the resources. Polling thread is shutdown and the comm
port is released.
Exceptions
<none>
DisableAcceptance
Parameters Return Version When Usable
<none> void 1.00 IsOpen == true
Description
Turns off document acceptance. The device will enter the HOST_DISABLED state and will not
draw in any documents. The front LEDs (and bezel) will be updated to signify the new state.
The command is not immediate and can be delayed up to 200ms before taking effect. In the
event that a customer inserts a document prior to the device disabling, the document will be
auto-returned to the customer. No document events will be raised during this operation.
Exceptions
OperationNotAllowedException : If the connection is not open.
DispenseByValue
Parameters Return Version When Usable
double value void 1.00 DeviceState in { IDLE, HOST_DISABLED }
Description
Transfers banknotes from the recyclers to the customer. The number and denominations that
are dispensed depend upon the physical counts and the configured payout algorithm. If
acknowledged, the device will enter the DISPENSING state.
This operation can be cancelled with CancelNoteMovement.
Exceptions
NotImplementedException: This feature is not yet supported by the device but should be
available when the API is officially released.
EnableAcceptance
Parameters Return Version When Usable
<none> void 1.00 IsOpen == true
Description
Turns on document acceptance. The device should enter the IDLE state. The front LEDs (and
bezel) will be updated to signify the new state.
Exceptions
OperationNotAllowedException : If the connection is not open.
FlashDownload
Parameters Return Version When Usable
string filepath void 1.00 DeviceState in { HOST_DISABLED,
DISABLED, FAILURE, DOWNLOADING }
Description
Updates the firmware in the SCR device. The device will be placed in a special mode while the
firmware is being updated. Once complete, the device will reset and enter normal operations.
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED,
DOWNLOADING }
InvalidMessageException: If there is an unexpected comms loss.
FileNotFoundException: If the given path is a directory or the file is not present.
FileLoadException: If the given path is not a .bin file or the data is not consistent with a
download package (length must be divisible by 32).
FloatDownByCount
Parameters Return Version When Usable
int index, void 1.00 DeviceState in { IDLE, HOST_DISABLED }
int count
Description
Transfers banknotes from the recycler to the cashbox. If acknowledged, the device will enter the
FLOATING_DOWN state.
If the system state is UNKNOWN_DOCUMENTS_DETECTED then you must use
FloatDownUnknownDocuments.
This operation can be cancelled with CancelNoteMovement.
The index value is the same value that exists as the Index property of the SCRNoteTableEntry
class. This value can be retrieved from the SCR note table (see GetRecyclerNoteTable).
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED }
DocumentIndexOutOfRange: If the given index value does not exist in the note table.
InsufficientFundsException: If the device does not contain enough documents to dispense. Or if
the given count is negative.
NegativeAcknowledgementException: If the device has started a transaction just prior to
issuance of the command.
InvalidMessageException: If there is an unexpected comms loss.
FloatDownUnknownDocuments
Parameters Return Version When Usable
<none> void 1.00 DeviceState == { UNKNOWN_
DOCUMENTS_DETECTED }
Description
Transfers unknown documents from the recyclers to the cassette. All unknown documents are
moved regardless of their current recycler location.
This operation can be cancelled with CancelNoteMovement.
This is the recommended action when dealing with unknown documents.
Exceptions
OperationNotAllowedException : If the DeviceState != { UNKNOWN_DOCUMENTS_DETECTED }
GetBanknoteTable
Parameters Return Version When Usable
<none> Banknote[] 1.00 DeviceState in { IDLE, HOST_DISABLED }
Description
Gets the banknote table from the device.
As part of the initialization routine, the API queries the entire banknote table. This function is
useful to determine which banknotes have been enabled for acceptance through the
SetBanknoteEnables command.
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED }
GetDeviceCapabilities
Parameters Return Version When Usable
<none> Device 1.00 DeviceState in { IDLE, HOST_DISABLED,
Capabilities UNKNOWN_DOCUMENTS_DETECTED,
DISABLED, FAILURE }
Description
Gets the capabilities of the attached device.
As new features are added to the SCR system, the host can use this function to ensure desired
functionally is supported. The DeviceCapabilities class contains a list of properties that is
expected to grow over time.
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED,
UNKNOWN_DOCUMENTS_DETECTED, DISABLED, FAILURE }
GetRecyclerNoteTable
Parameters Return Version When Usable
<none> SCRNoteTable 1.00 DeviceState in { IDLE, HOST_DISABLED,
Entry[] ESCROWED }
Description
Gets the SCR note table configuration and counts from the device.
This differs from the banknote table because it is only associated with the recyclers. A maximum
of 7 banknotes are made available to be recycled. Availability is configured through STS and
does not mean 'Enabled'. The host system must choose the banknotes that will be enabled for
recycling by issuing the SetRecyclerNoteTableEnables command.
NOTE -A special case allows the host to query this value while at Escrow. Querying the SCR note
table at Escrow is not recommended during normal escrow situations.
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED, ESCROWED }
GetRecyclerStatus
Parameters Return Version When Usable
int index RecyclerStatus 1.00 DeviceState in { IDLE, HOST_DISABLED,
UNKNOWN_DOCUMENTS_DETECTED }
Description
Gets the physical recycler status for the given recycler index.
One-based indexing where '1' == top-most recycler.
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED,
UNKNOWN_DOCUMENTS_DETECTED }
NegativeAcknowledgementException: If the device entered the disabled state just prior to
issuance of the command.
InvalidMessageException: If there is an unexpected comms loss.
GetSystemLifetimeAudit
Parameters Return Version When Usable
<none> SCRLifetime 1.00 DeviceState in { IDLE, HOST_DISABLED,
Audit POWERING_UP, DISABLED }
Description
Gets the device's system lifetime audit data.
Unlike the performance audit data, the lifetime data cannot be cleared.
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED,
POWERING_UP, DISABLED }
InvalidMessageException: If there is an unexpected comms loss.
GetSystemNoteTableAudit
Parameters Return Version When Usable
<none> NoteTableAudit 1.00 DeviceState in { IDLE, HOST_DISABLED,
POWERING_UP, DISABLED }
Description
Gets the device's full note table audit data.
This note table is considered part of the 'performance' data so issuing the
ClearPerformanceAudit will also clear these values.
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED,
POWERING_UP, DISABLED }
InvalidMessageException: If there is an unexpected comms loss.
GetVariantName
Parameters Return Version When Usable
<none> string 1.00 DeviceState in { IDLE, HOST_DISABLED,
POWERING_UP, DISABLED}
Description
Gets the ISO code list for the installed variant.
In the event that multiple currencies are defined in the variant, the returned name will contain
an underscore delimited list.
Example: "USD_CAD".
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED,
POWERING_UP, DISABLED }
InvalidMessageException: If there is an unexpected comms loss.
GetVariantPartNumber
Parameters Return Version When Usable
<none> string 1.00 DeviceState in { IDLE, HOST_DISABLED,
POWERING_UP, DISABLED}
Description
Gets the CPI specific part number of the variant.
The return value if is a nine digit string that can be parsed as follows: first 6 digits are a
'component' identifier and should remain the same over time the remaining 3 digits specify the
version and will change as new releases are made available.
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED,
POWERING_UP, DISABLED }
InvalidMessageException: If there is an unexpected comms loss.
Open (overloaded)
Parameters Return Version When Usable
string portname, void 1.00 IsOpen == false
ePowerUpPolicy
powerUpPolicy
Description
Overloaded function that connects to the SCR device. Must be called before any other
operations are supported.
Exceptions
<none>
ReturnDocument
Parameters Return Version When Usable
<none> void 1.00 DeviceState == { ESCROWED }
Description
Returns a currently escrowed document back to the customer. Command can only be issued if
the device state == ESCROWED.
After the return command is issued, the host can expect to receive eDocumentEvent.RETURNED
followed by eDocumentEvent.RETRIEVED.
Exceptions
OperationNotAllowedException : If the DeviceState != ESCROWED.
InvalidMessageException: If there is an unexpected comms loss.
SetBanknoteEnables
Parameters Return Version When Usable
int[] noteTableIndices void 1.00 DeviceState in { IDLE, HOST_DISABLED }
Description
Sets the banknote enables value. The provided noteTableIndices will contain all banknotes that
should be enabled. By default, the system will initialize ALL banknotes to 'Enabled'.
The noteTableIndices is built by first querying the banknote table (see GetBanknoteTable) and
selecting the indices to be enabled. Since all banknotes are defaulted to enabled upon
initialization, the host must reconfigure the table if the Device State ever reports
DISCONNECTED.
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED }
DocumentIndexOutOfRange: If one of the provided indicies does not exist in the note table.
InvalidMessageException: If there is an unexpected comms loss.
SetEscrowTimeout
Parameters Return Version When Usable
int banknoteTimeout, void 1.00 DeviceState in { IDLE, HOST_DISABLED }
int barcodeTimeout
Description
Sets the period of time the device will wait for a host decision for an escrowed document. If the
time exceeds the configured value, the device will auto-return the document.
The parameter time is in seconds.
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED }
InvalidMessageException: If there is an unexpected comms loss.
StackDocument
Parameters Return Version When Usable
<none> void 1.00 DeviceState == { ESCROWED }
Description
Stacks a currently escrowed document. The device will stack the document to the recycler if
able, otherwise the document will be routed to the cassette. Command can only be issued if the
device state == ESCROWED.
Document will be placed on a recycler only if the banknote is enabled for recycling and the
recycler is not full. Otherwise it will be stacked in the cassette.
After the stack command is issued, the host can expect to receive eDocumentEvent.STACKED.
Exceptions
OperationNotAllowedException : If the DeviceState != ESCROWED.
InvalidMessageException: If there is an unexpected comms loss.
StackDocumentToCassette
Parameters Return Version When Usable
<none> void 1.00 DeviceState == { ESCROWED }
Description
Stacks a currently escrowed document to the cassette. The document will not be recycled even
if the system is capable of recycling the document. Command can only be issued if the device
state == ESCROWED.
After the stack command is issued, the host can expect to receive eDocumentEvent.STACKED.
Exceptions
OperationNotAllowedException : If the DeviceState != ESCROWED.
InvalidMessageException: If there is an unexpected comms loss.
StackDocumentToRecycler
Parameters Return Version When Usable
<none> void 1.00 DeviceState == { ESCROWED }
Description
Stacks a currently escrowed document to the recycler system. The host must verify the
document can be recycled prior to issuing this command. Command can only be issued if the
device state == ESCROWED.
After the stack command is issued, the host can expect to receive eDocumentEvent.STACKED.
The recommended way to recycle a document is to use StackDocument.
Exceptions
OperationNotAllowedException : If the DeviceState != ESCROWED.
NegativeAcknowledgementException: If the device entered the disabled state just prior to
issuance of the command.
InvalidMessageException: If there is an unexpected comms loss.
Events
BoolResponse
EventArgs CassetteStatus
EventArgs
DeviceState
EventArgs DocumentStatus
EventArgs
Download
Progress MissingNotes
EventArgs EventArgs
TransportStatus
EventArgs
3.4.1 BoolResponseEventArgs
Simple event arguments implementation that supports the reporting of a boolean property "Value". The
meaning of the value is dependent on the event in which this is raised.
Used by the OnClearAuditCompleted event, this event argument represents the result of the clear audit
request. A true value means the performance audit has been successfully reset.
3.4.1.1 Properties
Property Type Overview
Value bool Gets the specified boolean value. The true meaning lies
with the raising event.
3.4.2 CassetteStatusEventArgs
Event arguments implementation that reports the status of the cassette.
3.4.2.1 Properties
Property Type Overview
Status eCassetteStatus Gets the current status of the cassette.
3.4.3.1 Properties
Property Type Overview
Status eCassetteStatus Gets the current status of the cassette.
3.4.4 DeviceStateEventArgs
Event arguments implementation that reports the device system state changes.
3.4.4.1 Properties
Property Type Overview
State eDeviceState Gets the value of the device's state.
3.4.5 DocumentStatusEventArgs
Event arguments implementation that reports document related events. Two properties are available
that provide details on the document object and the type of action that triggered the event.
3.4.5.1 Properties
Property Type Overview
Destination eSessionType Gets any routing information for this document
The routing information is used to determine where a
document was stacked (either to the recycler or the
cassette). When not applicable, the value will be
eSessionType.NO_MOVEMENT_RECORD.
Document IDocument Gets the document that applies to this event.
Event eDocumentEvent Gets the event indicating the new status of the given
Document.
3.4.6 DownloadProgressEventArgs
Event arguments implementation that reports the status of the flash download progress.
3.4.6.1 Properties
Property Type Overview
DownloadStatus eDownloadStatus Gets the current status of the download process. The
process is complete when the value reports either
FAILED or SUCCESSFUL.
PacketsComplete int Gets the number of download packets that have been
successfully flashed to the device.
PercentComplete float Gets a decimal representation of the percent complete.
(ex. .5 == 50%).
TotalPackets int Gets the total number of packets that make up the flash
download. This value will not change as the progress is
updated.
3.4.7.1 Properties
Property Type Overview
DocumentEntries DocumentReportEntry[] Gets an array of document report entries that
contain the missing document descriptions.
TotalDocumentsMissing int Gets a count of the total missing documents.
TotalValueMissing double Gets the total value of all of the missing
documents. Will report '-1' if the system is
configured with multiple variants
3.4.8 TransportStatusEventArgs
Event arguments implementation that reports the status of the transport module.
3.4.8.1 Properties
Property Type Overview
Status eTransportStatus Gets the value of the transport module's status.
3.5.1.1 Properties
Property Type Overview
ValueString string Outputs a human readable representation of the document.
3.5.2.1 Constants
Constant Type Overview
INVALID_INDEX Int Represents an invalid index value (0). This index value is reported
when the proper index value cannot be determined.
3.5.2.2 Properties
Property Type Overview
Index int The unique index identifier. This is the value that should be used
when enabling/disabled a banknote through SetBanknoteEnables.
IsEnabled bool Gets a value indicating whether or not the banknote is enabled
and will currently be accepted by the device.
IsRecyclingEnabled bool Gets a value indicating whether or not the banknote can be
recycled. This value will only apply to "escrowed/stacked"
documents and will report false in all other situations.
IsValid bool Gets a value indicating whether or not the note entry is valid.
Invalid entries should not be used for configuration.
ISO string Gets the 3 digit country code identifier of the banknote.
Value double Gets the currency value of the banknote.
ValueString string Gets the combination of the ISO and Value properties to generate
a unique value identifier. If no valid entry exists, will return
"NULL".
VersionCodes string Gets the special 4 character revision code of the banknote.
Example "AABD"
3.5.3.1 Properties
Property Type Overview
ValueString string Always "No Value"
3.5.4.1 Properties
Property Type Overview
BarcodeValue string Gets the identifier string for the barcode Value may range in
length from 16-24 characters in most cases. Most common length
is 18-characters.
Example: "123451234512345123"
ValueString string Gets the same value as BarcodeValue
3.5.5.1 Constants
Constant Type Overview
INVALID_INDEX Int Represents an invalid index value (0). This index value is reported
when the proper index value cannot be determined.
3.5.5.2 Properties
All properties are read-only.
3.5.6.1 Properties
All properties are read-only and some are only populated under certain circumstances.
NoteTableAudit
SCRPerformance
Audit
3.6.1 SCRLifetimeAudit
The Audit class contains detailed information on all of the performance data points on the SCR device
over the life of the system. These counters cannot be reset by the ClearPerformanceAudit command
unlike the NoteTableAudit and SCRPerformanceAuditdata structures.
3.6.1.1 Properties
Property Type Overview
LastAuditClearedDate date The date that the lifetime audit data was cleared. The time
stamp is only accurate to the hour so the minutes and
seconds are always set to 0.
LastAuditRetrievedDate date The date that audit was last retrieved. Only updates when
the audit is retrieved with STS, not through this API. The
time stamp is only accurate to the hour so the minutes and
seconds are always set to 0.
LastCalibrationDate date The date that the last calibration was performed.
LastDownloadDate date The date that the last firmware download was performed.
TotalBarcodesDecoded int The number of barcodes that have reached the escrow
position and were properly read by the system.
TotalBarcodesStacked int The number of barcodes that have been stacked to the
system.
<Table Continues on Next Page>
Recognized - Banknotes the device was able identify. Confirmation comes next. (ex. The device
knows the document is a '10 USD' but has not yet checked the security features).
Validated - Banknotes the device has confirmed valid. These banknotes can be assumed to have
passed Recognition. (ex. The device knows the document is a '10 USD' and it has passed the
security tests).
Stacked - Banknotes the device has validated and stored in the system. These banknotes can be
assumed to have passed Recognition and Validation. (ex. The device has verified the '10 USD'
and stored it in the system).
3.6.2.1 Properties
Property Type Overview
MaximumNoteCount int Gets the maximum number of banknotes that is supported by this
audit structure. All arrays retrieved from this object will be this
length.
3.6.2.2 Methods
Method Parameter Return Overview
GetRecognizedData eOrientation Int[] Gets the array of data for the given orientation
orientation for the recognized structure.
GetRecognizedData int Int[] Gets the array of data for the given orientation
orientationValue value for the recognized structure. Value must
be between 0 and 3 inclusive.
GetStackedData eOrientation Int[] Gets the array of data for the given orientation
orientation for the stacked structure.
GetStackedData int Int[] Gets the array of data for the given orientation
orientationValue value for the stacked structure. Value must be
between 0 and 3 inclusive.
GetValidatedData eOrientation Int[] Gets the array of data for the given orientation
orientation for the validated structure.
GetValidatedData int Int[] Gets the array of data for the given orientation
orientationValue value for the validated structure. Value must be
between 0 and 3 inclusive.
3.6.3.1 Properties
Property Type Overview
LastOutOfOrderCondition int The reason for the last out of order condition.
LastOutOfServiceCondition int The reason for the last out of service condition.
TotalBarcodesDecoded int The number of barcodes that have reached the escrow
position and were properly read by the system.
TotalCalibrationAttempts int The number of times the calibration routine has been
attempted.
TotalCassetteFullEvents int The number of times the system has reported cassette full.
TotalCassetteRemovedEvents int The number of times the cassette was removed from the
system.
TotalDispenseSessions int The number of dispense sessions. Multiple documents can
be dispensed during a session so this value can vary from
TotalNotesDispensed.
TotalDocumentDisabled int The number of banknotes that have been rejected because
Rejections their denomination has been inhibited by the host.
TotalDocsExceedingMaxLength int The number of documents that were inserted but were too
long for the system to process.
TotalDocsExceedingMinLength int The number of documents that were inserted but were too
short for the system to process.
TotalDocsFailedToReachEscrow int The number of documents that were unable to reach the
escrow position. This counter does not include
TotalDocsExceedingMaxLength or
TotalDocsExceedingMinLength as this is a special situation
where the document has most likely been stuck or
otherwise prevented from being inserted.
TotalDocsInsertedWhile int The number of attempts to feed a document while the
DisabledRejections system is disabled. The system will not attempt to draw in
the document but the event will still be audited.
TotalDocsInsertedWhile int The number of attempts to feed a document while the
RecyclerBusyRejections system is performing another transaction involving the
recycler system.
TotalDocsReached int The number of documents that have reached the escrow
EscrowPosition position successfully.
TotalDownloadAttempts int The number of times the flash download routine has been
attempted.
TotalEscrowTimeoutRejections int The number of documents that have been rejected because
the system did not receive an actionable command from
the host (either to stack or return the document). The
escrow timeout feature may have to be enabled on most
systems.
<Table Continues on Next Page>
SCR
Device
Capabilities
LastCash
Movement
Summary
RecyclerStatus
3.7.1 DeviceCapabilities
The DeviceCapabilities class provides details about the features that are supported by the attached
device. Each device capability entry is dependent on the hardware and/or software of the system. As
new capabilities are created and implemented, the property list is expected to grow with new releases
of the API.
3.7.1.1 Properties
Property Type Overview
IsBarcodeAcceptance bool Returns true if the device is capable of processing barcoded
Supported documents.
IsMultiNote bool Returns true if the device supports multi-note escrow. If so,
EscrowSupported additional functions are supported
MaxNumberOf int Gets the number of unique denominations that can be recycled
Recyclable by the system. When using SetRecyclerNoteTableEnables, up to
Denominations this many indices can be specified.
3.7.2.1 Properties
Property Type Overview
DocumentEntries DocumentReportEntry[] Gets an array of document report entries that
contain the document movement descriptions.
SessionType eSessionType Gets the type of operation to understand the
direction of the movement; either to customer or
cassette.
TerminationCondition eTerminationCondition Gets the reason for completing the note movement
operation. One successful state {
MOVE_SUCCESSFUL } and the rest of the conditions
represent exceptional conditions.
TotalDocumentsMoved int Gets a count of the total documents moved. This
includes unknown documents.
TotalValueMoved double Gets the total value of all of the documents moved.
Will report '-1' if any unknown documents are
moved or the system is configured with multiple
variants.
UnknownDocument int Gets the number of unknown documents that were
MovedCount moved.
3.7.3.1 Properties
Property Type Overview
Index1Status SCRNoteTableEntry Gets the note table entry for the first index
Index2Status SCRNoteTableEntry Gets the note table entry for the second index
Index3Status SCRNoteTableEntry Gets the note table entry for the third index
Index4Status SCRNoteTableEntry Gets the note table entry for the fourth index
Index5Status SCRNoteTableEntry Gets the note table entry for the fifth index
Index6Status SCRNoteTableEntry Gets the note table entry for the sixth index
Index7Status SCRNoteTableEntry Gets the note table entry for the seventh index
IsFaultDetected bool Gets a value indicating whether or not the recycler is
operational.
IsUnitPresent bool Gets a value indicating whether or not the recycler exists
at the requested location.
IsUnknown bool Gets a value indicating whether or not the recycler
DocumentPresent currently contains unknown documents. These
documents must be handled before the system can
become operational (see
SCR.FloatDownUnknownDocuments).
Document
IndexOutOfRange Insufficient Funds
Exception Exception
InvalidMessage Negative
Exception Acknowledgement
Exception
Operation
NotAllowed
Exception
Exception Overview
DocumentIndexOutOfRangeException Subclass of Exception that indicates when the host has
addressed a document index outside of the allowable bounds.
InsufficientFundsException Subclass of Exception that indicates when the host has
requested document movements that cannot be supported due
to a lack of proper banknotes.
InvalidMessageException Subclass of Exception that indicates when a poorly structured
message is created or unexpected data is received such as a null
response.
NegativeAcknowledgementException Subclass of Exception that indicates when the formatted data is
correct but the device has declined acceptance of the
command.
OperationNotAllowedException Subclass of Exception that indicates when the requested
operation is not allowed due to an invalid device state.
3.8.1 DocumentIndexOutOfRangeException
Subclass of Exception that indicates when the host has addressed a document index outside of the
allowable bounds. This exception is raised primarily when attempting to DispenseByCount or
FloatDownByCount but can occur for some other index related requests.
This event contains no properties.
3.8.2.1 Properties
Property Type Overview
AvailableValue double Gets the maximum banknote value that can be moved for the
requested operation.
RequestedValue double Gets the original requested banknote value that failed.
3.8.3 InvalidMessageException
Subclass of Exception that indicates when a poorly structured message is created or unexpected data is
received such as a null response.
3.8.3.1 Properties
Property Type Overview
ByteArray byte[] Gets the poorly structured message data.
Will return a zero length array if not applicable.
3.8.4 NegativeAcknowledgementException
Subclass of Exception that indicates when the formatted data is correct but the device has declined
acceptance of the command.
The most likely cause of the exception is that the device is in a state that cannot accept the request. The
host should attempt again at a later time. In some conditions, the device may not support the feature at
all.
3.8.4.1 Properties
Property Type Overview
Operation string Gets the string representation of the operation that resulted in
the Negative Acknowledgement.
3.8.5 OperationNotAllowedException
Subclass of Exception that indicates when the requested operation is not allowed due to an invalid
device state.
3.8.5.1 Properties
Property Type Overview
DeviceState eDeviceState Gets the device state at the time the operation was requested.
Operation string Gets the name of the operation that failed.
Banknote List - A full list of up to 120+ banknotes separated by series. Each denomination can
contain multiple entries representing each series of the banknote (see image below for an
example of the different series of 5 EUR banknotes). This indexing starts at 1 for the first
banknote and increments for each entry (series and denomination).
SCR Note Table - A maximum of seven banknote values that can be available for recycling. This
list will be used during the run-time configuration to configure the recycler modules with the
desired banknotes. This index also starts at 1 and increments for each enabled banknote value
(series are grouped into a single value).
These lists will be further explored as the actual configuration process is detailed below.
Both entries have the SAME value (5) and therefore the same value index when referring to a
list that uses value indexing.
Each entry comes from a DIFFERENT series and therefore will have a different index value when
used in a series aware list.
Inhibiting a banknote
from recycling will force
that series of note to only
allow routing to the
cassette no matter the
SCR note table
configuration.
Inhibiting a value
(Disabled) has the similar
effect to inhibiting all
banknotes of that series
meaning they must all be
routed to the cassette.
5.1.1 Constructor
The first step is to construct an SCR object. The SCR class
defines two types of constructors; one with logging enabled NOTE: The logging feature is a very
and other without. Logging is a useful tool for identifying and useful tool that should be enabled
fixing integration issues. Specify a root path (folder) and the during development to help identify
SCR object will create and organize all logs within that
and debug integration issues.
directory.
5.1.3 Open
The final step to establishing communications is to open the connection. The open function is an
overloaded function call that takes a serial port identifier and an optional power up policy as
parameters.
RETURNED
STACKED
Document object - Same object that was reported during the escrow event.
Destination - Where the document was stacked (Cassette or Recycler).
The Retrieved event can be used to inform the host when the user has removed the document. A
possible use case could be to stop displaying a message to the customer.
SCR.DisabledReason
Property Value Corrective Action
CASSETTE_FULL Remove the cassette and replace it with an empty one.
CASSETTE_MISSING Insert an empty cassette.
JAMMED Clear the jammed document. The location of the jam is not known
through the protocol but the MMI blink pattern will assist the
operator in locating and correcting the jam. After the jam is cleared,
ensure the system is closed up properly.
TRANSPORT_OPENED Close the system by ensuring the recycler housing is latched and the
vault module is installed.
INITIALIZATION No action required, the device is attempting to leave the out of
service state.
All of the tests outlined below are non-destructive and will not significantly impact the future
performance of the device.
Unknown documents can only occur after the device powers on or recovers from an out of service
condition.
Missing notes can only occur after the device powers on or recovers from an out of service condition.