Getcurrentportname method, Getexpirationmonth method, Getexpirationyear method – MagTek BLUETOOTH SWIPE READER User Manual

Page 13: Getlasterrmessage method, Getcurrentportname, Method, Getexpirationmonth, Getexpirationyear, Getlasterrmessage

Advertising
background image

Methods

7

Example
String var = FindElementMasked(2, ”;”, 0, “=”);

GETCURRENTPORTNAME METHOD

Return the name of the port that’s opened.

Syntax
String GetCurrentPortName()

Remarks

Returns the port name, e.g. COM7

GETEXPIRATIONMONTH METHOD

Returns the Expiration Month as a string.

Syntax
String GetExpirationMonth()

GETEXPIRATIONYEAR METHOD

Returns the Expiration Year as a string.

Syntax
String GetExpirationYear ()

GETLASTERRMESSAGE METHOD

Returns the last error message that the applet has detected.

Syntax
String GetLastErrMessage()

Example
byte [] output;
int stat = SendDataSync(“00011000”, output); // send in the wrong length


if(stat != 0)
alert(“Error Message: “ + GetLastErrMessage()); // display the last error message.

output: Error Message: send request error

Advertising