![Magtek DYNAMAG Instruction Manual Download Page 41](http://html.mh-extra.com/html/magtek/dynamag/dynamag_instruction-manual_694747041.webp)
4 - MTSCRAEvent
Dynamag, DynaMAX, eDynamo, mDynamo, tDynamo, DynaWave, and iDynamo 6| Secure Card Reader Authenticators | Programmer’s
Reference (Java and Java Applet)
Page 41
4
MTSCRAEvent
If you are using the Java library, after calling the functions in section 3
, the
MTSCRA Windows SDK libraries for Java will invoke the callback functions in this section to provide
the requested data and/or a detailed response. Custom software that uses the MTSCRA libraries for Java
should create an object that implements the following functions to process the returning data, then register
it as a listener using the
function. For sample code that demonstrates how to use these functions, see
SwipeReaderControlPanel.java
in the SDK files.
If you are using the Java applet, after calling the functions in section 3
, the
MTSCRA Java applet will invoke the callback functions in this chapter to provide the requested data
and/or a detailed response. Custom code that uses the MTSCRA Java applet should implement the
following JavaScript functions to process the returning data. For sample code that demonstrates how to
use these functions, see the
mtjmsr.htm
and
mtjmsr.js
sample code in the SDK files.
4.1
onLibLoaded
public void onLibLoad(int status);
Parameter
Description
status
An integer 1 indicating the DLL is loaded and ready to call.
4.2
onDeviceConnectionStateChanged
public void onDeviceConnectionStateChanged(int lpDevState);
Parameter
Description
lpDevState
An integer value:
0 = Device is disconnected
1 = Device is connected.
4.3
onError
public void onError(int errorCode);
Parameter
Description
errorCode
An integer error code for an error handler.
4.4
onDataReceived
This event is called when the device has card data to transmit to the host.
public void onDataReceived(String data);
Parameter
Description
lpData
A string containing card data.
4.5
onDeviceResponse