Sunteți pe pagina 1din 72

MEI SCR Integration Toolkit

API Specification and Best Practices

COPYRIGHT © 2014 MEI, Inc. All Rights Reserved


The information contained herein is the property of MEI, Inc. and is not to be disclosed or
used without the prior written permission of MEI. This copyright extends to all media in
which this information may be preserved, including, but not limited to, magnetic storage,
punched cards, paper tape, computer printout, and visual display.

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

Revision 0.3 Page 2


3.5.2 Banknote : implements IDocument .................................................................................... 37
3.5.3 NoValueDocument: implements IDocument ...................................................................... 38
3.5.4 Barcode : implements IDocument ...................................................................................... 38
3.5.5 SCRNoteTableEntry ............................................................................................................. 39
3.6 Audit Classes ............................................................................................................................... 41
3.6.1 SCRLifetimeAudit ................................................................................................................ 41
3.6.2 NoteTableAudit ................................................................................................................... 43
3.6.3 SCRPerformanceAudit......................................................................................................... 44
3.7 Reporting Classes ........................................................................................................................ 47
3.7.1 DeviceCapabilities ............................................................................................................... 47
3.7.2 LastCashMovementSummary ............................................................................................. 48
3.7.3 RecyclerStatus ..................................................................................................................... 49
3.8 Custom Exceptions ...................................................................................................................... 50
3.8.1 DocumentIndexOutOfRangeException ............................................................................... 50
3.8.2 InsufficientFundsException ................................................................................................. 51
3.8.3 InvalidMessageException.................................................................................................... 51
3.8.4 NegativeAcknowledgementException ................................................................................ 51
3.8.5 OperationNotAllowedException ......................................................................................... 51
4 Understanding the SCR Integration Toolkit Concepts ........................................................................ 52
4.1 Understanding the Indexing System ........................................................................................... 52
4.1.1 Static Configuration ............................................................................................................ 53
4.1.2 Run Time Configuration ...................................................................................................... 54
4.2 Processing the Log File ................................................................................................................ 55
4.2.1 Example Log File System ..................................................................................................... 55
4.2.2 Example Log Excerpt With Key Points................................................................................. 55
5 Using the SCR Integration Toolkit ....................................................................................................... 56
5.1 Connecting to the System ........................................................................................................... 56
5.1.1 Constructor ......................................................................................................................... 56
5.1.2 Event Listening .................................................................................................................... 56
5.1.3 Open .................................................................................................................................... 56
5.2 Configuring the System ............................................................................................................... 57
5.2.1 Using Device Capabilities .................................................................................................... 57

Revision 0.3 Page 3


5.2.2 Banknote Table ................................................................................................................... 57
5.2.3 SCR Note Table .................................................................................................................... 57
5.3 Document Handling .................................................................................................................... 58
5.3.1 Document Insertion ............................................................................................................ 58
5.3.2 Dispensing / Floating Down Documents ............................................................................. 60
5.4 Out of Service Conditions ........................................................................................................... 62
5.5 Exceptional Scenarios ................................................................................................................. 63
5.5.1 Unknown Documents.......................................................................................................... 63
5.5.2 Missing Notes Reported ...................................................................................................... 63
6 How to Test the System ...................................................................................................................... 64
6.1 Unknown Documents ................................................................................................................. 65
6.2 Missing Notes .............................................................................................................................. 68
6.3 Jam .............................................................................................................................................. 71
6.4 Failure ......................................................................................................................................... 72

Revision 0.3 Page 4


1 Change History
Issue Date Description
0.1 06/27/2014 Initial Revision
0.2 07/25/2014 Added details on Flash Download Support
0.3 09/09/2013 Added reference to "DocumentReportEntry" and update all
affected sections.

Revision 0.3 Page 5


2 Introduction

2.1 Acronyms and Definitions


Keyword Meaning / Context
API Application Programming Interface. Refers to this software library. (see also
Toolkit)
Cashflow STS CPI software application used to configure the SCR for initial use.
EBDS Enhanced Bi-Directional Serial – This is the MEI Specific protocol used to
communicate with the SCR. Most of this complexity is abstracted away from
the user through the API.
Device Refers to the SCR unit.
Document General description for one of the following types of items accepted by a
bill acceptor (Banknote/Bill, Barcode)
Host Refers to the hardware and software using the SCR API or communicating
with the SCR unit.
Inventory An inventoried note refers to a valid banknote that is part of the recycler
system. This document is available for dispense and float down operations.
Note Refers to a Banknote. Also known as a Bill.
Toolkit Refers to this library, (see also API).

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.

2.3 Referenced Documents


The following documents may be referenced for more information on their subject matter.

 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.

Revision 0.3 Page 6


2.4 Requirements
2.4.1 Products
The SCR API is designed specifically for the SCR device. No other CPI devices are supported with this
library.

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)

2.5 COM Interoperability


The SCR Integration Toolkit is fully supported in a COM Callable Wrapper environment. All of the
functionality has been exposed with minimal changes.

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

Revision 0.3 Page 7


3 SCR Toolkit
The SCR Toolkit provides for significant savings of time and effort for coding, debugging and deploying
applications that require the acceptance and handling of cash. The toolkit is based on the
Properties/Methods/Events model of programming used in objected oriented systems. The following
section will outline the specific classes, properties and methods.

3.1 Namespace architecture


The toolkit is comprised of several namespaces. The most important being the CPI.SCR namespace.

Name Space View


CPI - Main entry namespace - Contains no classes
CPI
SCR - Core namespace for a bulk of the operations. This
namespace contains the "SCR" class that is used to
interact with the device as well as the document and
reporting classes. This namespace also contains all of the SCR
enumerations that are used throughout the toolkit.

Audit - Contains support classes for retrieving audit data


from the device. Audit
Events - Contains support classes for all of the events.

Exceptions - Contains support classes for the custom Events


exceptions specific to the SCR device.

Exceptions

Revision 0.3 Page 8


3.2 Enumerations
Enumerations are used heavily to describe device state and other related statuses. The following is a
comprehensive list of all the enumerations used throughout the API.

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.

Revision 0.3 Page 9


