DLN_ADC_CONDITION_MET_EV Structure
The DLN_ADC_CONDITION_MET_EV structure is used to store descriptions of ADC events.
DLN_ADC_CONDITION_MET_EV Structure
typedef struct
{
DLN_MSG_HEADER header;
uint16_t eventCount;
uint8_t port;
uint8_t channel;
uint16_t value;
uint8_t eventType;
} __PACKED_ATTR DLN_ADC_CONDITION_MET_EV;
Members:
- header
-
Defines the DLN message header DLN_MSG_HEADER. This structure's header contains the following fields:
Field Description size The size of the message. Must be equal to the size of the DLN_ADC_CONDITION_MET_EV structure. msgId Identifies the message. For the DLN_ADC_CONDITION_MET_EV structure it must be set to 0x0610. You can use the DLN_MSG_ID_ADC_CONDITION_MET_EV constant. echoCounter Can be used to link a structure to a response. The response will have the same echoCounter value. This field can be any numerical value from 0 to 0xFFFF (65536). handle A handle to the DLN-series adapter. - eventCount
- Contains the number of generated events after configuration setting.
- port
- Contains the number of the ADC port.
- channel
- Contains the number of the ADC channel.
- value
- Contains the voltage level on the corresponding ADC channel.
- eventType
-
Contains the condition that has triggered the event generation. The following values are available:
Value Description 0 or DLN_ADC_EVENT_NONE No events are generated for the current channel. 1 or DLN_ADC_EVENT_BELOW Events are generated when voltage level on the ADC channel crosses the lower threshhold. 2 or DLN_ADC_EVENT_LEVEL_ABOVE Events are generated when voltage level on the ADC channel crosses the higher threshold. 3 or DLN_ADC_EVENT_OUTSIDE Events are generated when voltage level on the ADC channel falls outside of the specified range between thresholds. 4 or DLN_ADC_EVENT_INSIDE Events are generated when voltage level on the ADC channel falls within the specified range between thresholds. 5 or DLN_ADC_EVENT_ALWAYS Events are sent periodically with predefined repeat interval. The non-zero interval must be specified for this event type.
2006-2012