Триггеры используются в управлении логическими схемами, а также для каскадирования логических схем.
Запросы для управления триггерами:
addtrigger - добавить триггер. Дополнительные параметры:
- k - идентификатор сессии пользователя;
id - идентификатор элемента, в случае если идентификатор отсутствует создается новый элемент типа 'trigger', иначе модифицируется существующий;
- name - имя триггера, не более 63 символов;
- reverse - признак инверсии значения триггера (0 или 1);
- value - значение триггера (0 или 1, on или off).
Поле value, при создании триггера, является необязательным. При успешном создании триггера, система возвращает в ответе идентификатор созданного элемента. Пример:
...
<error type="no error" id="504001" />
deltrigger - удалить триггер. Обязательные параметры:
- k - идентификатор сессии пользователя;
id - идентификатор элемента.
getelement - чтение элемента. Обязательные параметры:
- k - идентификатор сессии пользователя;
id - идентификатор элемента.
Ответ содержит информацию об элементе:
...
<element id="504001" module="2011" num="1" clas="devirt" type="trigger" name="my_name" state="normal" value="0" reverse="0" />
Triggers are used in the management of logic
...
schemes, as well as for cascading logic circuits.
Queries for
...
management of triggers are:
addtrigger - add a trigger. Extra options are:
- k
...
- - user session ID;
- id
...
- - the identifier of the element
...
- ; if the identifier
...
- is absent, a new element of type 'trigger' is created, otherwise the existing element is modified;
- name - the name of the trigger, not more than 63 characters;
- reverse - the sign of the inversion of the value of the trigger (0 or 1);
- value
...
- - the value of the trigger (0 or 1
...
- ; On or
...
- Off).
The value field, when creating a trigger, is optional. If the trigger is successfully created, the system returns the identifier of the created
...
element in the response. Example:
|
deltrigger - delete the trigger.
...
Mandatory parameters are:
- k
...
- - user session ID;
- id
...
- - element ID.
getelement - read the element. Required parameters are:
- k
...
- - user session ID;
- id
...
- - element ID.
The
...
response contains information about the element:
<element id="504001" module="2011" num="1" clas="devirt" type="trigger" name="my_name" state="normal" value="0" reverse="0" /> |