![]() |
ACU6 Device API
|
Analog Inputs Service. More...
Data Structures | |
struct | a_ipc_dyn_array_enum_analog_inputs_result |
Dynamic-length array of a_ipc_enum_analog_inputs_result. More... | |
struct | a_ipc_dyn_array_enum_analog_inputs_channels |
Dynamic-length array of a_ipc_enum_analog_inputs_channels. More... | |
struct | a_ipc_dyn_array_enum_analog_inputs_mode |
Dynamic-length array of a_ipc_enum_analog_inputs_mode. More... | |
struct | a_ipc_msg_analog_inputs_request_req |
Request the analog inputs service. More... | |
struct | a_ipc_msg_analog_inputs_request_rsp |
Analog inputs request result. More... | |
struct | a_ipc_msg_analog_inputs_release_req_norsp |
Release analog inputs service for given user user . More... | |
struct | a_ipc_msg_analog_inputs_configure_channel_req |
Request to configure one analog inputs channel. More... | |
struct | a_ipc_msg_analog_inputs_configure_channel_rsp |
Sent in response to analog_inputs_configure_channel_req message. More... | |
struct | a_ipc_msg_analog_inputs_values_publish_ind |
Analog input event. More... | |
struct | a_ipc_msg_analog_inputs_values_subscribe_req |
Subscribe to updates for analog_inputs_values. More... | |
struct | a_ipc_msg_analog_inputs_values_subscribe_rsp |
Sent in response to a_ipc_msg_analog_inputs_values_subscribe_req. More... | |
struct | a_ipc_msg_analog_inputs_values_unsubscribe_req_norsp |
Unsubscribe from updates for analog_inputs_values. More... | |
Enumerations | |
enum | a_ipc_enum_analog_inputs_result { A_IPC_ENUM_ANALOG_INPUTS_RESULT_OK , A_IPC_ENUM_ANALOG_INPUTS_RESULT_ERROR } |
Result codes. More... | |
enum | a_ipc_enum_analog_inputs_channels { A_IPC_ENUM_ANALOG_INPUTS_CHANNELS_AIN_1 , A_IPC_ENUM_ANALOG_INPUTS_CHANNELS_AIN_2 , A_IPC_ENUM_ANALOG_INPUTS_CHANNELS_AIN_3 , A_IPC_ENUM_ANALOG_INPUTS_CHANNELS_AIN_4 , A_IPC_ENUM_ANALOG_INPUTS_CHANNELS_AIN_5 , A_IPC_ENUM_ANALOG_INPUTS_CHANNELS_AIN_6 , A_IPC_ENUM_ANALOG_INPUTS_CHANNELS_AIN_7 , A_IPC_ENUM_ANALOG_INPUTS_CHANNELS_AIN_8 , A_IPC_ENUM_ANALOG_INPUTS_CHANNELS_NUMBER_OF_CHANNELS } |
Logical channels. More... | |
enum | a_ipc_enum_analog_inputs_mode { A_IPC_ENUM_ANALOG_INPUTS_MODE_OFF , A_IPC_ENUM_ANALOG_INPUTS_MODE_VOLTAGE , A_IPC_ENUM_ANALOG_INPUTS_MODE_FREQUENCY } |
Possible measurement modes for analog inputs. More... | |
Analog Inputs Service.
This page contains documentation of the Analog Inputs Service API.
To measure voltage on a signal (e.g. AIN_5), the user has to request the service, configure the channel and subscribe to the publication of values.
struct a_ipc_dyn_array_enum_analog_inputs_result |
Dynamic-length array of a_ipc_enum_analog_inputs_result.
Data Fields | ||
---|---|---|
uint32_t | length | Length of the array (number of elements) |
a_ipc_enum_analog_inputs_result * | value | The contents of the array. |
struct a_ipc_dyn_array_enum_analog_inputs_channels |
Dynamic-length array of a_ipc_enum_analog_inputs_channels.
Data Fields | ||
---|---|---|
uint32_t | length | Length of the array (number of elements) |
a_ipc_enum_analog_inputs_channels * | value | The contents of the array. |
struct a_ipc_dyn_array_enum_analog_inputs_mode |
Dynamic-length array of a_ipc_enum_analog_inputs_mode.
Data Fields | ||
---|---|---|
uint32_t | length | Length of the array (number of elements) |
a_ipc_enum_analog_inputs_mode * | value | The contents of the array. |
struct a_ipc_msg_analog_inputs_request_req |
Request the analog inputs service.
Response is delivered in a_ipc_msg_analog_inputs_request_rsp.
Create using a_ipc_init_analog_inputs_request_req().
Message type is A_IPC_MSG_ANALOG_INPUTS_REQUEST_REQ.
Data Fields | ||
---|---|---|
a_ipc_dyn_string | user | User identifier, max 15 characters long. |
struct a_ipc_msg_analog_inputs_request_rsp |
Analog inputs request result.
Sent in response to a_ipc_msg_analog_inputs_request_req.
Create using a_ipc_init_analog_inputs_request_rsp().
Message type is A_IPC_MSG_ANALOG_INPUTS_REQUEST_RSP.
Data Fields | ||
---|---|---|
a_ipc_enum_analog_inputs_result | result | Result of the operation. |
struct a_ipc_msg_analog_inputs_release_req_norsp |
Release analog inputs service for given user user
.
Create using a_ipc_init_analog_inputs_release_req_norsp().
Message type is A_IPC_MSG_ANALOG_INPUTS_RELEASE_REQ_NORSP.
Data Fields | ||
---|---|---|
a_ipc_dyn_string | user | User identifier, max 15 characters long. |
struct a_ipc_msg_analog_inputs_configure_channel_req |
Request to configure one analog inputs channel.
Response is delivered in a_ipc_msg_analog_inputs_configure_channel_rsp.
Create using a_ipc_init_analog_inputs_configure_channel_req().
Message type is A_IPC_MSG_ANALOG_INPUTS_CONFIGURE_CHANNEL_REQ.
Data Fields | ||
---|---|---|
a_ipc_enum_analog_inputs_channels | channel | Which channel of the ADC device to configure. |
a_ipc_enum_analog_inputs_mode | mode | mode can be off/voltage/frequency |
int16_t | threshold | Reserved for future use. |
struct a_ipc_msg_analog_inputs_configure_channel_rsp |
Sent in response to analog_inputs_configure_channel_req
message.
Sent in response to a_ipc_msg_analog_inputs_configure_channel_req.
Create using a_ipc_init_analog_inputs_configure_channel_rsp().
Message type is A_IPC_MSG_ANALOG_INPUTS_CONFIGURE_CHANNEL_RSP.
Data Fields | ||
---|---|---|
a_ipc_enum_analog_inputs_channels | channel | The channel that was configured. |
a_ipc_enum_analog_inputs_result | result | Result of the operation. |
struct a_ipc_msg_analog_inputs_values_publish_ind |
Analog input event.
Sent once per second to all subscribers.
Subscribe using a_ipc_msg_analog_inputs_values_subscribe_req and unsubscribe using a_ipc_msg_analog_inputs_values_unsubscribe_req_norsp.
Create using a_ipc_init_analog_inputs_values_publish_ind().
Message type is A_IPC_MSG_ANALOG_INPUTS_VALUES_PUBLISH_IND.
Data Fields | ||
---|---|---|
int32_t | values[16] |
Values for all configured input channels. The values are mV or Hz for voltage and frequency values, respectively. INT32_MIN means that the channel is turned off. The values are indexed by the logical_channels ["logical channels"]. |
struct a_ipc_msg_analog_inputs_values_subscribe_req |
Subscribe to updates for analog_inputs_values.
a_ipc_msg_analog_inputs_values_publish_ind will be received until a_ipc_msg_analog_inputs_values_unsubscribe_req_norsp is sent.
Response is delivered in a_ipc_msg_analog_inputs_values_subscribe_rsp.
Create using a_ipc_init_analog_inputs_values_subscribe_req().
Message type is A_IPC_MSG_ANALOG_INPUTS_VALUES_SUBSCRIBE_REQ.
struct a_ipc_msg_analog_inputs_values_subscribe_rsp |
Sent in response to a_ipc_msg_analog_inputs_values_subscribe_req.
Create using a_ipc_init_analog_inputs_values_subscribe_rsp().
Message type is A_IPC_MSG_ANALOG_INPUTS_VALUES_SUBSCRIBE_RSP.
Data Fields | ||
---|---|---|
a_ipc_enum_ipc_subscribe_result | result | The result of the subscription request. |
struct a_ipc_msg_analog_inputs_values_unsubscribe_req_norsp |
Unsubscribe from updates for analog_inputs_values.
a_ipc_msg_analog_inputs_values_publish_ind will no longer be received.
Create using a_ipc_init_analog_inputs_values_unsubscribe_req_norsp().
Message type is A_IPC_MSG_ANALOG_INPUTS_VALUES_UNSUBSCRIBE_REQ_NORSP.
Logical channels.
These channels (AIN_1 - AIN_8) correspond to physical pins in the main connector.
A_IPC_RESULT a_ipc_init_analog_inputs_configure_channel_req | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_analog_inputs_configure_channel_req.
msg->info.type
will be A_IPC_MSG_ANALOG_INPUTS_CONFIGURE_CHANNEL_REQ.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_analog_inputs_configure_channel_rsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_analog_inputs_configure_channel_rsp.
msg->info.type
will be A_IPC_MSG_ANALOG_INPUTS_CONFIGURE_CHANNEL_RSP.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_analog_inputs_release_req_norsp | ( | a_ipc_msg * | msg, |
uint32_t | user_maxlength | ||
) |
Initialize the message buffer to contain a_ipc_msg_analog_inputs_release_req_norsp.
msg->info.type
will be A_IPC_MSG_ANALOG_INPUTS_RELEASE_REQ_NORSP.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
user_maxlength | The maximum string length for user in the message. |
A_IPC_RESULT a_ipc_init_analog_inputs_request_req | ( | a_ipc_msg * | msg, |
uint32_t | user_maxlength | ||
) |
Initialize the message buffer to contain a_ipc_msg_analog_inputs_request_req.
msg->info.type
will be A_IPC_MSG_ANALOG_INPUTS_REQUEST_REQ.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
user_maxlength | The maximum string length for user in the message. |
A_IPC_RESULT a_ipc_init_analog_inputs_request_rsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_analog_inputs_request_rsp.
msg->info.type
will be A_IPC_MSG_ANALOG_INPUTS_REQUEST_RSP.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_analog_inputs_values_publish_ind | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_analog_inputs_values_publish_ind.
msg->info.type
will be A_IPC_MSG_ANALOG_INPUTS_VALUES_PUBLISH_IND.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_analog_inputs_values_subscribe_req | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_analog_inputs_values_subscribe_req.
msg->info.type
will be A_IPC_MSG_ANALOG_INPUTS_VALUES_SUBSCRIBE_REQ.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_analog_inputs_values_subscribe_rsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_analog_inputs_values_subscribe_rsp.
msg->info.type
will be A_IPC_MSG_ANALOG_INPUTS_VALUES_SUBSCRIBE_RSP.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
A_IPC_RESULT a_ipc_init_analog_inputs_values_unsubscribe_req_norsp | ( | a_ipc_msg * | msg | ) |
Initialize the message buffer to contain a_ipc_msg_analog_inputs_values_unsubscribe_req_norsp.
msg->info.type
will be A_IPC_MSG_ANALOG_INPUTS_VALUES_UNSUBSCRIBE_REQ_NORSP.
This function can be called on an already initialized message to change its type.
msg | The message buffer to initialize |
a_ipc_enum_analog_inputs_channels a_ipc_msg_analog_inputs_configure_channel_req::channel |
Which channel of the ADC device to configure.
a_ipc_enum_analog_inputs_channels a_ipc_msg_analog_inputs_configure_channel_rsp::channel |
The channel that was configured.
a_ipc_enum_analog_inputs_mode a_ipc_msg_analog_inputs_configure_channel_req::mode |
mode can be off/voltage/frequency
a_ipc_enum_analog_inputs_result a_ipc_msg_analog_inputs_request_rsp::result |
Result of the operation.
a_ipc_enum_analog_inputs_result a_ipc_msg_analog_inputs_configure_channel_rsp::result |
Result of the operation.
a_ipc_enum_ipc_subscribe_result a_ipc_msg_analog_inputs_values_subscribe_rsp::result |
The result of the subscription request.
int16_t a_ipc_msg_analog_inputs_configure_channel_req::threshold |
Reserved for future use.
a_ipc_dyn_string a_ipc_msg_analog_inputs_request_req::user |
User identifier, max 15 characters long.
a_ipc_dyn_string a_ipc_msg_analog_inputs_release_req_norsp::user |
User identifier, max 15 characters long.
int32_t a_ipc_msg_analog_inputs_values_publish_ind::values[16] |
Values for all configured input channels.
The values are mV or Hz for voltage and frequency values, respectively. INT32_MIN means that the channel is turned off. The values are indexed by the logical_channels ["logical channels"].