API unique to TPS designs configured as a GATT Server role.
A letter 's' is appended to the API name: Cy_BLE_TPSS_
|
cy_en_ble_api_result_t | Cy_BLE_TPSS_SetCharacteristicValue (cy_en_ble_tps_char_index_t charIndex, uint8_t attrSize, int8_t *attrValue) |
| Sets characteristic value of the Tx Power service, which is identified by charIndex. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_TPSS_GetCharacteristicValue (cy_en_ble_tps_char_index_t charIndex, uint8_t attrSize, int8_t *attrValue) |
| Gets characteristic value of the Tx Power service, which is identified by charIndex. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_TPSS_GetCharacteristicDescriptor (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_tps_char_index_t charIndex, cy_en_ble_tps_char_descriptors_t descrIndex, uint8_t attrSize, uint8_t *attrValue) |
| Gets characteristic descriptor of specified characteristic of the Tx Power service. More...
|
|
cy_en_ble_api_result_t | Cy_BLE_TPSS_SendNotification (cy_stc_ble_conn_handle_t connHandle, cy_en_ble_tps_char_index_t charIndex, uint8_t attrSize, int8_t *attrValue) |
| Sends a notification with the characteristic value, as specified by charIndex, to the client device. More...
|
|
◆ Cy_BLE_TPSS_SetCharacteristicValue()
Sets characteristic value of the Tx Power service, which is identified by charIndex.
- Parameters
-
charIndex | The index of the service characteristic. |
attrSize | The size of the characteristic value attribute. |
attrValue | The pointer to the characteristic value data that should be stored in the GATT database. |
- Returns
- A return value of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The request was handled successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | Validation of the input parameter failed. |
◆ Cy_BLE_TPSS_GetCharacteristicValue()
Gets characteristic value of the Tx Power service, which is identified by charIndex.
- Parameters
-
charIndex | The index of the Tx Power characteristic. |
attrSize | The size of the Tx Power characteristic value attribute. |
attrValue | The pointer to the location where Tx Power characteristic value data should be stored. |
- Returns
- A return value of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The request was handled successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | Validation of the input parameter failed. |
◆ Cy_BLE_TPSS_GetCharacteristicDescriptor()
Gets characteristic descriptor of specified characteristic of the Tx Power service.
- Parameters
-
connHandle | The connection handle. |
charIndex | The index of the characteristic. |
descrIndex | The index of the descriptor. |
attrSize | The size of the characteristic value attribute. |
attrValue | The pointer to the location where characteristic descriptor value data should be stored. |
- Returns
- A return value of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The request was handled successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | Validation of the input parameter failed. |
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE | Optional descriptor is absent. |
◆ Cy_BLE_TPSS_SendNotification()
Sends a notification with the characteristic value, as specified by charIndex, to the client device.
On enabling notification successfully for a service characteristic it sends out a 'Handle Value Notification', which results in CY_BLE_EVT_TPSC_NOTIFICATION event at the GATT Client's end.
- Parameters
-
connHandle | The connection handle. |
charIndex | The index of the service characteristic. |
attrSize | The size of the characteristic value attribute. |
attrValue | The pointer to the characteristic value data that should be sent to the client's device. |
- Returns
- A return value of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The request was handled successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | Validation of the input parameter failed. |
CY_BLE_ERROR_INVALID_OPERATION | Operation is invalid for this characteristic. |
CY_BLE_ERROR_INVALID_STATE | Connection with the client is not established. |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed. |
CY_BLE_ERROR_NTF_DISABLED | Notification is not enabled by the client. |