API unique to BLS designs configured as a GATT Client role.
A letter 'c' is appended to the API name: Cy_BLE_BLSC_
◆ Cy_BLE_BLSC_GetCharacteristicValue()
This function is used to read the characteristic value from the server identified by charIndex.
- Parameters
-
connHandle | The connection handle. |
charIndex | The index of the service characteristic of type cy_en_ble_bls_char_index_t. The valid values are,
|
- Returns
- A return value of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The request was sent 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 server is not established. |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed. |
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE | The peer device doesn't have the particular characteristic. |
- Events
- If execution is successful(return value = CY_BLE_SUCCESS) these events can appear:
If a BLS service-specific callback is registered (with Cy_BLE_BLS_RegisterAttrCallback):
Otherwise (if a BLS service-specific callback is not registered):
◆ Cy_BLE_BLSC_SetCharacteristicDescriptor()
Sends a request to set the characteristic descriptor of the specified Blood Pressure service characteristic to the server device.
Internally, a Write Request is sent to the GATT Server and on successful execution of the request on the server side, the following events can be generated:
- Parameters
-
connHandle | The BLE peer device connection handle. |
charIndex | The index of the service characteristic of type cy_en_ble_bls_char_index_t. The valid values are,
|
descrIndex | The index of the service characteristic descriptor of type cy_en_ble_bls_descr_index_t. The valid value is,
|
attrSize | The size of the characteristic descriptor value attribute. |
attrValue | The pointer to the characteristic descriptor value data that should be sent to the server device. |
- Returns
- A return value of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The request was sent 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_GATT_DB_INVALID_ATTR_HANDLE | The peer device doesn't have the particular characteristic. |
CY_BLE_ERROR_INVALID_STATE | The state is not valid. |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed. |
- Events
- If execution is successful(return value = CY_BLE_SUCCESS), the following events can appear:
If a BLS service-specific callback is registered with Cy_BLE_BLS_RegisterAttrCallback():
Otherwise (if the BLS service-specific callback is not registered):
◆ Cy_BLE_BLSC_GetCharacteristicDescriptor()
Sends a request to get the characteristic descriptor of the specified Blood Pressure service characteristic from the server device.
This function call can result in the generation of the following events based on the response from the server device:
- Parameters
-
connHandle | The BLE peer device connection handle. |
charIndex | The index of the service characteristic of type cy_en_ble_bls_char_index_t. The valid values are,
|
descrIndex | The index of the service characteristic descriptor of type cy_en_ble_bls_descr_index_t. The valid value is,
|
- Returns
- A return value of type cy_en_ble_api_result_t.
Error Codes | Description |
CY_BLE_SUCCESS | The request was sent successfully. |
CY_BLE_ERROR_INVALID_PARAMETER | Validation of the input parameter failed. |
CY_BLE_ERROR_INVALID_OPERATION | This operation is not permitted on the specified attribute. |
CY_BLE_ERROR_INVALID_STATE | The state is not valid. |
CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed. |
CY_BLE_ERROR_GATT_DB_INVALID_ATTR_HANDLE | The peer device doesn't have the particular descriptor. |
- Events
- If execution is successful (return value = CY_BLE_SUCCESS), these events can appear:
If a BLS service-specific callback is registered with Cy_BLE_BLS_RegisterAttrCallback():
Otherwise (if a BLS service-specific callback is not registered):