![Sonifex AVN-TB20AD Скачать руководство пользователя страница 71](http://html1.mh-extra.com/html/sonifex/avn-tb20ad/avn-tb20ad_handbook_1321142071.webp)
61
Ember+ Interface
15
Each GPIO node has a similar set of parameters and func�ons:
Type Parameter
This enumerated integer parameter is the current port type.
Input Function Parameter
This enumerated integer parameter is the func�on that will be
ac�vated when the GPIO port, when configured as an input, is
asserted.
Input Action Parameter
This enumerated integer parameter is the opera�onal mode of the
GPIO port when it is configured as an input.
Output Trigger Parameter
This enumerated integer parameter is the func�on that triggers the
GPIO port when it is configured as an output.
Status Parameter
The status parameter shown in Fig 15-2 represents the current state of
the GPIO port regardless of whether the port is set as an input or an
output. A value of 0 indicates the port is inac�ve and a 1 indicates the
port is ac�ve. This parameter has an Ember+ stream iden�fier and a
consumer can subscribe to it to automa�cally receive updates when
the status changes.
Set Output Function
The set output leaf shown in Fig 15-2 is a func�on that allows control
of the GPIO port when it is configured as an output. The func�on
exposes 1 argument called enable, which is an integer with a value of
non-zero for assert the output, or zero for de-assert the output. The
func�on also returns an integer result which reflects the current state
of the GPIO output similar to the status parameter. A return value of -1
indicates there was an error invoking the func�on. If the GPIO port is
configured as an input, invoking this func�on has no effect.
Relay
The relay node of the GPIO branch of the Ember+ provider interface allows the
relay to be controlled by an Ember+ consumer. Fig 15-3 shows the structure of the
relay node. For further details on the
, refer to page 47.
Fig 15-3: Ember+ Relay Node Structure
Trigger Low & Trigger High Parameters
These parameters are the combined value of the func�ons that trigger the
opera�on of the relay. As there are more than 64 available op�ons, the value is
split into 2 integers. The Trigger Low parameter contains the sum of the selected
trigger func�ons in the lower 64 bits while the Trigger High parameter contains the
sum of the selected trigger func�ons in the upper 64 bits.
Status Parameter
The status parameter shown in Fig 15-3 represents the current state of the relay. A
value of 0 indicates the relay is inac�ve and a 1 indicates the relay is ac�ve. This
parameter has an Ember+ stream iden�fier and a consumer can subscribe to it to
automa�cally receive updates when the status changes.
Active Function
The ac�ve leaf shown in Fig 15-3 is a func�on that allows control of the relay. The
func�on exposes 1 argument called enable, which is an integer with a value of non-
zero to ac�vate the relay, or zero to de-ac�vate the relay. The func�on also returns
an integer result which reflects the current state of the relay similar to the status
parameter. A return value of -1 indicates there was an error invoking the func�on.