![]() |
Bluetooth LE Profile API document
Bluetooth LE Profile API document Rev.1.00 [May 22, 2020]
|
Alert Notification Service exposes: The different types of alerts with the short text messages. The information how many count of new alert messages. The information how many count of unread alerts. More...
Alert Notification Service exposes: The different types of alerts with the short text messages. The information how many count of new alert messages. The information how many count of unread alerts.
Data Structures | |
struct | st_ble_ans_supported_new_alert_category_t |
Supported New Alert Category value structure. More... | |
struct | st_ble_ans_new_alert_t |
New Alert value structure. More... | |
struct | st_ble_ans_supported_unread_alert_category_t |
Supported Unread Alert Category value structure. More... | |
struct | st_ble_ans_unread_alert_status_t |
Unread Alert Status value structure. More... | |
struct | st_ble_ans_alert_notification_control_point_t |
Alert Notification Control Point value structure. More... | |
Macros | |
#define | BLE_ANS_NEW_ALERT_TEXT_LEN (18) |
New Alert Text length. More... | |
#define | BLE_ANS_COMMAND_NOT_SUPPORTED (BLE_ERR_GROUP_GATT | 0xA0) |
Command not supported error code. More... | |
#define | BLE_ANS_PRV_WRITE_REQUEST_REJECTED (BLE_ERR_GROUP_GATT | 0xA1) |
Write Request Rejected error code. More... | |
Enumerations | |
enum | e_ble_ans_alert_notification_control_point_command_id_t { BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_COMMAND_ID_ENABLE_NEW_INCOMING_ALERT_NOTIFICATION = 0, BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_COMMAND_ID_ENABLE_UNREAD_CATEGORY_STATUS_NOTIFICATION = 1, BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_COMMAND_ID_DISABLE_NEW_INCOMING_ALERT_NOTIFICATION = 2, BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_COMMAND_ID_DISABLE_UNREAD_CATEGORY_STATUS_NOTIFICATION = 3, BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_COMMAND_ID_NOTIFY_NEW_INCOMING_ALERT_IMMEDIATELY = 4, BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_COMMAND_ID_NOTIFY_UNREAD_CATEGORY_STATUS_IMMEDIATELY = 5 } |
Alert Notification Control Point Command ID enumeration. More... | |
enum | e_ble_ans_alert_notification_control_point_category_id_t { BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_CATEGORY_ID_SIMPLE_ALERT__GENERAL_TEXT_ALERT_OR_NON_TEST_ALERT = 0, BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_CATEGORY_ID_EMAIL__ALERT_WHEN_EMAIL_MESSAGES_ARRIVES = 1, BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_CATEGORY_ID_NEWS_NEWS_FEEDS_SUCH_AS_RSS_ATOM = 2, BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_CATEGORY_ID_CALL_INCOMING_CALL = 3, BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_CATEGORY_ID_MISSED_CALL_MISSED_CALL = 4, BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_CATEGORY_ID_SMS_MMS__SMS_MMS_MESSAGES_ARRIVES = 5, BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_CATEGORY_ID_VOICE_MAIL__VOICE_MAIL = 6, BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_CATEGORY_ID_SCHEDULE__ALERT_OCCURED_ON_CALENDAR_PLANNER = 7, BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_CATEGORY_ID_HIGH_PRIORITIDED_ALERT__ALERT_THAT_SHOULD_BE_HANDLED_AS_HIGH_PRIORITY = 8, BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_CATEGORY_ID_INSTANT_MESSAGE_ALERT_FOR_INCOMING_INSTANT_MESSAGES = 9, BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_CATEGORY_ID_ALL = 255 } |
Alert Notification Control Point Category ID enumeration. More... | |
enum | e_ble_ans_char_idx_t { BLE_ANS_SUPPORTED_NEW_ALERT_CATEGORY_IDX, BLE_ANS_NEW_ALERT_IDX, BLE_ANS_NEW_ALERT_CLI_CNFG_IDX, BLE_ANS_SUPPORTED_UNREAD_ALERT_CATEGORY_IDX, BLE_ANS_UNREAD_ALERT_STATUS_IDX, BLE_ANS_UNREAD_ALERT_STATUS_CLI_CNFG_IDX, BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_IDX } |
Alert Notification Service characteristic Index. More... | |
enum | e_ble_ans_event_t { BLE_ANS_EVENT_SUPPORTED_NEW_ALERT_CATEGORY_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_ANS_SUPPORTED_NEW_ALERT_CATEGORY_IDX, BLE_SERVS_READ_REQ), BLE_ANS_EVENT_NEW_ALERT_CLI_CNFG_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_ANS_NEW_ALERT_CLI_CNFG_IDX, BLE_SERVS_WRITE_REQ), BLE_ANS_EVENT_NEW_ALERT_CLI_CNFG_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_ANS_NEW_ALERT_CLI_CNFG_IDX, BLE_SERVS_WRITE_COMP), BLE_ANS_EVENT_NEW_ALERT_CLI_CNFG_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_ANS_NEW_ALERT_CLI_CNFG_IDX, BLE_SERVS_READ_REQ), BLE_ANS_EVENT_SUPPORTED_UNREAD_ALERT_CATEGORY_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_ANS_SUPPORTED_UNREAD_ALERT_CATEGORY_IDX, BLE_SERVS_READ_REQ), BLE_ANS_EVENT_UNREAD_ALERT_STATUS_CLI_CNFG_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_ANS_UNREAD_ALERT_STATUS_CLI_CNFG_IDX, BLE_SERVS_WRITE_REQ), BLE_ANS_EVENT_UNREAD_ALERT_STATUS_CLI_CNFG_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_ANS_UNREAD_ALERT_STATUS_CLI_CNFG_IDX, BLE_SERVS_WRITE_COMP), BLE_ANS_EVENT_UNREAD_ALERT_STATUS_CLI_CNFG_READ_REQ = BLE_SERVS_ATTR_EVENT(BLE_ANS_UNREAD_ALERT_STATUS_CLI_CNFG_IDX, BLE_SERVS_READ_REQ), BLE_ANS_EVENT_ALERT_NOTIFICATION_CONTROL_POINT_WRITE_REQ = BLE_SERVS_ATTR_EVENT(BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_IDX, BLE_SERVS_WRITE_REQ), BLE_ANS_EVENT_ALERT_NOTIFICATION_CONTROL_POINT_WRITE_COMP = BLE_SERVS_ATTR_EVENT(BLE_ANS_ALERT_NOTIFICATION_CONTROL_POINT_IDX, BLE_SERVS_WRITE_COMP) } |
Alert Notification Service event type. More... | |
Functions | |
ble_status_t | R_BLE_ANS_SetSup_nw_alt_cat (const st_ble_ans_supported_new_alert_category_t *p_value) |
Set Supported New Alert Category characteristic value to the local GATT database. More... | |
ble_status_t | R_BLE_ANS_GetSup_nw_alt_cat (st_ble_ans_supported_new_alert_category_t *p_value) |
Get Supported New Alert Category characteristic value from the local GATT database. More... | |
ble_status_t | R_BLE_ANS_NotifyNew_alert (uint16_t conn_hdl, const st_ble_ans_new_alert_t *p_value) |
Send notificatoin of New Alert characteristic value to the remote device. More... | |
ble_status_t | R_BLE_ANS_SetNew_alerttCliCnfg (uint16_t conn_hdl, const uint16_t *p_value) |
Set New Alert cli cnfg descriptor value to the local GATT database. More... | |
ble_status_t | R_BLE_ANS_GetNew_alertCliCnfg (uint16_t conn_hdl, uint16_t *p_value) |
Get New Alert cli cnfg descriptor value from the local GATT database. More... | |
ble_status_t | R_BLE_ANS_SetSup_un_alt_cat (const st_ble_ans_supported_unread_alert_category_t *p_value) |
Set Supported Unread Alert Category characteristic value to the local GATT database. More... | |
ble_status_t | R_BLE_ANS_GetSup_un_alt_cat (st_ble_ans_supported_unread_alert_category_t *p_value) |
Get Supported Unread Alert Category characteristic value from the local GATT database. More... | |
ble_status_t | R_BLE_ANS_NotifyUnread_alt_st (uint16_t conn_hdl, const st_ble_ans_unread_alert_status_t *p_value) |
Send notificatoin of Unread Alert Status characteristic value to the remote device. More... | |
ble_status_t | R_BLE_ANS_SetUnd_at_stCliCnfg (uint16_t conn_hdl, const uint16_t *p_value) |
Set Unread Alert Status cli cnfg descriptor value to the local GATT database. More... | |
ble_status_t | R_BLE_ANS_GetUnd_at_stCliCnfg (uint16_t conn_hdl, uint16_t *p_value) |
Get Unread Alert Status cli cnfg descriptor value from the local GATT database. More... | |
ble_status_t | R_BLE_ANS_Init (ble_servs_app_cb_t cb) |
Initialize Alert Notification Service service. More... | |
#define BLE_ANS_NEW_ALERT_TEXT_LEN (18) |
New Alert Text length.
#define BLE_ANS_COMMAND_NOT_SUPPORTED (BLE_ERR_GROUP_GATT | 0xA0) |
Command not supported error code.
#define BLE_ANS_PRV_WRITE_REQUEST_REJECTED (BLE_ERR_GROUP_GATT | 0xA1) |
Write Request Rejected error code.
Alert Notification Control Point Command ID enumeration.
Alert Notification Control Point Category ID enumeration.
enum e_ble_ans_char_idx_t |
Alert Notification Service characteristic Index.
enum e_ble_ans_event_t |
Alert Notification Service event type.
ble_status_t R_BLE_ANS_SetSup_nw_alt_cat | ( | const st_ble_ans_supported_new_alert_category_t * | p_value | ) |
Set Supported New Alert Category characteristic value to the local GATT database.
[in] | p_value | Characteristic value to set pointer to supported new alert category. |
ble_status_t R_BLE_ANS_GetSup_nw_alt_cat | ( | st_ble_ans_supported_new_alert_category_t * | p_value | ) |
Get Supported New Alert Category characteristic value from the local GATT database.
[out] | p_value | Pointer to Retrieved Supported new alert category characteristic value. |
ble_status_t R_BLE_ANS_NotifyNew_alert | ( | uint16_t | conn_hdl, |
const st_ble_ans_new_alert_t * | p_value | ||
) |
Send notificatoin of New Alert characteristic value to the remote device.
[in] | conn_hdl | Connection handle. |
[in] | p_value | Characteristic value to send pointer to new alert category. |
ble_status_t R_BLE_ANS_SetNew_alerttCliCnfg | ( | uint16_t | conn_hdl, |
const uint16_t * | p_value | ||
) |
Set New Alert cli cnfg descriptor value to the local GATT database.
[in] | conn_hdl | Connection handle. |
[in] | p_value | Descriptor value to set pointer to uint16_t. |
ble_status_t R_BLE_ANS_GetNew_alertCliCnfg | ( | uint16_t | conn_hdl, |
uint16_t * | p_value | ||
) |
Get New Alert cli cnfg descriptor value from the local GATT database.
[in] | conn_hdl | Connection handle. |
[out] | p_value | Output location for the acquired descriptor value. |
ble_status_t R_BLE_ANS_SetSup_un_alt_cat | ( | const st_ble_ans_supported_unread_alert_category_t * | p_value | ) |
Set Supported Unread Alert Category characteristic value to the local GATT database.
[in] | p_value | Characteristic value to set pointer to supported unread alert category. |
ble_status_t R_BLE_ANS_GetSup_un_alt_cat | ( | st_ble_ans_supported_unread_alert_category_t * | p_value | ) |
Get Supported Unread Alert Category characteristic value from the local GATT database.
[out] | p_value | Pointer to Retrieved Supported unread alert category characteristic value. |
ble_status_t R_BLE_ANS_NotifyUnread_alt_st | ( | uint16_t | conn_hdl, |
const st_ble_ans_unread_alert_status_t * | p_value | ||
) |
Send notificatoin of Unread Alert Status characteristic value to the remote device.
[in] | conn_hdl | Connection handle. |
[in] | p_value | pointer to unread alert Characteristic value to send . |
ble_status_t R_BLE_ANS_SetUnd_at_stCliCnfg | ( | uint16_t | conn_hdl, |
const uint16_t * | p_value | ||
) |
Set Unread Alert Status cli cnfg descriptor value to the local GATT database.
[in] | conn_hdl | Connection handle. |
[in] | p_value | Descriptor value to set pointer to uint16_t. |
ble_status_t R_BLE_ANS_GetUnd_at_stCliCnfg | ( | uint16_t | conn_hdl, |
uint16_t * | p_value | ||
) |
Get Unread Alert Status cli cnfg descriptor value from the local GATT database.
[in] | conn_hdl | Connection handle. |
[out] | p_value | Output location for the acquired descriptor value. |
ble_status_t R_BLE_ANS_Init | ( | ble_servs_app_cb_t | cb | ) |
Initialize Alert Notification Service service.
[in] | cb | Service callback. |