Prefix Summary; Error Messages; Escaping; Signature - Lightware MX2-4x4-HDMI20-CA User Manual

Multimedia matrix switcher
Hide thumbs Also See for MX2-4x4-HDMI20-CA:
Table of Contents

Advertisement

 
9. LW3 Programmers' Reference
9.3.5. 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
n-
a node
nE
an error for a node
nm
a manual for a node
ns
a child node of a node
pr
a read-only property
pw
read-write property
pE
an error for the property
9.3.6. Error Messages
There are several error messages defined in the LW3 protocol, all of them have a unique error number.
Ý CALL /MEDIA/XP/VIDEO:switch(IA:O1)
Ü mE /MEDIA/XP/VIDEO:switch %E004:Invalid value
9.3.7. 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 which 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
The original message:
CALL /MEDIA/UART/P1:sendMessage(Set(01))
The escaped message:
CALL /MEDIA/UART/P1:sendMessage(Set\(01\))
Prefix
Description
pm
a manual for the property
m-
a method
mO
a response after a success method execution
mF
a response after a failed method execution
mE
an error for a method
mm
a manual for a method
Applied firmware package: v1.7.0 | LDC software: v2.5.1b5
MX2-HDMI20 series – User's Manual
9.3.8. Signature
DEFINITION: The signature is a four-digit-long hexadecimal value that can be optionally placed before
every command to keep a command and the corresponding responses together as a group.
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. In these cases, the response to that particular
command will also be preceded by the signature, and the corresponding lines will be between brackets:
Ý 1700#GET /EDID.*
Ü {1700
Ü pr /EDID.EdidStatus=F89:E1;D1:E2;D1:E3;D1:E4;F89:E5
Ü pr /EDID.Features=DisplayID;
Ü m- /EDID:copy
Ü m- /EDID:delete
Ü m- /EDID:reset
Ü m- /EDID:switch
Ü m- /EDID:switchAll
Ü }
INFO: The lines of the signature are also Cr and Lf terminated.
9.3.9. Subscription
DEFINITION: Subscribe to a node means that the user will get a notification if any of the properties of the
node is changed.
A user can subscribe to any node. These notifications are asynchronous messages and 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
Ý OPEN /MEDIA/XP/VIDEO
Ü o- /MEDIA/XP/VIDEO
Get the Active Subscriptions
Ý OPEN
Ü o- /MEDIA/XP/VIDEO
Ü o- /EDID
Ü o- /DISCOVERY
78
Subscribe to Multiple Nodes
Ý OPEN /MEDIA/XP/VIDEO*
Ü o- /MEDIA/XP/VIDEO*
Unsubscribe from a Node
Ý CLOSE /MEDIA/XP/VIDEO
Ü c- /MEDIA/XP/VIDEO
Unsubscribe from Multiple Nodes
Ý CLOSE /MEDIA/XP/VIDEO/*
Ü c- /MEDIA/XP/VIDEO/*

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents