7. LW3 Programmers’ Reference
MODEX-F15-OPTS, MODEX-F15-OPTM series – User's Manual
54
7.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/VIDEO/I1.HdcpEnable
˂
pm /MEDIA/VIDEO/I1.HdcpEnable [bool] True, if HDCP authentication is enabled.
Example
: (for a method)
˃
MAN /SYS/MB/IF1/RS232:factoryDefaults
˂
mm /SYS/MB/RS232/Local:factoryDefaults [] Restore factory default settings
7.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/UART.*
˂
{1103
˂
pr /MEDIA/UART.PortCount=5
˂
pr /MEDIA/UART.PortUI=P1:21214;P2:15921;P3:15921;P4:15921;P5:15921
˂
pr /MEDIA/UART.P1=Rs232
˂
pr /MEDIA/UART.P2=P1 (R)
˂
pr /MEDIA/UART.P3=-
˂
pr /MEDIA/UART.P4=-
˂
pr /MEDIA/UART.P5=-
˂
}
INFO: The lines of the signature are also Cr and Lf terminated.
7.3.6.
Subscription
A 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/*