7.LW3Programmers’Reference
HDMI-TPS-RX110AYseries–User'sManual
98
Appliedfirmwarepackage:v1.5.0b3 | LDCsoftware:v2.5.9b2
7.11.4.
Value Change with Intervals (Case)
Thiscommandcanbeusedtochangethevalueofavariableifitfitsinanyofthedefinedintervals.
Command and Response
ç
CALL·/CTRL/VARS/V
<loc>
:case(
<min> <max> <val>
;)
æ
mO·/CTRL/VARS/V
<loc>
:case
Parameters
Parameter
Parameter description
Value
<loc>
The location of the variable
1-30
<min>
The lowest value of the interval
Integer
<max>
The highest value of the interval
Integer
<val>
The new value that will be valid if the current value is in the interval
Integer
The parameters are divided by a space character, and the interval groups are divided by semicolon. Up to 16
casescanbedefined.
Examples
ç
CALL/CTRL/VARS/V1:case(102015)
æ
mO/CTRL/VARS/V1:case
Atypicalexamplewhentwodifferentrangesofvalueshavetomeet:
Incomingvalues:between0and255(e.g.thesliderofacontrollercanhavethesevalues).
Outgoingvalues:between0and100(e.g.thecontrolleddeviceacceptsthesevalues).
Definedcases:
Thecommandlookslike:
ç
CALL/CTRL/VARS/V1:case(12510;265020;517530;7610040;10112550;12615060;15117570;
17620080;20122590;226255100)
æ
mO/CTRL/VARS/V1:case
Min
Max
New value
Case 1
1
25
10
Case 2
26
50
20
Case 3
51
75
30
Case4
76
100
40
Case 5
101
125
50
Case 6
126
150
60
Case 7
151
175
70
Case 8
176
200
80
Case9
201
225
90
Case 10
226
255
100
7.11.5.
Scan and Store
Thiscommandcanbeusedtogetthevalue(orapartofthevalue)ofanLW3property.Thedefinedpathwill
be scanned according to the pattern and the result will be the value of the variable (number or string type).
Command and Response
ç
CALL·/CTRL/VARS/V
<loc>
:scanf(
<path>
.
<property>
;
<pattern>
)
æ
mO·/CTRL/VARS/V
<loc>
:scanf
Parameters
Parameter
Parameter description
Value
<loc>
The location of the variable
1-30
<path>
.
<property>
TheLW3propertywithnode
<pattern>
The pattern that scans the property for the desired result
see below
Pattern options
Pattern
Pattern description
%s
Stringofcharactersstoppingatthefirstwhitespacecharacter
%
<number>
s
Thenext<number>ofcharacters(string)stoppingatthefirstwhitespace
%c
One character
%
<number>
c
The next <number> of characters
%[
<characters>
]
Definedcharacterset,specifiedbetweenbrackets
%[^
<characters>
] Negatedcharacterset,specifiedbetweenbracketswhichwillbeskipped
%*
Ignored part
<custom_text>
User-definedtext
The patterns can be combined to get the desired result as shown in the examples.
ATTENTION!
Do not forget to escape the % character as shown in below example.
Examples
ç
CALL/CTRL/VARS/V1:scanf(/MEDIA/AUDIO/XP.SourcePortStatus;\%5c)
æ
mO/CTRL/VARS/V1:scanf
ç
GET/CTRL/VARS/V1.Value
æ
pw/CTRL/VARS/V1.Value=T00AA
Asimplepatternhasbeenapplied:weneedthefirstfivecharactersfromthepropertyvalue.