3.2.2 eDisabledReason
Type Overview
CASSETTE_FULL The cassette has reached the maximum capacity. The operator should
replace the cassette with an empty one.
CASSETTE_REMOVED The cassette has been removed from the system. The operator should
insert an empty cassette.
INITIALIZING The device is in the process of leaving the out of service state and
operations should resume shortly. No operator action is required.
JAMMED A document is jammed somewhere in the system. The operator will
need to open the system and remove the document. Once corrected,
the device will leave the disabled state
NOT_DISABLED The device is not currently disabled. This value will be returned if the
device is not currently in Disabled state.
TRANSPORT_OPENED The front panel providing access to the recycler modules is currently
opened. The operator should ensure all front latches are secured
properly.

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).

Revision 0.3 Page 10


3.2.4 eDownloadStatus
The download status enumeration is used by the DownloadProgressEventArgs to update the host
system on the progress of a flash download. The flash download process is terminated when either
FAILED or SUCCESSFUL is reported.

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.

Revision 0.3 Page 11


3.2.8 eTerminationCondtion
Type Overview
CHEAT_DETECTED The document movement was halted by the device due to a suspected
fraud attempt.
CANCELLED_BY_HOST The document movement was cancelled by the host via the
CancelNoteMovement command.
INSUFFICIENT_INVENTORY The number of requested documents exceeded the amount of
inventory. For example, if there is only $2 in inventory and the host
requests a $4 dispense.
INSUFFICIENT_STORAGE The device was unable to store the document in the final destination.
Either the cassette (float down) or the recycler (dispense) is full.
INVENTORY_ERROR The device encountered a critical error during the last request that
resulted in a document being lost. The document is most likely jammed
in such a way that the device was unable to accurately detect its
location.
MOVE_IN_PROGRESS A note movement is currently in progress. Please re-query the status at
a later time. This value should never be returned by the API as it does
not allow GetLastCashMovementSummary to be queried during note
movments.
MOVE_SUCCESSFUL All of the requested documents have been moved successfully.
NO_DOCUMENTS_TO_MOVE A request was made to move 0 documents. Differs from
INSUFFICIENT_INVENTORY in that the request was technically valid, but
unnecessary.
NOTE_JAM One of the documents jammed during the note movement request.
POWER_FAILED The system encountered a power loss during the last requested
document move.
SYSTEM_OUT_OF_SERVICE The device bill path was interfered with during the note movement
request. Either the cassette was removed or the transport path was
opened.

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.

Revision 0.3 Page 12


3.3 SCR API Core Class
Name Space View (Green == Class)
The SCR API library contains one main class and a set of
support classes CPI

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>

Revision 0.3 Page 13


<Continuation from Previous Page>
Event Name Overview
OnDeviceStateChanged This event is raised when the device has changed states. The device will
transition through several states when processing a document or
performing dispense/float down operations. Some states may be
accompanied by an OnDocumentStatusEvent.
Recommended Action: Please review the eDeviceState structure to
determine the best course of action for each state.
OnDocumentStatusEvent This event is raised when a document in progress has reached an
important stage in its lifecycle. The device may be waiting for input from
the host { escrow } or simply reporting when credit can be adjusted {
stacked, dispensed }.
Recommended Action: Please review the eDocumentEvent structure to
determine the best course of action for each event.
OnDownloadProgressEvent This event is raised during the flash download process. While the
download is underway, routine progress events will be raised with one
final progress event raised at the end.
Recommended Action: Most events will be informational only, providing
the percentage complete so no action is required. Additionally, no action
is required if the download was successful as the device will auto reset
and resume normal operations. Only if the DownloadStatus property is
FAILED will the operator need to intervene and correct the situation.
OnMissingNotesReported This event is raised when the system is recovering from an out of service
condition and has detected that one or more previously inventoried
documents are no longer present. This is a rare situation but can occur
after handling unknown documents caused by a jam or other severe
condition.
Recommended Action: Device will be ready to enter service again after
issuing the missing note report (assuming other exception conditions do
not exist). The host should process the report and adjust any locally
managed document counts as needed. This situation should be logged
and reported to prevent the situation from occurring in the future.
OnTransportOpened This event is a slight variation of the OnTransportStatusChanged event. It
WhilePoweredOff is raised when the device has detected that the transport system was
opened while powered off.
Recommended Action: The host should log this situation but it is
informative only and does not require any intervention from the host.
OnTransportStatusChanged This event is raised when the transport status changes due to operator
intervention.
Recommended Action: Operator should close the system up and ensure
the vault module is inserted.

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.

Revision 0.3 Page 14


3.3.1.2 Properties
Property Overview
ApiVersion Gets the CPI part number of this API.
CassetteStatus Gets the status of the cassette system. Any detected changes to this
property will be reported through the OnCassetteStatusChanged event.
CommPort Gets the comm port that the SCR object is currently using. If the
connection is not open, the empty string is returned.
DeviceState Gets the current operational state of the device.
DisabledReason Gets the out of service reason for the device.
IsBarcodeAcceptanceEnabled Gets or sets the barcode acceptance feature of the device. The device
capabilities must define IsBarcodeAcceptanceSupported to be true for
this property to have any effect on the device.
IsOpen 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.
PowerUpPolicy Gets the configured power up policy. This value can only be set during
the Open function call.
TransportStatus Gets the status of the transport system. Any detected changes to this
property will be reported through the OnTransportStatusChanged event.

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.

Revision 0.3 Page 15


CommPort
Access Type Version Read Point Write Point
Read Only string 1.00 IsOpen == true N/A
Description
Gets the comm port that the SCR object is currently using. If the connection is not open, the
empty string is returned.

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.

Revision 0.3 Page 16


PowerUpPolicy
Access Type Version Read Point Write Point
Read Only ePowerUpPolicy 1.00 IsOpen == true N/A
Description
Gets the configured power up policy. This value can only be set during the Open function call.
The power up policy defines the type of actions the device will take in the event that it loses
power while processing a document. Different industries may require different handling for
some situations. If in doubt, ePowerUpPolicy.R is a good default to select.

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.

Revision 0.3 Page 17


