Scan And Store; Reformatting A Value - Lightware MMX8x4-HT420M User Manual

Multiport matrix switcher
Hide thumbs Also See for MMX8x4-HT420M:
Table of Contents

Advertisement

 
8. LW3 Programmers' Reference
8.23.5. Scan and Store
This command can be used to get the value (or a part of the value) of an LW3 property. The defined path will
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
<loc>
The location of the variable
<path>.<property>
The LW3 property with node
<pattern>
The pattern that scans the property for the desired result
Pattern options
Pattern
%s
String of characters stopping at the first whitespace character
%<number>s
The next <number> of characters (string) stopping at the first whitespace
%c
One character
%<number>c
The next <number> of characters
%[<characters>]
Defined characterset, specified between brackets
%[^<characters>]
Negated characterset, specified between brackets which will be skipped
%*
Ignored part
<custom_text>
User-defined text
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
A simple pattern has been applied: we need the first five characters from the property value.
Parameter description
Value
1-30
see below
Pattern description
Applied firmware package: v1.3.0 | LDC software: v2.4.2
MMX8x4-HT series – User's Manual
Further Examples
<path>.<property>
/MANAGEMENT/STATUS.CpuTemperature 42 C; 0;75; 0;7
/MANAGEMENT/STATUS.CpuFirmware
/MEDIA/VIDEO/XP.DestinationPortStatus
/MEDIA/UART/P1.Rs232Configuration
/MEDIA/AUDIO/XP.SourcePortStatus
/MANAGEMENT/NETWORK.HostName
8.23.6. Reformatting a Value
The value of the variable can be changed by adding text as prefix and/or postfix.
ATTENTION!

Think about the length of the value: 15 characters are allowed, the others are truncated.
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>
The text before the original value of the property (optional)
%s
The original value of the variable
<postfix>
The text following the original value of the property (optional) Custom ASCII characters
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' string has been inserted before the original value
Property Value
<pattern>
%s
1.6.0b10 r96
%12s
T00AA;T00AF
%6c
57600, 8N1
%*[^,], %s
T000A;T000B;T000F
%*6c%5c
lightware-00005031
lightware-%[0-9]
Parameter description
Value
1-30
Custom ASCII characters
150
Scanned result
42
1.6.0b10
T00AA
8N1
T000B
00005031
Value description

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mmx8x4-ht400mcMmx8x8-hdmi-4k-aMmx8x8-hdmi-4k-a-usb20

Table of Contents