Rfrequestportstatus() – Teledyne LeCroy Merlins Wand - Users Manual User Manual

Page 245

Advertising
background image

229

CATC M

ERLIN

S

W

AND

2.00

C

HAPTER

C

User’s Manual

Merlin’s Wand Scripting Commands

RFRequestPortStatus()

RFRequestPortStatus(Address, DLCI)

Return value

Returns a list with two values: status and portSettings.

Status (element 0) is one of the following:

“Success”

“Failure”

“Not Connected”

“Timed Out”

portSettings (element 1) is a list containing the following five values:

BaudRate (element 0) is a string containing the baud rate

DataFormat (element 1) is a string containing data bits, stop bits, and

parity settings

FlowControl (element 2) is a string indicating port flow control options

Xon (element 3) is a string containing the XON character

Xoff (element 4) is a string containing the XOFF character

Comments

Requests the port settings on a particular RFCOMM connection.

Example

result = RFOpenClientChannel(Device, 1);

DLCI = result[1];

if(result[0] == "Success")

{

res = RFRequestPortStatus(Device, DLCI);

Trace("RFRequestPortStatus returned: ", res[0], "\n\n");

if (res[0] == "Success")

{

settingsList = res[1];

Trace("BaudRate:

", settingsList[0], "\n");

Trace("DataFormat:

", settingsList[1], "\n");

Trace("Xon:

", settingsList[3], "\n");

Parameter

Meaning

Default Value

Comments

Address

Bluetooth

address of

device

Can use “CONNECTED_DEVICE” to request
the port status on a master RFCOMM connec-
tion. Note that this will work only if exactly one
device is connected via RFCOMM.

DLCI

Data link con-

nection identi-

fier

The DLCI is returned by RFOpenClientChan-
nel()

Advertising