Methods – MagTek JMSR Applet for MagTek User Manual

Page 11

Advertising
background image

7

Methods

SendStrCmd()
Returns a string value from the reader.

Syntax
String SendCmdStr(String strCmd)

Remarks
Send specific command to the MTHID reader. The length of the strCmd is automatically
calculated by the component. If the command fails or encounters an error, the error will be
returned and the user needs to parse it.

The SendData method has this part:



Example
String response = SendCmdStr (“0010”);
The response will be a hexadecimal string returned from the reader. An empty string returned
indicates that the communication between the applet and the reader might most likely be
disconnected.



SendCmdStrWithLength METHOD
Returns a string value from the reader.

Syntax
String

SendCmdStrWithLength

(String strCmd)


Remarks
Send specific command to the MTHID reader. The length of the strCmd is not automatically
calculated by the component. If the command fails or encounters an error, the error will be return
and the user needs to parse it.

The SendCmdStrWithLength method has this part:




Example

String response = SendCmdStrWithLength (“000110”);

The response will be a hexadecimal string returned from the reader. An empty string returned
indicates that the communication between the applet and the reader might most likely be
disconnected.

Part

Data Type

Description

strCmd

String

Command

Part

Data Type

Description

strCmd

String

Command

Advertising