MODEX-OPTS, MODEX-OPTM
User’s Manual
Section 7.
Programmer’s reference
Page 67 / 113
Method
‘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 (see
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.
M
ethods’ name can contain the elements of the English alphabet, numbers and
underscore (
‘_’) character.
By convention, methods are beginning with lowercase letter. In 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 (control
characters have to be escaped, see section
on page
The method always has a return
‘state’ if the method could be executed. The state
could be either
‘OK’ or ‘FAILED’.
The method not necessarily has a return
‘value’. If it does, it can contain additional
information, which is always specific for the current case (return value can specify
why the execution failed). Find details in section
on page
When the method cannot be executed (e.g. the parameter list is illegal), there is
an error message (see section
Format:
mX
●/[nodeName]:[methodName]=[returnValue]
Legend:
m:
method
X can be:
‘O’: when the execution of the method was successful,
‘F’:
when the execution of the method failed,
‘m’: manual for the method (see section
‘E’:
error message for the method (see section
Example:
< mO●/node1/node12:method1
< mO●/MEDIA/IR/XP1:DefaultSwitch
< mO●/EDID:DeleteEdid
7.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:
Original text:
John●(Doe).●#3:●5%2=1●node1\node11
Escaped text:
John●\(Doe\).●\#3:●5\%2=1●node1\\node11