3.3.1.3 Methods
Method Overview
CancelNoteMovement Cancels any active dispense or float down operation.
CanDispenseValue Determines if the given value can be dispensed.
ClearPerformanceAudit Resets all of the counts under the performance audit category. Will
not affect lifetime audit.
ClearRecyclerNoteTable Clears the device's recycler note configuration.
Close Closes the SCR object and cleans up the resources. Polling thread is
shutdown and the comm port is released.
DisableAcceptance 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.
DispenseByCount Transfers banknotes from one of the recyclers to the customer. If
acknowledged, the device will enter the DISPENSING state.
DispenseByValue 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.
Not Yet Implemented
DispenseUnknownDocuments Transfers unknown documents from the recyclers to the user. All
unknown documents are moved regardless of their current recycler
location.
EnableAcceptance Turns on document acceptance. The device should enter the IDLE
state. The front LEDs (and bezel) will be updated to signify the new
state.
FlashDownload 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.
FloatDownAll Transfers all banknotes from the recyclers to the cashbox. If
acknowledged, the device will enter the FLOATING_DOWN state.
FloatDownByCount Transfers banknotes from the recycler to the cashbox. If
acknowledged, the device will enter the FLOATING_DOWN state.
FloatDownUnknownDocuments Transfers unknown documents from the recyclers to the cassette. All
unknown documents are moved regardless of their current recycler
location.
GetApplicationPartNumber Gets the CPI specific part number of the application.
GetBanknoteTable Gets the banknote table from the device.
GetDeviceCapabilities Gets the capabilities of the attached device.
GetLastCashMovementSummary Gets a summary object for the last banknote movement operation.
GetRecyclerNoteTable Gets the SCR note table configuration and counts from the device.
GetRecyclerStatus Gets the physical recycler status for the given recycler index.
GetSerialNumber Gets the CPI specific serial number for the SCR head unit.
<Table Continues on Next Page>

Revision 0.3 Page 18


<Continuation from Previous Page>
Method Overview
GetSystemLifetimeAudit Gets the device's system lifetime audit data.
GetSystemNoteTableAudit Gets the device's full note table audit data.
GetSystemPerformanceAudit Gets the device's system performance audit data.
GetVariantName Gets the ISO code list for the installed variant.
GetVariantPartNumber Gets the CPI specific part number of the variant.
Open Overloaded function that connects to the SCR device. Must be called
before any other operations are supported.
ReturnDocument Returns a currently escrowed document back to the customer.
Command can only be issued if the device state == ESCROWED.
SendRawMessage Sends the specified data to the device and returns the full response.
SetBanknoteEnables 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'.
SetEscrowTimeout 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.
SetRecyclerNoteTableEnables Configures the SCR note table to recycle the given noteTableIndices
based on the SCRNoteTableEntry.Index property.
StackDocument 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.
StackDocumentToCassette 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.
StackDocumentToEscrow Not Yet Implemented
StackDocumentToRecycler 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.

Revision 0.3 Page 19


CancelNoteMovement
Parameters Return Version When Usable
<none> void 1.00 DeviceState in { IDLE, HOST_DISABLED,
DISPENSING, FLOATING_DOWN }
Description
Stops the execution of any current dispense or float down operation. Any banknotes currently in
flight will finish their movement but no additional banknotes will be moved. This function will
not affect any normal Stack operation (from the escrow position).
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED, DISPENSING,
FLOATING_DOWN }
InvalidMessageException: If there is an unexpected comms loss.

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.

Revision 0.3 Page 20


ClearRecyclerNoteTable
Parameters Return Version When Usable
<none> void 1.00 DeviceState in { IDLE, HOST_DISABLED }
Description
Clears the device's recycler note configuration.
This has the same effect as setting the recycler enables (SetRecyclerNoteTableEnables) with an
array of zero elements.
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED }
NegativeAcknowledgementException: If the device is not able to honor the request. Either the
recycler still contains recycled documents that must be emptied prior to changing the
configuration or the device has started a transaction just prior to issuance of the command.
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.

Revision 0.3 Page 21


DispenseByCount
Parameters Return Version When Usable
int index, void 1.00 DeviceState in { IDLE, HOST_DISABLED }
int count
Description
Transfers banknotes from one of the recyclers to the customer. If acknowledged, the device will
enter the DISPENSING state.
Alternative to DispenseByValue in which more control is given to the host machine.
If the system state is UNKNOWN_DOCUMENTS_DETECTED then you must use
DispenseUnknownDocuments.
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.

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.

Revision 0.3 Page 22


DispenseUnknownDocuments
Parameters Return Version When Usable
<none> void 1.00 DeviceState == { UNKNOWN_
DOCUMENTS_DETECTED }
Description
Transfers unknown documents from the recyclers to the user. All unknown documents are
moved regardless of their current recycler location.
This operation can be cancelled with CancelNoteMovement.
NOTE - When dealing with unknown documents, the recommend course of action is to float
them all down using FloatDownUnknownDocuments.
Exceptions
OperationNotAllowedException : If the DeviceState != { UNKNOWN_DOCUMENTS_DETECTED }

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).

Revision 0.3 Page 23


FloatDownAll
Parameters Return Version When Usable
<none> void 1.00 DeviceState in { IDLE, HOST_DISABLED }
Description
Transfers all banknotes from the recyclers 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 prior floating down any other documents.
This operation can be cancelled with CancelNoteMovement.
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED }

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 }

Revision 0.3 Page 24


GetApplicationPartNumber
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 application.
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.

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 }

Revision 0.3 Page 25


GetLastCashMovementSummary
Parameters Return Version When Usable
<none> LastCashMove 1.00 DeviceState in { IDLE, HOST_DISABLED,
mentSummary UNKNOWN_DOCUMENTS_DETECTED,
DISABLED, FAILURE }
Description
Gets a summary object for the last banknote movement operation.
Only dispense or float down operations are reportable via this method.
The returned object contains detailed information on exactly what occurred during the last note
movment
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED,
UNKNOWN_DOCUMENTS_DETECTED, DISABLED, FAILURE }
InvalidMessageException: If there is an unexpected comms loss.

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.

Revision 0.3 Page 26


GetSerialNumber
Parameters Return Version When Usable
<none> string 1.00 DeviceState in { IDLE, HOST_DISABLED,
POWERING_UP, DISABLED}
Description
Gets the CPI specific serial number for the SCR head unit.
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED,
POWERING_UP, DISABLED }
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.

Revision 0.3 Page 27


GetSystemPerformanceAudit
Parameters Return Version When Usable
<none> SCRPerformance 1.00 DeviceState in { IDLE, HOST_DISABLED,
Audit POWERING_UP, DISABLED }
Description
Gets the device's system performance audit data.
Performance data can be reset by using the ClearPerformanceAudit command.
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.

Revision 0.3 Page 28


Open
Parameters Return Version When Usable
string portname void 1.00 IsOpen == false
Description
Overloaded function that connects to the SCR device. Must be called before any other
operations are supported.
This function will open the device with the default Power Up Policy of 'R'.
Exceptions
<none>

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.

