Translations:Битовые операции/36/en — различия между версиями
Материал из WebHMI Wiki
(Новая страница: «Then the script that will handle all these situations and generate the necessary flags in their places can look like this: <syntaxhighlight lang = lua> allAlerts…») |
|||
Строка 2: | Строка 2: | ||
<syntaxhighlight lang = lua> | <syntaxhighlight lang = lua> | ||
allAlerts = { -- регистр бит - код ошибки тип операции | allAlerts = { -- регистр бит - код ошибки тип операции | ||
− | {srcAlias = "pv1Status", bits = {[1] = 1}, "bit9"}, | + | {srcAlias = "pv1Status", bits = {[1] = 1}, checktype = "bit9"}, |
− | {srcAlias = "vfdStatus_1", bits = {[2] = 10, [3] = 20, [4] = 30, [5] = 40}, "=="}, | + | {srcAlias = "vfdStatus_1", bits = {[2] = 10, [3] = 20, [4] = 30, [5] = 40}, checktype = "=="}, |
− | {srcAlias = "vfdStatus_2", bits = {[6] = 10, [7] = 20, [8] = 30, [9] = 40}, "=="}, | + | {srcAlias = "vfdStatus_2", bits = {[6] = 10, [7] = 20, [8] = 30, [9] = 40}, checktype = "=="}, |
− | {srcAlias = "pv1ZoneHumidity", bits = {[10] = 90}, ">="} | + | {srcAlias = "pv1ZoneHumidity", bits = {[10] = 90}, checktype = ">="} |
} | } |
Текущая версия на 12:38, 31 мая 2018
Then the script that will handle all these situations and generate the necessary flags in their places can look like this:
allAlerts = { -- регистр бит - код ошибки тип операции
{srcAlias = "pv1Status", bits = {[1] = 1}, checktype = "bit9"},
{srcAlias = "vfdStatus_1", bits = {[2] = 10, [3] = 20, [4] = 30, [5] = 40}, checktype = "=="},
{srcAlias = "vfdStatus_2", bits = {[6] = 10, [7] = 20, [8] = 30, [9] = 40}, checktype = "=="},
{srcAlias = "pv1ZoneHumidity", bits = {[10] = 90}, checktype = ">="}
}