Enumerations
Enumerations
BLE Services » Alexa Gadget Service (AGS)
Collaboration diagram for Enumerations:

## Enumerations
enum | ags_header_stream_id_t { AGS_CONTROL_STREAM_ID, AGS_ALEXA_STREAM_ID = 0x06, AGS_OTA_STREAM_ID = 0x02 }
| Alexa Gadget Service Stream ID. More...
enum | ags_header_trxn_type_t { AGS_TRANSACTION_TYPE_FIRST, AGS_TRANSACTION_TYPE_CONT, AGS_TRANSACTION_TYPE_LAST, AGS_TRANSACTION_TYPE_CTRL }
| Alexa Gadget Service transaction type. More...
enum | ags_header_ack_flag_t { AGS_ACK_NACK, AGS_ACK_ACK }
| Alexa Gadget Service ACK Flag. More...
enum | ags_header_length_ext_t { AGS_LEN_EXT_NO_EXT, AGS_LEN_EXT_EXT }
| Alexa Gadget Service Length extender. More...
enum | ags_header_result_code_t { AGS_RES_CODE_SUCCESS, AGS_RES_CODE_UNKNOWN, AGS_RES_CODE_UNSUPPORTED = 0x03 }
| Alexa Gadget Service result code. More...
enum | ags_evt_type_t { AGS_EVT_INVALID, AGS_EVT_ECHO_RX_DATA_SENT, AGS_EVT_ECHO_TX_DATA_RECEIVED, AGS_EVT_ECHO_RX_NOTI_ENABLE, AGS_EVT_ECHO_RX_NOTI_DISABLE }
| Alexa Gadget Service event type. More...

## Detailed Description

## Enumeration Type Documentation

## ◆ ags_evt_type_t

enum ags_evt_type_t

Alexa Gadget Service event type.

Enumerator
AGS_EVT_INVALID | Indicate that invalid event.
AGS_EVT_ECHO_RX_DATA_SENT | Indicate that the gadget has been sent the data to an Echo device.
AGS_EVT_ECHO_TX_DATA_RECEIVED | Indicate that the gadget has been received the data from an Echo device.
AGS_EVT_ECHO_RX_NOTI_ENABLE | Indicate that the Rx notification has been enabled.
AGS_EVT_ECHO_RX_NOTI_DISABLE | Indicate that the Rx notification has been disabled.

Definition at line 163 of file ags.h.

## ◆ ags_header_ack_flag_t

enum ags_header_ack_flag_t

Alexa Gadget Service ACK Flag.

Enumerator
AGS_ACK_NACK | The gadget doesn't need to send an ACK packet in response to the last packet of the transaction unless another packet in the transaction has this bit set to 1.
AGS_ACK_ACK | The gadget must send an ACK packet in response to the last packet of the transaction.

Definition at line 136 of file ags.h.

## ◆ ags_header_length_ext_t

enum ags_header_length_ext_t

Alexa Gadget Service Length extender.

Enumerator
AGS_LEN_EXT_NO_EXT | The packet's payload is 8 bits.
AGS_LEN_EXT_EXT | The packet's payload is 16 bits.

Definition at line 145 of file ags.h.

## ◆ ags_header_result_code_t

enum ags_header_result_code_t

Alexa Gadget Service result code.

Enumerator
AGS_RES_CODE_SUCCESS | The message was valid and acted on (if applicable) successfully.
AGS_RES_CODE_UNKNOWN | The message was valid but rusulted in a failure or error.
AGS_RES_CODE_UNSUPPORTED | The message was invalid because it contained a command or other field that was not supported by the receiver.

Definition at line 154 of file ags.h.

## ◆ ags_header_stream_id_t

enum ags_header_stream_id_t

Alexa Gadget Service Stream ID.

At any time, there is only one control stream, one Alexa stream, and one OTA stream. Each packet belongs to one of these streams, which is specified in the stream ID field of the packet's header. See Gadgets documentation for details: https://developer.amazon.com/en-US/docs/alexa/alexa-gadgets-toolkit/packet-ble.html#streams

Enumerator
AGS_CONTROL_STREAM_ID | Control stream ID, used to communicate.
AGS_ALEXA_STREAM_ID | Alexa stream ID, used to send directives and events.
AGS_OTA_STREAM_ID | OTA stream ID, used to update the gadget's firmware.

Definition at line 115 of file ags.h.

## ◆ ags_header_trxn_type_t

enum ags_header_trxn_type_t

Alexa Gadget Service transaction type.

It indicate where the packet is within the transaction. The transaction type and protocol of a single transaction are defined by the first packet of the transaction.

Enumerator
AGS_TRANSACTION_TYPE_FIRST | First packet of a transaction, or the only packet in a single-packet transaction.
AGS_TRANSACTION_TYPE_CONT | Continuation packet of a transaction.
AGS_TRANSACTION_TYPE_LAST | Last packet of a transaction.
AGS_TRANSACTION_TYPE_CTRL | Control packet. Currently, the only type of control packet is the ACK packet.

Definition at line 126 of file ags.h.