7. LW3 Programmers’ Reference
MX2-8x8-HDMI20 series – User's Manual
45
Get the active subscriptions for the current connection
Command format:
OPEN
Response format:
o-
●
[nodePath]
Example:
˃
OPEN
˂
o- /MEDIA/XP
˂
o- /MEDIA/XP/*
Unsubscribe from a node
Command format:
CLOSE
●
[nodePath]
Response format:
c-
●
[nodePath]
Example:
˃
CLOSE /MEDIA/XP
˂
c- /MEDIA/XP
Unsubscribe from multiple nodes
Command format:
CLOSE
●
[nodePath]/*
Response format:
c-
●
[nodePath]/*
Example:
˃
CLOSE /MEDIA/XP/*
˂
c- /MEDIA/XP/*
8.3.7. Notifications about the Changes of the Properties
When the value of a property is changed and the user is subscribed to the node, which the property belongs
to, an asynchronous notification is generated. This is notification is called as the ‘change message’. The
format of such a message is very similar to the response for the ‘GET’ command.
Format:
CHG
●
[nodePath].[propertyName]=[newPropertyValue]
Example:
˂
CHG /EDID.EdidStatus=F49;F49;F49;F49;F49;F49;F49;F49
A short example of how to use the subscription
In the following, an example is presented, how the subscriptions are working and how to use them. In the
example, there are two independent users controlling the device through two independent connections
(‘Connection #1’ and ‘Connection #2’). The events in the rows occur after each other.
Conn. #1
˃
OPEN /MEDIA/XP/VIDEO
˂
o- /MEDIA/XP/VIDEO
˃
GET /MEDIA/XP/VIDEO.DestinationConnectionStatus
˂
pr /MEDIA/XP/VIDEO.DestinationConnectionStatus=I1;I1;I1;I1;I1;I1;I1;I1
Conn. #2
˃
GET /MEDIA/XP/VIDEO.DestinationConnectionStatus
˂
pr /MEDIA/XP/VIDEO.DestinationConnectionStatus=I1;I1;I1;I1;I1;I1;I1;I1
˃
CALL /MEDIA/XP/VIDEO:switch(I2:O1)
˂
mO /MEDIA/XP/VIDEO:switch=OK
Conn. #1
˂
CHG /MEDIA/XP/VIDEO.DestinationConnectionStatus=I1;I1;I1;I1;I1;I1;I1;I1
Explanation: The first user (Connection #1) set a subscription to a node. Later the other user (Connection
#2) made a change, and thanks for the subscription, the first user got a notification about the change.
8.4. Formal Definitions
Method parameters and property values are specified in a modified version of Backus-Naur Form (BNF). The
syntax is the following:
“literal”
literals are quoted
<expression1>|<expression2>
vertical bars denote alternatives
[<expression>]
expressions in square brackets are optional
<number>*[<expression>]
expression is repeated at least <number> times
*[<expression>]
<number> may be omitted, in this case number defaults to 0
<number>*{<expression>}
expressions in curly brackets are repeated exactly <number>
times
In
Input port number
Om
Output port number