Wb-mqtt-serial templates/en: различия между версиями

Новая страница: «'''Device''' is a device connected to the controller, '''channel''' is a data source: usually it is a Modbus register with a description of the data type, polling…»
(Новая страница: «The general structure of the device template is as follows: <syntaxhighlight lang="JSON"> //Device template { "device": { "Device1 parameter":"value",…»)
(Новая страница: «'''Device''' is a device connected to the controller, '''channel''' is a data source: usually it is a Modbus register with a description of the data type, polling…»)
Строка 20: Строка 20:
}</syntaxhighlight>
}</syntaxhighlight>


Здесь '''device''' — устройство, подключаемое к контроллеру, '''канал''' — источник данных: обычно Modbus-регистр с описанием типа данных, частоты опроса, преобразования значений и проч.  
'''Device''' is a device connected to the controller, '''channel''' is a data source: usually it is a Modbus register with a description of the data type, polling frequency, value conversion, etc.
Подробное описание смотрите в следующих разделах. Файлы шаблонов хранятся на контроллере в директории <pre>/usr/share/wb-mqtt-serial/templates</pre>
See the following sections for a detailed description: template files are stored on the controller in a folder
В эту директорию следует копировать новые шаблоны, созданные вами для нового устройства. В наших шаблонах мы используем отступы по 4 пробела на уровень, что обеспечивает удобочитаемость кода шаблона, и рекомендуем писать новые шаблоны с такими же отступами.
<pre>/usr/share/wb-mqtt-serial/templates</pre>
You should copy the new templates you created for the new device to this directory. In our templates, we use indents of 4 spaces per level, which ensures the readability of the template code, and we recommend writing new templates with the same indentation.


=== Параметры устройства (device) ===
=== Параметры устройства (device) ===
12 063

правки