Revision 0.3 Page 29


SendRawMessage
Parameters Return Version When Usable
byte[] message byte[] 1.00 IsOpen == true
Description
Sends the specified data to the device and returns the full response.
The given message should omit the 'STX', 'LEN', 'ETX', and 'CHK' bytes as these will be auto
generated prior to transmission. However, all byte values of the response will be returned to
the host.
Please refer to the EBDS Protocol Specification for details on how to parse an EBDS packet.
Not Yet Implemented
Exceptions
NotImplementedException: This feature is not yet supported by the device but should be
available when the API is officially released.

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.

Revision 0.3 Page 30


SetRecyclerNoteTableEnables
Parameters Return Version When Usable
int[] noteTableIndices void 1.00 DeviceState in { IDLE, HOST_DISABLED }
Description
Configures the SCR note table to recycle the given noteTableIndices based on the
SCRNoteTableEntry.Index property.
The proper index values must be retrieved from the SCR Note Table and not from the banknote
table as the index values may not align.
Exceptions
OperationNotAllowedException : If the DeviceState not in { IDLE, HOST_DISABLED }
NegativeAcknowledgementException: If the device is not able to honor the request. Possible
options are:
(1) Too many documents enabled for recycling.
(2) The recycler still contains recycled documents that must be emptied prior to changing the
configuration.
(3) The device started a transaction just prior to issuance of the command.
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.

Revision 0.3 Page 31


StackDocumentToEscrow
Parameters Return Version When Usable
<none> void 1.00 DeviceState == { ESCROWED }
Description
Not Yet Implemented
Exceptions
NotImplementedException: This feature is not yet supported by the device but should be
available when the API is officially released.
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.

Revision 0.3 Page 32


3.4 Event Arguments
Name Space View (Green == Class)
The event arguments are raised along with the associated
CPI
event. The SCR API defines six custom event arguments to
support the possible events.
SCR
All event argument properties are Read-Only.

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.

Revision 0.3 Page 33


3.4.3 CassetteStatusEventArgs
Event arguments implementation that reports the 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.

Revision 0.3 Page 34


3.4.7 MissingNotesEventArgs
The MissingNotesEventArgs contains details on missing banknotes that have been detected by the
device.
The missing note report is raised with the SCR.OnMissingNotesDetected event. Lost notes is a rare
situation that is usually preceded by unknown documents. When unknown documents are processed,
they were, in most cases, valid documents before they were classified as 'unknown' so the system must
report the missing documents once the inventory has been validated again.
The host can loop through each of the document report entries and view the MissingCount property to
determine the number of missing notes or use the TotalDocumentsMissing as a summary.

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.

Revision 0.3 Page 35


3.5 Document Classes
Name Space View (Green == Class)
The SCR API library contains several classes that are used
CPI
to control and report documents.

Document types include:


SCR
 Banknotes
 Barcodes
 Special "No Value" Documents.
Banknote

No Value documents tend to be used in very special


situations where a banknote's authenticity cannot be NoValue
guaranteed by the device. Document
(Example, if the system has been opened while processing
a document and that document is now being stacked).
Barcode

Two additional document classes are included in this


namespace:
SCRNoteTable
 SCRNoteTableEntry is used only for configuration Entry
purposes.
 DocumentReportEntry is used in a few of the
DocumentReport
reporting mechanisms to provide details on types Entry
and number of documents

3.5.1 IDocument : Interface


The IDocument is used as an interface by several different types of documents as show in the next
sections. This interface provides a single read-only property.

3.5.1.1 Properties
Property Type Overview
ValueString string Outputs a human readable representation of the document.

Revision 0.3 Page 36


3.5.2 Banknote : implements IDocument
The primary document class. The Banknote class serves two purposes. When a document is stacked or
escrowed, this value can be retrieved and analyzed. Secondly, the index is important for getting/setting
general bill enables.

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"

Revision 0.3 Page 37


3.5.3 NoValueDocument: implements IDocument
A very simple derivation of the IDocument class that represents an unknown document or a document
with no value.

3.5.3.1 Properties
Property Type Overview
ValueString string Always "No Value"

3.5.4 Barcode : implements IDocument


A type of IDocument that represents a barcode. Instead of ISO countries and Value, this class provides a
BarcodeValue containing the barcode sequence.

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

Revision 0.3 Page 38


3.5.5 SCRNoteTableEntry
The SCRNoteTableEntry is a special class that represents a banknote that can be configured for storing
on a recycler. This class is kept independent from the Banknote class because of the distinct differences
in the use. The Banknote class is intended to be used when reporting the note that is currently being
processed while this class represents the configuration table, not an actual document. This class is used
in one of the following functions { GetRecyclerNoteTable(), GetRecyclerStatus(int) }.

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.

Property Type Overview


Capacity int Gets the maximum number of banknotes (of this denomination)
that can be recycled. Will report 0 if the banknote denomination
is not enabled for recycling.
Count int Gets the number of banknotes (of this denomination) that are
currently on the recyclers.
Index int Unique index that is assigned to this entry. (Note - may be
different from the index reported in the Banknote class for the
same document).
IsRecyclingEnabled bool Gets a value indicating whether or not this banknote
denomination is configured to be recycled.
IsRecyclerEmpty bool Gets a value indicating whether or not 0 banknotes of this
denomination are currently on the recyclers.
IsRecyclerFull bool Gets a value indicating whether or not the recyclers have reach
the maximum capacity for this banknote denomination.
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".

Revision 0.3 Page 39


3.5.6 DocumentReportEntry
The DocumentReportEntry is a special class that represents a when it is reported via one of the several
report functions { GetLastCashMovementSummary(), OnMissingNotesReported event }.

3.5.6.1 Properties
All properties are read-only and some are only populated under certain circumstances.

Property Type Overview


BanknoteIndex int Unique banknote index that is assigned to this entry. This index
corresponds with a value in the banknote table (see
SCR.GetBanknoteTable()).

This property is not supported when used within


LastCashMovementSummary or MissingNotesEventArgs and will
report INVALID_INDEX (0).
DispensedTo int Gets the number of banknotes (of this denomination) that were
CustomerCount dispensed to the customer during the last operation.
ISO string Gets the 3 digit country code identifier of the banknote.
MissingCount int The number of banknotes (of this denomination) that went
missing.
RecyclerIndex int Unique SCR note table index that is assigned to this entry. This
index corresponds with a value in the recycler note table (see
SCR.GetRecyclerNoteTable()). In the event this banknote does not
have a recycler entry, the value will be '-1'.
StackedTo int The number of banknotes (of this denomination) that were
CassetteCount moved to the cassette during the last operation.
StackedTo int The number of banknotes (of this denomination) that were
RecyclerCount moved to the recycler during the last operation.
TotalDocuments Int The total number of banknotes that were moved during the last
MovedCount operation. Moved includes DispensedToCustomerCount,
StackedToCassetteCount, and StackedToRecyclerCount.
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".

