BLE_ANPS_SendNewAlert
C
uint16_t BLE_ANPS_SendNewAlert(uint16_t connHandle, uint8_t catId, uint8_t numAlert, uint16_t txtStrLen, const uint8_t *p_txtStr);
Description
Sends a new alert notification to a connected peer device.
Parameters
Parameter | Description |
---|---|
[in] connHandle | The connection handle. |
[in] catId | The category ID of the alert. Refer to ANPS category identifiers for possible values. |
[in] numAlert | The number of new alerts. |
[in] txtStrLen | The length of the text string information. Must be less than or equal to (MTU - 5). |
[in] p_txtStr | Pointer to the text string information. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully sent the new alert notification. |
MBA_RES_OOM | Internal memory allocation failure. |
MBA_RES_NO_RESOURCE | No available buffer to transmit the new alert notification. |
MBA_RES_INVALID_PARA | Invalid parameters. |