|
Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
|
Alert Notification Service (ANS) More...
Macros | |
| #define | BT_ANS_ERR_CMD_NOT_SUP 0xa0 |
| Command not supported error code. | |
| #define | BT_ANS_MAX_TEXT_STR_SIZE 18 |
| ANS max text string size in octets. | |
Enumerations | |
| enum | bt_ans_cat { BT_ANS_CAT_SIMPLE_ALERT , BT_ANS_CAT_EMAIL , BT_ANS_CAT_NEWS , BT_ANS_CAT_CALL , BT_ANS_CAT_MISSED_CALL , BT_ANS_CAT_SMS_MMS , BT_ANS_CAT_VOICE_MAIL , BT_ANS_CAT_SCHEDULE , BT_ANS_CAT_HIGH_PRI_ALERT , BT_ANS_CAT_INSTANT_MESSAGE } |
| ANS Category ID Enum. More... | |
Functions | |
| int | bt_ans_set_new_alert_support_category (uint16_t mask) |
| Set the support for a given new alert category. | |
| int | bt_ans_set_unread_support_category (uint16_t mask) |
| Set the support for a given unread new alert category. | |
| int | bt_ans_notify_new_alert (struct bt_conn *conn, enum bt_ans_cat category, uint8_t num_new, const char *text) |
| Send a new alert to remote devices. | |
| int | bt_ans_set_unread_count (struct bt_conn *conn, enum bt_ans_cat category, uint8_t unread) |
| Set the total unread count for a given category. | |
Alert Notification Service (ANS)
| #define BT_ANS_ERR_CMD_NOT_SUP 0xa0 |
#include <zephyr/bluetooth/services/ans.h>
Command not supported error code.
| #define BT_ANS_MAX_TEXT_STR_SIZE 18 |
#include <zephyr/bluetooth/services/ans.h>
ANS max text string size in octets.
This is the max string size in octets to be saved in a New Alert. Text longer than the max is truncated.
section 3.165 of https://btprodspecificationrefs.blob.core.windows.net/gatt-specification-supplement/GATT_Specification_Supplement.pdf
| enum bt_ans_cat |
#include <zephyr/bluetooth/services/ans.h>
ANS Category ID Enum.
Enumeration for whether the category is supported.
| int bt_ans_notify_new_alert | ( | struct bt_conn * | conn, |
| enum bt_ans_cat | category, | ||
| uint8_t | num_new, | ||
| const char * | text ) |
#include <zephyr/bluetooth/services/ans.h>
Send a new alert to remote devices.
The new alert is transmitted to the remote devices if notifications are enabled. Each category will save the latest call to this function in case an immediate replay is requested via the ANS control point.
| conn | The connection object to send the alert to |
| category | The category the notification is for |
| num_new | Number of new alerts since last alert |
| text | Text brief of alert, null terminated |
| int bt_ans_set_new_alert_support_category | ( | uint16_t | mask | ) |
#include <zephyr/bluetooth/services/ans.h>
Set the support for a given new alert category.
| mask | The bitmask of supported categories |
| int bt_ans_set_unread_count | ( | struct bt_conn * | conn, |
| enum bt_ans_cat | category, | ||
| uint8_t | unread ) |
#include <zephyr/bluetooth/services/ans.h>
Set the total unread count for a given category.
The unread count is transmitted to the remote devices if notifications are enabled. Each category will save the latest call to this function in case an immediate replay is requested via the ANS control point.
| conn | The connection object to send the alert to |
| category | The category the unread count is for |
| unread | Total number of unread alerts |
| int bt_ans_set_unread_support_category | ( | uint16_t | mask | ) |
#include <zephyr/bluetooth/services/ans.h>
Set the support for a given unread new alert category.
| mask | The bitmask of supported categories |