Command Types; Prefix Summary; Error Messages; Escaping - Lightware UMX-TPS-TX100 Series User Manual

Hide thumbs Also See for UMX-TPS-TX100 Series:
Table of Contents

Advertisement

 
7. LW3 Programmers' Reference
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 /MEDIA/UART
Í ns /MEDIA/UART/P1
Í ns /MEDIA/UART/P2
Í pr /MEDIA/UART.PortCount=2
Í pr /MEDIA/UART.PortUi=P1:12209;P2:12224
Í pr /MEDIA/UART.P1=Local RS-232
Í pr /MEDIA/UART.P2=TPS out RS-232
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/I1.ColorSpaceMode=0
Í pw /MEDIA/VIDEO/I1.ColorSpaceMode=0
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
UMX-TPS-TX100 series – User's Manual
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
n-
a node
nE
an error for a node
nm
a manual for a node
pr
a read-only property
pw
read-write property
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 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 following: \ { } # % ( ) \r \n \t
The original message:
The escaped message:
Prefix
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
CALL /MEDIA/UART/P1:sendMessage(Set(01))
CALL /MEDIA/UART/P1:sendMessage(Set\(01\))
72
Description

Advertisement

Table of Contents
loading

Table of Contents