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

Навигация

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

Новая страница: «cells: { 'working on battery' : { type : "switch", value : false, readonly : true }, 'Vin' : { type : "voltage", value : 0 }»
(Новая страница: «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.<code></code>»)
(Новая страница: «cells: { 'working on battery' : { type : "switch", value : false, readonly : true }, 'Vin' : { type : "voltage", value : 0 }»)
Строка 736: Строка 736:
7. Let's describe the rules for turning the switch on and off
7. Let's describe the rules for turning the switch on and off


<div lang="ru" dir="ltr" class="mw-content-ltr">
<syntaxhighlight lang="ecmascript">
<syntaxhighlight lang="ecmascript">
defineRule("_rs485_switch_on", {
defineRule("_rs485_switch_on", {
Строка 746: Строка 745:
   }
   }
});
});
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
defineRule("_rs485_switch_off", {
defineRule("_rs485_switch_off", {
   asSoonAs: function () {
   asSoonAs: function () {
Строка 757: Строка 754:
   }
   }
});
});
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
</syntaxhighlight>
</syntaxhighlight>
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
Note the double shielding.
Обратите внимание на двойное экранирование.
</div>


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

правок