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

Page 241

Advertising
background image

225

CATC M

ERLIN

S

W

AND

2.00

C

HAPTER

C

User’s Manual

Merlin’s Wand Scripting Commands

Return value

Returns a list with three values: status, DLCI, and BluetoothDevice.

Status (element 0) is one of the following:

“Success”

“Timed out”

“Failure”

DLCI (element 1) is the data link connection identifier.

BluetoothDevice (element 2) is the address of the connecting device.

Comments

Waits Timeout milliseconds for a device to establish an RFCOMM con-
nection with Merlin’s Wand. This function will block the specified amount
of time (or infinitely if 0 is specified) unless a connection is established. If
an RFCOMM connection is already present when this function is called, it
will immediately return “Success”.

Example

# Wait 3 seconds for RFCOMM connection

Trace("RFWaitForConnection\n");

result = RFWaitForConnection(1, 3000);

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

{

Trace("Incoming RFCOMM connection DLCI: ", result[1],

"\n");

Trace("Connecting device address: ", result[2], "\n");

}

RFAcceptChannel()

RFAcceptChannel(bAccept)

Return value

“Success”

Parameter

Meaning

Default Value

Comments

bAccept

Boolean value

indicating

whether to

accept the

channel or not

0

0 or 1

Advertising