Functions
Functions
BLE Services » Alexa Gadget Service (AGS)

## Functions
sdk_err_t | ags_service_init (ags_init_t *p_ags_init)
| Initialize a Alexa Gadget Service instance and add in the DB. More...
sdk_err_t | ags_stream_send (uint8_t conn_idx, uint8_t stream_id, void *p_data, uint16_t length)
| Send data to the Echo device in stream format. More...
sdk_err_t | ags_non_stream_send (uint8_t conn_idx, void *p_data, uint16_t length)
| Send data to the Echo device in non-stream format. More...

## Detailed Description

## Function Documentation

## ◆ ags_non_stream_send()

sdk_err_t ags_non_stream_send | ( | uint8_t | conn_idx,
|  | void * | p_data,
|  | uint16_t | length
| ) |  |

Send data to the Echo device in non-stream format.

Parameters

  [in] | conn_idx | Connnection index.
  [in] | p_data | Pointer to the data to be sent.
  [in] | length | Length of data.

Returns
  Result of sending data.

## ◆ ags_service_init()

sdk_err_t ags_service_init | ( | ags_init_t * | p_ags_init | ) |

Initialize a Alexa Gadget Service instance and add in the DB.

Parameters

  [in] | p_ags_init | Pointer to ags_init_t Service initialization variable

Returns
  Result of service initialization.

## ◆ ags_stream_send()

sdk_err_t ags_stream_send | ( | uint8_t | conn_idx,
|  | uint8_t | stream_id,
|  | void * | p_data,
|  | uint16_t | length
| ) |  |

Send data to the Echo device in stream format.

Parameters

  [in] | conn_idx | Connnection index.
  [in] | stream_id | Stream ID, ags_header_stream_id_t.
  [in] | p_data | Pointer to the data to be sent.
  [in] | length | Length of data.

Returns
  Result of sending data.