Перейти к содержанию

Навигация

Rule Examples/en: различия между версиями

Новая страница: «defineRule({ whenChanged: "wb-mcm8_20/Input 1 Single Press Counter", then: function (newValue, devName, cellName) { dev["wb-mdm3_58/K1"] = true; } });»
(Новая страница: «defineRule({ whenChanged: "wb-mcm8_20/Input 1 Single Press Counter", then: function (newValue, devName, cellName) { dev["wb-mdm3_58/K1"] = true; } });»)
Строка 473: Строка 473:
Many of the indications that are visible in the web interface of the controller out of the box are also created by rules on the wb-rules engine. Their code is here: [https://github.com/wirenboard/wb-rules-system https://github.com/wirenboard/wb-rules-system]. The system rules are collected in the <code>wb-rules-system</code> package, the script files on the controller are located in the <code>/usr/share/wb-rules-system/</code> folder.  
Many of the indications that are visible in the web interface of the controller out of the box are also created by rules on the wb-rules engine. Their code is here: [https://github.com/wirenboard/wb-rules-system https://github.com/wirenboard/wb-rules-system]. The system rules are collected in the <code>wb-rules-system</code> package, the script files on the controller are located in the <code>/usr/share/wb-rules-system/</code> folder.  


<div lang="ru" dir="ltr" class="mw-content-ltr">
A few examples of system rules are below.
Несколько примеров системных правил ниже.
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
=== Rule for tweeters ===
=== Правило для пищалки ===
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
[https://github.com/contactless/wb-rules-system/blob/master/rules/buzzer.js Rule] creates a virtual buzzer device with volume and frequency sliders and a mute button.
[https://github.com/contactless/wb-rules-system/blob/master/rules/buzzer.js Правило] создаёт виртуальное устройство buzzer с ползунками для регулировки громкости и частоты, а также кнопкой включения звука.
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
<div lang="ru" dir="ltr" class="mw-content-ltr">
translator, wb_editors
4344

правки