Revision 0.3 Page 40


3.6 Audit Classes
Name Space View (Green == Class)
Audit classes are provided to reporting of quality metrics.
CPI
ScrLifetimeAudit contains values tracked over the entire
life of the unit.
SCR
NoteTableAudit contains a comprehensive count of all
documents processed by the device. Due to the dynamic
storage requirements, this class is accessed through
methods instead of properties. Audit

ScrPerformanceAudit contains similar values to


ScrLifetimeAudit but these values can be reset easily. SCRLifetime
Audit
All properties and classes are Read-Only.

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>

Revision 0.3 Page 41


<Continuation from Previous Page>

Property Type Overview


TotalCalibrationAttempts int The number of times the calibration routine has been
attempted.
TotalDocsReachedEsrowPosition int The number of documents that have reached the escrow
position successfully.
TotalDownloadAttempts int The number of times the flash download routine has been
attempted.
TotalMotorStarts int The number of initiated transactions. This value only counts
document insertions, not dispense or float down
operations.
TotalNotesDispensed int The number of banknotes that have been dispensed to the
customer.
TotalNotesFloatedDown int The number of banknotes that have been floated down
from a recycler to the cashbox.
TotalNotesRecognized int The number of banknotes that have passed the first stage of
acceptance. The next stage is validation for confirmation.
TotalNotesStacked int The number of banknotes that have been stacked to the
system.
Should be a sum of TotalNotesStackedToCashbox +
TotalNotesStackedToRecycler.
TotalNotesStackedToCashbox int The number of banknotes that have been stacked directly to
the cashbox. Does not include banknotes that have been
floated down.
TotalNotesStackedToRecycler int The number of banknotes that have been stacked to any
one of the configured recyclers.
TotalNotesValidated int The number of banknotes that have passed the second
stage of acceptance and is confirmed to be a valid
banknote.
TotalOperatingHours int The number of hours that system has been in operation.

Revision 0.3 Page 42


3.6.2 NoteTableAudit
Note Table audit data contains detailed information on the banknotes that have been processed by the
system. The data is divided up into three different areas:

 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.

Revision 0.3 Page 43


3.6.3 SCRPerformanceAudit
The Audit class contains detailed information on all of the performance data points on the SCR device.
These values can be reset by the ClearPerformanceAudit command.

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>

Revision 0.3 Page 44


<Continuation from Previous Page>
Property Type Overview
TotalFastFeedRejections int The number of documents that have been rejected because
a second document has been inserted too quickly. The
system must be able to draw in a single document without
the introduction of additional documents. If the system
sees additional documents being inserted, it will be forced
to reject the original document.
TotalHostResets int The number of times the system has been reset due to a
host request. This field does not count resets due to power
loss (see TotalPowerResets).
TotalHostReturns int The number of documents that have been returned by the
host. The system had escrowed the document and was
prepared to store it in the system but the host cancelled the
operation and the document was returned to the customer.
TotalJamRecoveryEfforts int The number of jam recovery efforts. In many cases, a jam
can be avoided by shifting motors back and forth. The
system will attempt to automatically clear any stuck
documents before jam is ultimately reported. Therefore,
this value will always be higher than TotalJams.
TotalJams int The number of jams. This counter includes all possible jams
in the system.
TotalJamsDuringReset int The number of jams that occur during a system startup.
These jams are counted differently because the system
does not attempt an aggressive routine to eject these
documents.
TotalMotorStarts int The number of initiated transactions. This value only counts
document insertions, not dispense or float down
operations.
TotalNotesDispensed int The number of banknotes that have been dispensed to the
customer.
TotalNotesFloatedDown int The number of banknotes that have been floated down
from a recycler to the cashbox.
TotalNotesRecognized int The number of banknotes that have passed the first stage
of acceptance. The next stage is validation for confirmation.
TotalNotesStacked int The number of banknotes that have been stacked to the
system. Should be a sum of TotalNotesStackedToCashbox +
TotalNotesStackedToRecycler.
TotalNotesStackedToCashbox int The number of banknotes that have been stacked directly
to the cashbox. Does not include banknotes that have been
floated down.
TotalNotesStackedToRecycler int The number of banknotes that have been stacked to any
one of the configured recyclers.
<Table Continues on Next Page>

Revision 0.3 Page 45


<Continuation from Previous Page>
Property Type Overview
TotalNotesValidated int The number of banknotes that have passed the second
stage of acceptance and is confirmed to be a valid
banknote.
TotalOperatingHours int The number of hours that system has been in operation.
TotalOrientationDisabledRejecti int The number of banknotes that have been rejected because
ons their orientation has been inhibited by the host.
TotalOutOfOrderConditions int The number o f out of order conditions. An out of order
condition is considered a serious error and requires a full
system power cycle to clear.
TotalOutOfServiceConditions int The number of times the system went out of service. An out
of service condition can usually be corrected without a
power cycle but will require intervention by the operator.
Examples include, Jammed, Cassette Removed, Cassette
Full, and others.
TotalPowerResets int The number of times the system has been reset due to
power loss. This does not count host requested resets.
(see TotalHostResets).
TotalRecognitionRejections int The number of documents that have been rejected because
they failed the first stage of acceptance.
TotalResets int The number of times the system has been reset. This
includes the two other fields TotalPowerResets and
TotalHostResets.
TotalSecurityEvents int The number of events related to potentially suspicious
activity. These events are not a cause for alarm but instead
are used to track unusual activity in the sensors within the
system. This value will be incremented for all cross channel
failures and other reasons including - manually moving a
motor during operations, unexpected sensor activity.
TotalSecurityRejections int The number of banknotes that have been recognized, but
failed the second stage of acceptance.
TotalTransportOpenedEvents int The number of times the recycler system has been opened
causing the device to go out of service. This counter does
not include times when the system has been opened while
power off.

Revision 0.3 Page 46


3.7 Reporting Classes
Name Space View (Green == Class)
The Reporting classes provide information on the device
and its operations. CPI

