Scan And Store; Reformatting A Value - Lightware HDMI-TPS-TX226 User Manual

Hdbasettm multimedia extender
Table of Contents

Advertisement

 
7.LW3Programmer'sReference
7.10.5. Scan and Store
Thiscommandcanbeusedtogetthevalue(orapartofthevalue)ofanLW3property.Thedefinedpathwill
bescannedaccordingtothepatternandtheresultwillbethevalueofthevariable(numberorstringtype).
Command and Response
ç CALL·/CTRL/VARS/V<loc>:scanf(<path>.<property>;<pattern>)
æ mO·/CTRL/VARS/V<loc>:scanf
Parameters
Parameter
<loc>
The location of the variable
<path>.<property>
TheLW3propertywithnode
<pattern>
The pattern that scans the property for the desired result
Pattern options
Pattern
%s
Stringofcharactersstoppingatthefirstwhitespacecharacter
%<number>s
Thenext<number>ofcharacters(string)stoppingatthefirstwhitespace
%c
One character
%<number>c
Thenext<number>ofcharacters
%[<characters>]
Definedcharacterset,specifiedbetweenbrackets
%[^<characters>]
Negatedcharacterset,specifiedbetweenbracketswhichwillbeskipped
%*
Ignoredpart
<custom_text>
User-definedtext
Thepatternscanbecombinedtogetthedesiredresultasshownintheexamples.

ATTENTION!
Donotforgettoescapethe%characterasshowninbelowexample.
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.
Parameterdescription
Value
1-30
see below
Patterndescription
Appliedfirmwarepackage:v1.3.2b3 | LDCsoftware:v2.5.7b2
HDMI-TPS-TX200series–User'sManual
Further Examples
<path>.<property>
/MANAGEMENT/STATUS.CpuTemperature 42C;0;75;0;7
/MANAGEMENT/STATUS.CpuFirmware
/MEDIA/VIDEO/XP.DestinationPortStatus
/MEDIA/UART/P1.Rs232Configuration
/MEDIA/AUDIO/XP.SourcePortStatus
/MANAGEMENT/NETWORK.HostName
7.10.6. Reformatting a Value
Thevalueofthevariablecanbechangedbyaddingtextasprefixand/orpostfix.
ATTENTION!

Thinkaboutthelengthofthevalue:15charactersareallowed,theothersaretruncated.
Command and Response
ç CALL·/CTRL/VARS/V<loc>:printf(<prefix>%s<postfix>)
æ mO·/CTRL/VARS/V<loc>:printf
Parameters
Parameter
<loc>
The location of the variable
<prefix>
Thetextbeforetheoriginalvalueoftheproperty(optional)
%s
Theoriginalvalueofthevariable
<postfix>
Thetextfollowingtheoriginalvalueoftheproperty(optional) Custom ASCIIcharacters
Example
ç GET/CTRL/VARS/V1.Value
ç pw/CTRL/VARS/V1.Value=01
ç CALL/CTRL/VARS/V1:printf(PWR%s)
æ mO/CTRL/VARS/V1:printf
ç GET/CTRL/VARS/V1.Value
æ pw/CTRL/VARS/V1.Value=PWR01
The'PWR'stringhasbeeninsertedbeforetheoriginalvalue.
PropertyValue
<pattern>
%s
1.3.0b3r32
%12s
T00AA;T00AF
%6c
57600,8N1
%*[^,],%s
T000A;T000B;T000F
%*6c%5c
lightware-00005031
lightware-%[0-9]
Parameterdescription
Value
1-30
Custom ASCIIcharacters
104
Scannedresult
42
1.3.0b3
T00AA
8N1
T000B
00005031
Valuedescription

Advertisement

Table of Contents
loading

Table of Contents