7. LW3 Programmers’ Reference
MMX6x2-HT series – User's Manual
55
7.2.3.
Command Types
GET command
The
GET
command can be used to get the child nodes, properties and methods of a specific node. It can also
be used to get the value of a property. Use the dot character (.) when addressing a property:
GET /.SerialNumber
pr /.SerialNumber=87654321
GETALL command
The
GETALL
command can be used to get all child nodes, properties and methods of a node with one
command.
GETALL /EDID
n- /EDID/F
n- /EDID/D
n- /EDID/U
n- /EDID/E
pr /EDID.EdidStatus=F47:E1;F47:E2;F23:E3;F47:E4;F17:E5;F47:E6
m- /EDID:copy
m- /EDID:delete
m- /EDID:reset
m- /EDID:switch
m- /EDID:switchAll
SET command
The
SET
command can be used to modify the value of a property. Use the dot character (.) when addressing
the property:
SET /MEDIA/VIDEO/O1.HdcpModeSetting=1
pw /MEDIA/VIDEO/O1.HdcpModeSetting=1
CALL command
A method can be invoked by the
CALL
command. Use the colon character (:) when addressing the method:
CALL /MEDIA/VIDEO/XP:switch(I1:O1)
mO /MEDIA/VIDEO/XP:switch
MAN command
The manual is a human readable text that describes the syntax and provides a hint for how to use the
primitives. For every node, property and method in the tree there is a manual, type the MAN command to get
the manual:
MAN /MEDIA/VIDEO/O1.Pwr5vMode
pm /MEDIA/VIDEO/O1.Pwr5vMode ["0" | "1" | "2"] 0 - Auto, 1 - Always On, 2 - Always Off]
7.2.4. Prefix Summary
DEFINITION: The prefix is a 2-character long code that describes the type of the response.
The following prefixes are defined in the LW3 protocol:
Prefix
Description
Prefix
Description
n-
a node
pm
a manual for the property
nE
an error for a node
m-
a method
nm
a manual for a node
mO
a response after a success method execution
ns
a child node of a node
mF
a response after a failed method execution
pr
a read-only property
mE
an error for a method
pw
read-write property
mm
a manual for a method
pE
an error for the property
7.2.5.
Error Messages
There are several error messages defined in the LW3 protocol, all of them have a unique error number.
CALL /MEDIA/VIDEO/XP:switch(IA:O1)
mE /MEDIA/VIDEO/XP:switch %E004:Invalid value
7.2.6.
Escaping
DEFINITION: An escape sequence is a sequence of characters that does not represent itself when used
inside a character or string literal, but is translated into another character or a sequence of characters.
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 given character (like in C language).
Control characters are the followings: \ { } # % ( ) \r \n \t
A typical usage when a message is sent and it contains such a character that must be escaped.
Example
The original message:
CALL /MEDIA/UART/P1:sendMessage(Set(01))
The escaped message:
CALL /MEDIA/UART/P1:sendMessage(Set\(01\))
The above case is a typical example: the Lightware device is directed to send out a message over one of its
port. The round brackets in the message are escaped.