User Manual
Table Of Contents
- Appendix B: Command Generator Examples
- B.1 Device Discovery and Remote Name Request
- B.2 Establish Baseband Connection
- B.3 Baseband Disconnection
- B.4 Create Audio Connection
- B.5 L2CAP Connection
- B.6 L2CAP Channel Disconnect
- B.7 SDP Profile Service Search
- B.8 SDP Reset Database and Add Profile Service Record
- B.9 RFCOMM Client Channel Establishment
- B.10 RFCOMM Client Channel Disconnection
- B.11 RFCOMM Register Server Channel
- B.12 Establish TCS Connection
- B.13 OBEX Server Init
- B.14 OBEX Client Connection and Client Get & Put
- Appendix C: Merlin’s Wand Scripting Commands
- C.1 Bluetooth Addresses
- C.2 Basic Commands
- C.3 Pipe Commands
- C.4 HCI Commands
- HCIAcceptConnectionRequest()
- HCIAddSCOConnection()
- HCIAuthenticationRequested()
- HCICatcBerTest()
- HCICatcChangeHeadsetGain()
- HCICatcEnterTestMode()
- HCICatcReadHeadsetGain()
- HCICatcReadRevisionInformation()
- HCICatcSelfTest()
- HCICatcTestControl()
- HCICatcWriteCountryCode()
- HCIChangeConnectionLinkKey()
- HCIChangeConnectionPacketType()
- HCIChangeLocalName()
- HCIDeleteStoredLinkKey()
- HCIEnableDeviceUnderTestMode()
- HCIExitParkMode()
- HCIExitSniffMode()
- HCIHoldMode()
- HCIMasterLinkKey()
- HCIParkMode()
- HCIPINCodeRequestNegativeReply()
- HCIPINCodeRequestReply()
- HCIQoSSetup()
- HCIReadAuthenticationEnable()
- HCIReadBDADDR()
- HCIReadBufferSize()
- HCIReadClockOffset()
- HCIReadConnectionAcceptTimeout()
- HCIReadCountryCode()
- HCIReadCurrentIACLAP()
- HCIReadEncryptionMode()
- HCIReadLinkPolicySettings()
- HCIReadLinkSupervisionTimeout()
- HCIReadLocalName()
- HCIReadLocalSupportedFeatures()
- HCIReadLocalVersionInformation()
- HCIReadLoopbackMode()
- HCIReadNumberOfSupportedIAC()
- HCIReadPageScanMode()
- HCIReadPageScanPeriodMode()
- HCIReadPageTimeout()
- HCIReadPINType()
- HCIReadRemoteSupportedFeatures()
- HCIReadRemoteVersionInformation()
- HCIReadScanEnable()
- HCIReadSCOFlowControlEnable()
- HCIReadStoredLinkKey()
- HCIReadVoiceSetting()
- HCIRejectConnectionRequest()
- HCIRemoveSCOConnection()
- HCIReset()
- HCIRoleDiscovery()
- HCISetConnectionEncryption()
- HCISetEventFilter()
- HCISniffMode()
- HCISwitchRole()
- HCIWriteAuthenticationEnable()
- HCIWriteConnectionAcceptTimeout()
- HCIWriteCurrentIACLAP()
- HCIWriteEncryptionMode()
- HCIWriteLinkPolicySettings()
- HCIWriteLinkSupervisionTimeout()
- HCIWriteLoopbackMode()
- HCIWritePageTimeout()
- HCIWritePINType()
- HCIWriteScanEnable()
- HCIWriteStoredLinkKey()
- HCIWriteVoiceSettings()
- C.5 OBEX Commands
- C.6 RFCOMM Commands
- RFCloseClientChannel()
- RFOpenClientChannel()
- RFRegisterServerChannel()
- RFSendData()
- RFSendDataFromPipe()
- RFReceiveData()
- RFWaitForConnection()
- RFAcceptChannel()
- RFAcceptPortSettings()
- RFCreditFlowEnabled()
- RFRequestPortSettings()
- RFRequestPortStatus()
- RFSetLineStatus()
- RFSetModemStatus()
- RFSendTest()
- RFAdvanceCredit()
- C.7 TCS Commands
- C.8 L2CAP Commands
- C.9 SDP Commands
- C.10 Merlin Commands
- Appendix D: CATC Scripting Language
259
CATC MERLIN’S WAND 1.22 APPENDIX D
User’s Manual CATC Scripting Language
This function will create a local variable Parameter and a local variable
Local, which has an assigned value of 20.
D.4 Constants
A constant is similar to a variable, except that its value cannot be changed.
Like variables, constant names must contain only alphanumeric characters
and the underscore ( _ ) character, and they cannot begin with a number.
Constants are declared similarly to global variables using the keyword
const:
const CONSTANT = 20;
They can be assigned to any value type, but will generate an error if used in
the left-hand side of an assignment statement later on. For instance,
const constant_2 = 3;
Function()
{
constant_2 = 5;
}
will generate an error.
Declaring a constant with the same name as a global, or a global with the
same name as a constant, will also generate an error. Like globals, constants
can only be declared in the file scope.
D.5 Expressions
An expression is a statement that calculates a value. The simplest type of
expression is assignment:
x = 2
The expression x = 2 calculates 2 as the value of x.
All expressions contain operators, which are described in Section D.6,
“Operators,” on page 261. The operators indicate how an expression should
be evaluated in order to arrive at its value. For example
x + 2
says to add 2 to x to find the value of the expression. Another example is