All properties and classes are Read-Only.

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.

Revision 0.3 Page 47


3.7.2 LastCashMovementSummary
The LastCashMovement summary is retrieved through the SCR. GetLastCashMovementSummary
method. This class contains information about the last executed note movement operation. Only
Dispense and Float Down operations are tracked in this manner. Stacking a document from escrow will
not reported through this class.
This summary is most beneficial if an operation has been interrupted for some reason and the host
wishes to confirm the status of the inventory system. The SessionType and TerminationCondition
provide details what occurred. The host can loop through each of the note table entries and view the
appropriate property (DocumentReportEntry.DispensedToCustomerCount or
DocumentReportEntry.StackedToCassetteCount) to determine the number of notes moved or use the
TotalDocumentsMoved as a summary.

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.

Revision 0.3 Page 48


3.7.3 RecyclerStatus
The RecyclerStatus contains information about the physical status of a recycler.
Retrievable through SCR.GetRecyclerStatus, this class provides details on the specified recycler including
the note counts and capacity. The Capacity property of the note table entry may be reported differently
than if compared to GetRecyclerNoteTable values because this function is the status of a single recycler
while the other note table function reports capacity across multiple recyclers (if configured so). For
example, if '10 EUR is configured to be recycled on both the upper and lower recycler, then the
SCR.GetRecyclerNoteTable entry will report a capacity of 120 notes (60 for each drum) while this
function will show a capacity of 60 for the single drum.

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).

Revision 0.3 Page 49


3.8 Custom Exceptions
Name Space View (Green == Class)
Custom exception classes have been added to provide
CPI
more detail for scenarios that are specific to the device.

All exceptions and properties are Read-Only.


SCR

For the purposes of COM interoperability, a unique error


code has been assigned to each class. See COM
Interoperability (section 2.5) Exceptions

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.

Revision 0.3 Page 50


3.8.2 InsufficientFundsException
Subclass of Exception that indicates when the host has requested document movements that cannot be
supported due to a lack of proper banknotes. This exception is raised primarily when attempting to
dispense or float documents.
The two properties allow the host to get more details on exactly what is available for the requested
operation.

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.

Revision 0.3 Page 51


4 Understanding the SCR Integration Toolkit Concepts
The following sections go over a few concepts that will benefit the integrator with understanding certain
aspects of the toolkit.

4.1 Understanding the Indexing System


The SCR device uses an indexing system to manage the configuration for the various sets of banknote
tables. Each banknote may have a different index depending on the table in which it resides. There are
two core "lists" that need to be understood before configuration can be customized.

 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.

Side by side comparison of different 5 EUR series banknotes.


(Series BA left) (Series AA right)
Image taken from www.new-euro-banknotes.eu
In the image above:

 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.

Revision 0.3 Page 52


4.1.1 Static Configuration
Static configuration is defined as the settings that must be adjusted using the Cashflow STS program
during the initial setup of the device. These settings cannot be overridden during normal operations
("run-time configuration").

4.1.1.1 Recycler Extended Note Inhibit Settings (Series Indexing)


The recyclability of a banknote can be configured down to the
series of banknote. For example, the operator can configure the RECOMMENDED: To allow for the
device to not recycle a very old series of banknote in favor of most configuration options during
always ensuring the customer is paid back with the newer series "run-time", all banknote entries
of that denomination.
should be allowed for recycling.

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.

Just because a banknote


is "Enabled" here doesn't
mean it will be recycled.
The next list that must be
configured is the Recycler
Value Inhibit.

Revision 0.3 Page 53


4.1.1.2 Recycler Value Inhibit Settings (Value Indexing)
The recycling value list is a list of all of the available
denominations for the device. A maximum of seven entries can be WARNING: Any modifications to
enabled for recycling. These seven banknotes will make up the the recycler value list must be
"pool" from which the run-time note table configuration can be
made with the recyclers empty.
chosen.

Inhibiting a value
(Disabled) has the similar
effect to inhibiting all
banknotes of that series
meaning they must all be
routed to the cassette.

Again, this list only makes


up the "pool" or available
denominations that can
be configured for
recycling. The final
configuration takes place
during "run-time."

4.1.2 Run Time Configuration


The run-time configurations are the final settings that affect the device. The possible options have been
filtered through the modifications during the "Static Configurations" and are now ready to be sent to the
device during initialization.

4.1.2.1 SCR Note Table Configuration (Value Indexing)


Once communications are established with the device, the host can query the current SCR Note Table
configuration and make changes as needed. The device will return a maximum of seven note table
entries which were configured in the previous step. From here, the host can choose the actual
denominations that will be recycled (up to the maximum supported count of the device). Please
reference SetRecyclerNoteTableEnables for more details.

4.1.2.2 Banknote Inhibiting (Series Indexing)


The acceptance of each banknote (series based indexing) can be controlled during run-time. These
changes will not affect any banknotes that are already in the device but will prevent or allow future
banknotes from being inserted into the device. SetBanknoteEnables covers the control of this
functionality.

Revision 0.3 Page 54


4.2 Processing the Log File
The SCR Toolkit has the ability to maintain comprehensive log files that are very useful for development
and field trial monitoring. Enabling the log file output is done through the constructor of the main toolkit
class: SCR. A root directory is provided to the class and the toolkit will take over the management of the
folder to organize the logs neatly for quick reference.

Subfolders are created based on month in the format


"Year_MonthNumber_MonthName". Each month based
directory will contain a single text file for each day in the RECOMMENDED: Keeping the system
format "Day_MonthName_EBDS_Log.txt". Whenever the time accurate can help when
system time changes to the next day, a new log file will be attempting to match log entries with
created. customer reported events.

4.2.1 Example Log File System


 <Root Directory> WARNING: In a multi-system
o 2014_06_Jun <Directory> environment, each SCR device must be
 29_Jun_EBDS_Log.txt supplied with its own dedicated root
 30_Jun_EBDS_Log.txt directory for logs. Failure to do so will
o 2014_07_Jul <Directory> result in log collisions.
 01_Jul_EBDS_Log.txt

4.2.2 Example Log Excerpt With Key Points

Revision 0.3 Page 55


5 Using the SCR Integration Toolkit

5.1 Connecting to the System


Properly connecting to the device is a three step process: (1) Create the SCR object, (2) Subscribe to the
events, and finally (3) open the communications.

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.2 Event Listening


Before communications can begin, the host must subscribe to all events so all critical pieces of
information and state changes will be reported to the host.

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.

