6. LW3 Programmers’ Reference
HDMI20-OPTC series – User's Manual
42
6.3.4.
Manual
For every node, property and method in the tree there is a manual. The manual is a human-readable text that
describes the syntax and provides a hint for how to use the primitives.
Command format:
for nodes:
MAN
●
[nodePath]
for property:
MAN
●
[nodePath].[propertyName]
for method:
MAN
●
[nodePath]:[methodName]
Response format:
The human readable manual is separated by a space (‘ ‘) character from the primitives.
for nodes:
nm
●
[nodePath]
●
Human readable manual
for property:
pm
●
[nodePath].[propertyName]
●
Human readable manual
for method:
mm
●
[nodePath]:[methodName]
●
Human readable manual
Example: (for a property)
˃
MAN /MEDIA/UART/P1.Baudrate
˂
pm /MEDIA/UART/P1.Baudrate [<id_of_baudrate>] Baud rate (0=4800; 1=7200; 2=9600;
3=14400; 4=19200; 5=38400; 6=57600; 7=115200)
Example: (for a method)
˃
MAN /SYS:factoryDefaults
˂
mm /SYS:factoryDefaults [] Restart the device and set all the settings to factory
default
6.3.5.
Signature
For some command, the response can contain multiple lines. Each line is terminated with a carriage return
(Cr, ‘\r’) and line feed (Lf, ‘\n’) characters. In several cases the number of the lines in the response cannot
be determined in advance, e.g. the client is intended waiting for the whole response and also wants to be
sure, that the received lines belong together and to the same command. In these cases, a special feature the
‘signature’ can be used.
The signature is a four digit long hexadecimal value that can be optionally placed before every command.
In that case, the response to that particular command will also be preceded by the signature, and the
corresponding lines will be between brackets.
Command format:
XXXX#[command]
Legend:
xxxx: 4-digit long hexadecimal value.
Response format:
{XXXX
[command lines]
}
Example:
˃
1103#GET /MEDIA/VIDEO.*
˂
{1103
˂
pr /MEDIA/VIDEO.PortCount=4
˂
pr /MEDIA/VIDEO.PortUi=O1:02003;O2:03003;I1:01021;O3:04003
˂
pr /MEDIA/VIDEO.O1=HDMIOUT1A
˂
pr /MEDIA/VIDEO.O2=HDMIOUT1B
˂
pr /MEDIA/VIDEO.I1=OPTIN
˂
pr /MEDIA/VIDEO.O3=HDMIOUT2
˂
}
INFO: The lines of the signature are also Cr and Lf terminated.
6.3.6.
Subscription
The user can subscribe to any node. Subscribe to a node means that the user will get a notification if any of
the properties of the node is changed. These notifications are asynchronous messages - such as the ones
described above - and hence, they are useful to keep the client application up-to-date, without receiving any
unwanted information. When the user does not want to be informed about the changes anymore, he can
simply unsubscribe from the node.
ATTENTION! The subscriptions are handled separately for connections. Hence, if the connection is
terminated all registered subscriptions are deleted. After closing a connection the subscribe command
has to be sent in order to get the notifications of the changes on that connection.
Subscribe to a node
Command format:
OPEN
●
[nodePath]
Response format: o-
●
[nodePath]
Example:
˃
OPEN /MEDIA/VIDEO
˂
o- /MEDIA/VIDEO
Subscribe to multiple nodes
In order to subscribe to multiple nodes, the asterisk wild card can be used.
Command format: OPEN
●
[nodePath]/*
Response format:
o-
●
[nodePath]/*
Example:
˃
OPEN /MEDIA/VIDEO/*
˂
o- /MEDIA/VIDEO/*