Escaping - Lightware MMX6x2-HT200 User Manual

Hide thumbs Also See for MMX6x2-HT200:
Table of Contents

Advertisement

Method
The 'method' in the LW3 protocol is also a leaf. It cannot have a value, such as the
properties, but it can be invoked with a parameter with the help of a special 'CALL'
command.
Format: mX/[nodeName]:[methodName]=[returnValue]
Legend:
Example:
mO/node1/node12:method1
mO/MEDIA/VIDEO/XP:switch
mE%E001:Syntax error
mm/MEDIA/VIDEO/XP:lockSource:Lock one or more source ports

8.1.2. Escaping

Property values and method parameters can contain characters that are used as control
characters in the protocol. They must be escaped. The escape character is the backslash
('\') and escaping means injecting a backslash before the character that should be escaped
(like in C language). Control characters are the followings: \ { } # % ( ) \r \n \t
Example:
The original text:
The escaped text:
When using the LDC, the escaping is done automatically. If you send a command from a
third party device/terminal to the transmitter, the escaping has to be done manually. In this
case, put an extra backslash before the control character.
Example:
CALL /MEDIA/UART/P1:SendMessage(My_message\\r\\n)
Page 78 / 119
A method cannot have child nodes or child methods. It is always a leaf.
A node can have any number of methods (may not have any).
A method is referenced with a colon (':') after the node.
The methods' name can contain the elements of the English alphabet, numbers
and underscore ('_') character.
By convention, methods are beginning with a lowercase letter. In the case of
compound words, the very first letter is lowercase, and the first letter of each other
words are capitalized (lowerCamelCase).
The parameter of the method can contain any readable ASCII character.
The method always has a return 'state' if the method could be executed. The state
could be either 'OK' or 'FAILED'.
The method does not necessarily have a return 'value'. If it does, it can contain
additional information, which is always specific to the current case (the return value
can specify why the execution failed).
When the method cannot be executed (e.g. the parameter list is illegal), there is
an error message.
m:
method
X can be:
'O':
when the execution of the method was successful (OK),
'F':
when the execution of the method failed,
'm':
the manual of the method,
'E':
error message for the method.
John(Doe). #3: 5%2=1node1\node11
John\(Doe\).\#3: 5\%2=1node1\\node11
Section 8. LW3 Programmers' reference

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MMX6x2-HT200 and is the answer not in the manual?

This manual is also suitable for:

Mmx6x2-ht220Mmx6x2-ht210

Table of Contents