5.1.3.1 Power Up Policy (PUP) Details


Power up policies are described in detail within the EBDS Protocol
Specification but here is a high level description, both policies RECOMMENDED: If unsure, the
perform the same logic as follows: default 'Pup-R' is recommended
for most host systems.
 Escrowed documents remain at escrow.
 Documents being stacked from the customer will be
placed back at the escrow position and the device will report "No Value".
 Inventoried documents (confirmed to be part of the system already - not from customer) being
stacked will continue their operation after power resumes.

The differences between the policies reside in the


Post-Dispense handling. Post dispensed is when the // (1) Create our SCR object at this time.
device has issued the dispensed event but the // Need to call the correct constructor depending on
whether or not we have debugging enabled
document has not yet fully left the device. if (bEnableDebugLogging)
_scr = new SCR("<Log Directory>");
 R - Post-dispensed documents will complete else
_scr = new SCR();
their movement and be presented to the
customer // (2) Event Handlers
_scr.OnCassetteStatusChanged += new
 S - Post-dispensed documents will be will be CassetteStatusEventHandler(SCR_OnCassetteStatusChanged);
retracted back to the escrow position and //... { Subscribe to all other events }
reported as "No Value". // (3) Open a connection to the device
_scr.Open("<Port Name>", ePowerUpPolicy.R);

Revision 0.3 Page 56


5.2 Configuring the System
Once the API starts communicating with the device, the API will report the "Initialization" state. At this
point, the API is gathering all the configuration data from the device such as the banknote table and the
device capabilities. Once the initialization is complete, the host should ensure the device is configured
properly.

5.2.1 Using Device Capabilities


The device capabilities function is best used to ensure // Determine our capabilities
the API features are supported by the device. The DeviceCapabilities caps = _scr.GetDeviceCapabilities();
property list is expected to grow over time but one of
// Use property to determine max recyclable denoms
the most useful properties of this class is the int iMax = caps.MaxNumberOfRecyclableDenominations;
"MaxNumberOfRecyclableDenominations" which
specifies how many document types can be configured
for recycling.

5.2.2 Banknote Table


The banknote table configuration is optional. The default
configuration is to enable all banknotes for acceptance. The host RECOMMENDED: Keep the default
needs only to modify this if they wish to inhibit certain banknote (all banknotes enabled) for
denominations or series. maximum acceptance.
5.2.3 SCR Note Table
The most important configuration is the SCR note table. This setting specifies the banknotes that will be
recycled. The host should first query the
existing note table configuration and then // Configure the recycled notes
List<int> lstSCREnables = new List<int>();// Indices to enable
ensure no unexpected banknotes exist on SCRNoteTableEntry[] arrSCRNoteTable =
the recyclers (any unexpected banknotes can _scr.GetRecyclerNoteTable();
be floated down at this point). After foreach (SCRNoteTableEntry entry in arrSCRNoteTable)
{
scanning the existing note table // Skip any invalid entries
configuration, the proper indices can be if (!entry.IsValid)
continue;
enabled as desired.
// Determine which indices that we want to recycle
...lstSCREnables.add(...);
}
// Now we should have entries from the SCR note table.
if (bNeedToReconfigure)
_scr.SetRecyclerNoteTableEnables(lstSCREnables.ToArray());

Revision 0.3 Page 57


5.3 Document Handling
The API contains multiple classes that represent a "document". A document can
be either a banknote or a barcode.
Three possible paths exist
5.3.1 Document Insertion { Rejected, Returned, Stacked }
The following flow chart outlines the expected device states (in green) and SCR
REJECTED
events (in red) during a standard document insertion from the customer.
When a document is being
rejected, the device state will
remain in "Accepting" during
the entire movement until the
"REJECTED" event is raised.

RETURNED

A return is a host requested


operation. The document can
only be returned if it reaches
the Escrow state.

STACKED

The optimal path for a


document. The destination
(recycler or cassette) has no
impact on the reported events
and states. The only difference
would be the timing in which
they occur - (Stacking to the
recycler will result in the
"STACKED" event occurring
sooner because the process is
faster).

Both Rejected and Returned


scenarios result in a final
Flowchart for Document Insertion "RETRIEVED" event when the
user removes the document.

Revision 0.3 Page 58


5.3.1.1 Handling Escrow
When documents reach the escrow position, the device is
// From within the OnDocumentStatusEvent Handler
waiting for a decision from the host. The host can this
opportunity to save off the document details for internal switch (e.Event)
{
processing and then route the note to the desired location. case eDocumentEvent.ESCROWED:
The host can choose to send the document to the recycler or // Save off this document for internal use
_document = e.Document
the cassette but the recommended action is to allow the
device to decide the end location through the use of the // Stack all valid documents
_scr.StackDocument();
generic "StackDocument" function call. break;
}
5.3.1.2 Handling Stacked
The stacked event contains the details about the document
that was just stored in the device. Several key pieces of information are provided during this event
including:

 Document object - Same object that was reported during the escrow event.
 Destination - Where the document was stacked (Cassette or Recycler).

Use the Stacked event to modify customer credit.

5.3.1.3 Handling Returned, Rejected, and Retrieved


The rest of the events are only used for reporting and informational purposes. The Returned and
Rejected events can be used to signal to the customer that their document has been issued back to
them and they can now remove it.

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.

Revision 0.3 Page 59


5.3.2 Dispensing / Floating Down Documents
The next diagram outlines the dispense (on left) and float down (on right)
operations with the associated device states (in green) and SCR events (in red).
DISPENSE OPERATIONS

Credit should be adjusted


when the "DISPENSED" event
occurs. At this point, the
document is exposed to the
customer and therefore no
longer part of the device.

The "RETURNED" event


occurs when the document
has reached the end of the
note movement and is ready
for the customer to retrieve.

"RETRIEVED" event will occur


whenever the customer
removes the document. This
can be at nearly the same
time as the returned event,
but never before.

FLOAT DOWN OPERATIONS

Float down operations


contain only a single event
"STACKED" which signals the
point in time that note counts
can be adjusted (from
recyclers to cashbox).

Flowchart for Dispense (LEFT) and Float Down (RIGHT)

Revision 0.3 Page 60


5.3.2.1 Handling Dispensed
The Dispensed event is a critical event (like the Stacked event). When the Dispensed event occurs, issue
must be adjusted from the system because the document can possibly be accessed by the customer at
this point.

