3 - MTSCRA Functions
Dynamag, DynaMAX, eDynamo, mDynamo, tDynamo, DynaWave, and iDynamo 6| Secure Card Reader Authenticators | Programmer’s
Reference (Java and Java Applet)
Page 26
3
MTSCRA Functions
If you are developing Java software, follow the setup steps in section 2
, then create an instance of the
MTSCRA
object in your software project, then use
Java method calls to invoke the functions described in this chapter to communicate with the device. For
sample code that demonstrates how to use these functions, see
SwipeReaderControlPanel.java
in the SDK files.
If you are developing HTML / JavaScript software using the Java applet, follow the setup steps in section
2
How to Set Up the Swipe Reader Control Panel
, create an instance of the applet in your HTML, then
use JavaScript to invoke the functions described in this chapter to communicate with the device. For
sample code that demonstrates how to use these functions, see the
mtjmsr.html
and
mtjmsr.js
sample code in the SDK files.
Generally, these functions will run in one of two modes:
Asynchronous
functions will return data using the event handlers (callback functions) defined in
section 4
Synchronous
functions will return requested data immediately in the function’s return value. If the
requested data is not available immediately, synchronous calls will generally block until a specified
wait time has elapsed.
Most calls that wait for input from the user will run in the asynchronous mode.
3.1
getSDKVersion
This function retrieves the Java library version information.
String getSDKVersion();
Return Value: String containing the Version of the Java library.
3.2
openDevice
This function opens a connection to the device. The event associated with this command is
onDeviceConnectionStateChanged
long openDevice(String deviceURI);
Parameter
Description
deviceURI
URI of the device.
For USB devices, deviceURI should be an empty string.
For Bluetooth LE devices, deviceURI should be BLE://XXXXXXXX,
where XXXXXXXX is variable length string indicate device friendly
name.
Return Value:
0 = Success
Non-Zero = Error