Changes

183 bytes added ,  12:48, 26 January 2022
Marked this version for translation
Line 1: Line 1:  
<languages/>
 
<languages/>
 
<translate>
 
<translate>
===Example of description in XML===
+
===Example of description in XML=== <!--T:1-->
    +
<!--T:2-->
 
<syntaxhighlight lang="xml" line>
 
<syntaxhighlight lang="xml" line>
 
<item addr="100:245" back-rgba="0xff7100ff" iw-="1" length="5" name="aa" prf="prf('A: %d\10B: %ds dhjhfg hdfj dfhdfh', device(100, 247).status(0) $ 7, status(1))" sub-type="prf" text-rgb="0xffffff" title-rgb="0xff00" type="virtual"/>
 
<item addr="100:245" back-rgba="0xff7100ff" iw-="1" length="5" name="aa" prf="prf('A: %d\10B: %ds dhjhfg hdfj dfhdfh', device(100, 247).status(0) $ 7, status(1))" sub-type="prf" text-rgb="0xffffff" title-rgb="0xff00" type="virtual"/>
 
</syntaxhighlight>
 
</syntaxhighlight>
   −
===Parameters===
+
===Parameters=== <!--T:3-->
 
{|class="wikitable"
 
{|class="wikitable"
 
|-
 
|-
Line 24: Line 25:  
|}
 
|}
   −
===prf attribute description===
+
===prf attribute description=== <!--T:4-->
    +
<!--T:5-->
 
prf="prf('TEXT %[flags][wigth][.precision]type', STATUS)"
 
prf="prf('TEXT %[flags][wigth][.precision]type', STATUS)"
    +
<!--T:6-->
 
*TEXT – unchangeable text to be displayed;
 
*TEXT – unchangeable text to be displayed;
 
*flags, wigth, precision, type – status formatting description, see sprintf.
 
*flags, wigth, precision, type – status formatting description, see sprintf.
Line 62: Line 65:        +
<!--T:7-->
 
It is also possible to specify the conditions, for example:
 
It is also possible to specify the conditions, for example:
    +
<!--T:8-->
 
prf=" prf('Text%s', status(0)?'Yes':'No')
 
prf=" prf('Text%s', status(0)?'Yes':'No')
    +
<!--T:9-->
 
if status(0) is true "Text Yes" will be displayed, otherwise "Text No" appears
 
if status(0) is true "Text Yes" will be displayed, otherwise "Text No" appears
    +
<!--T:10-->
 
Or receive the devices status. For example, there is a curtain 343:22 and a lamp 299:1:
 
Or receive the devices status. For example, there is a curtain 343:22 and a lamp 299:1:
    +
<!--T:11-->
 
<syntaxhighlight lang="cpp" line>
 
<syntaxhighlight lang="cpp" line>
 
prf="string a[] ={'Closed', 'Open', 'Is closing', 'Is opening'};  prf('Curtain%s\10Data %d \10Status: %s\10 String%s',a[device(343:22)->status(0)], status(0), (device(299:21)->status(0) $7)?'On':'Off',statusString(1))"
 
prf="string a[] ={'Closed', 'Open', 'Is closing', 'Is opening'};  prf('Curtain%s\10Data %d \10Status: %s\10 String%s',a[device(343:22)->status(0)], status(0), (device(299:21)->status(0) $7)?'On':'Off',statusString(1))"
 
</syntaxhighlight>
 
</syntaxhighlight>
    +
<!--T:12-->
 
Status setting for such an element is the following: setStatus(299:201,{134,"Text"});
 
Status setting for such an element is the following: setStatus(299:201,{134,"Text"});
    +
<!--T:13-->
 
After status setting in the text field the following will be displayed:
 
After status setting in the text field the following will be displayed:
    +
<!--T:14-->
 
"Curtain is opening
 
"Curtain is opening
 
Data 134
 
Data 134
Line 83: Line 94:  
String Text"
 
String Text"
    +
<!--T:15-->
 
"Curtain" will depend on curtain status,
 
"Curtain" will depend on curtain status,
    +
<!--T:16-->
 
"Status" will be "Off" if 0 byte with mask of 7 status 299:21 equals to zero, otherwise "Status" will be "On"
 
"Status" will be "Off" if 0 byte with mask of 7 status 299:21 equals to zero, otherwise "Status" will be "On"
 
</translate>
 
</translate>
editor, translation-admin, translator
4,754

edits