5.3.2.2 Handling Stacked - From Float Down


The Stacked event for a float down operation
requires a different approach than when stacking a
// From within the OnDocumentStatusEvent Handler
document from the customer. The key difference
being that the document being stacked to the switch (e.Event)
{
cassette was already an inventoried note so there is case eDocumentEvent.STACKED:
no credit to post to the customer. The best way to // Find the proper source and destination
switch (e.Destination)
tell the difference is to use the Destination property {
of the event. If the document direction is Recycler- case eSessionType.RECYCLER_TO_CASSETTE:
To-Cassette, then this document has been floated // Document was floated down
break;
down. Using the events to tell the difference gives case eSessionType.CUSTOMER_TO_CASSETTE:
the host the freedom of not having to track states case eSessionType.CUSTOMER_TO_RECYCLER:
// Document was stacked from the customer.
internally (Was the device floating down or stacking break;
previously?). }
break;
}

Revision 0.3 Page 61


5.4 Out of Service Conditions
The SCR device has several reasons for going // From within the OnDocumentStatusEvent Handler
"Out Of Service". The reported DeviceState will
switch (e.Event)
be eDeviceState.DISABLED but the host system {
should query the DisabledReason property to case eDocumentEvent.DISABLED:
// Determine the root cause of Out Of Service
determine the root cause and corrective action switch (_scr.DisabledReason)
needed. {
case eDisabledReason.CASSETTE_REMOVED:
// Instruct operator to insert cassette
break;
case eDisabledReason.TRANSPORT_OPENED:
// Instruct operator to close the device
break;
case ... // Other cases
}
break;
}

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.

Revision 0.3 Page 62


5.5 Exceptional Scenarios
The following scenarios are rare but all host systems should be prepared to handle them.

5.5.1 Unknown Documents


Unknown Documents are documents on a recycler that the device cannot identify. This situation is very
rare and only three possible reasons are known:
// From within the OnDocumentStatusEvent Handler
1. The variant software file was changed while switch (e.Event)
banknotes were on the recyclers. For example, {
case eDocumentEvent.UNKNOWN_DOCUMENTS_DETECTED:
changing a USD system to accept EUR // Unknown documents should be floated down
banknotes will force the system to purge _scr.FloatDownUnknownDocuments();
inventory data. All banknotes on the recyclers break;
}
will be marked as unknown and must be
removed from the system.
2. Modifying the recycling value inhibit settings through Cashflow STS while documents remain in
the recycler system. When the device powers up, these invalid documents will need to be
removed.
3. In rare situations, it is possible for a severe jam in or around the recycler entrance to result in an
unknown document being reported for one or more recycled banknotes. The host will be
required to remove these documents before the system can operate correctly.

5.5.2 Missing Notes Reported


Missing notes are usually preceded by the
unknown documents scenario detailed above void SCR_OnMissingNotesDetected(object sender,
MissingNotesEventArgs e)
in #2 and are a result of moving those {
unknown documents. The device most likely // Check each index for a missing document and
// adjust any internal values as needed.
recovered from a severe jam or other foreach (DocumentReportEntry entry in e.DocumentEntries)
situation that caused valid, inventoried notes {
to be shifted and therefore "unknown" to the //...Check note value and process entry.MissingCount
}
device. After these notes were moved, the }
device reanalyzed the inventory system and
found one or more documents to be missing.
This event is meant to rectify any note counts
the host system may be expecting.

The missing note event also has the added


advantage of reporting possible fraud attempts should documents be removed manually by a user -
even while powered off.

Revision 0.3 Page 63


6 How to Test the System
Testing the SCR device is a crucial factor for a successful integration. This section will cover some of the
more obscure exceptional cases and detail exactly how to cause this situations in a lab based
environment.

All of the tests outlined below are non-destructive and will not significantly impact the future
performance of the device.

Some of the test involve


manually rotating the drums
to manipulate the recycler
system.
If done within the
parameters of these tests,
rotating the drums will not
harm the device even while
power is applied.

A large flat tip screwdriver is


recommended.

Drum Screw Locations Example Screw


Driver with size
reference.

Revision 0.3 Page 64


6.1 Unknown Documents
Creating an unknown document on a recycler requires that the operator manually roll a valid document
onto a drum. This test can be performed while the device is powered and idle (or host disabled).

Unknown documents can only occur after the device powers on or recovers from an out of service
condition.

Open the transport system by first


removing the vault module.

Revision 0.3 Page 65


Open the recycler door to gain access to
the drums.

Using the top drum screw, roll a


document onto the top drum until the
edge of the document can no longer be
seen. (Rotate screw clockwise)

Revision 0.3 Page 66


This image confirms the location of the
document if the drum latch is open.

Close the system back up

The device will perform the inventory


routine and should report unknown
documents.

Revision 0.3 Page 67


6.2 Missing Notes
Creating a missing notes event requires the operator to manually remove an inventoried banknote from
one of the drums. This test can be performed while the device is powered and idle (or host disabled).

Missing notes can only occur after the device powers on or recovers from an out of service condition.

Feed and stack at least one valid


document to the device. (this test
assumes the top drum is used).

Open the transport system by first


removing the vault module.

Revision 0.3 Page 68


Open the recycler door to gain access to
the drums.

Using the top drum screw, roll the valid


document off the top drum. (Rotate
screw counter-clockwise)

Revision 0.3 Page 69


Close the system back up

The device will perform the inventory


routine and should report missing
document.

Revision 0.3 Page 70


6.3 Jam
Jams are a rare condition that can occur at anytime. The following test shows a simple way to safely
induce a jam without risking any damage to the system.

Enable the device for acceptance and


attempt to feed an invalid document. A
piece of paper cut to the size of a
banknote or a business card will work
well.

Prevent the document from being


rejected by blocking the mouth of the
device. The system will perform
multiple attempts (10). Maintain the
blockage until all motors stop.

The device should now be reporting


"Jammed" and blinking the yellow LED.

Revision 0.3 Page 71


6.4 Failure
A failure condition represents a severe issue with the device that may require a service center in many
cases to address. The most likely causes include faulty hardware or bad wiring. This test will simulate a
failure by cutting communications between the modules.

Place the system into service; either Idle or


Host Disabled.

Looking at the back of the system where the


cables attach, remove the recycler module's
communications cable (There is a locking
arm that must be pinched).

The device should now be reporting


"Failure" and blinking the red LED.

Revision 0.3 Page 72

S-ar putea să vă placă și