Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
GenericAccessService Struct Reference
Manage state of the GAP service exposed by the GATT server. More...
#include <GenericAccessService.h>
Public Member Functions | |
GenericAccessService () | |
Empty, default, constructor. | |
virtual | ~GenericAccessService () |
Virtual destructor. | |
virtual ble_error_t | get_device_name_length (uint8_t &length)=0 |
Acquire the length of the device name. | |
virtual ble_error_t | get_device_name (Span< uint8_t > &array)=0 |
Get the current device name. | |
virtual ble_error_t | set_device_name (const uint8_t *device_name)=0 |
Set the value of the device name characteristic exposed by the GAP GATT service. | |
virtual ble_error_t | get_appearance (GapAdvertisingData::Appearance &appearance)=0 |
Acquire the appearance stored in the appearance characteristic of the GAP GATT service. | |
virtual ble_error_t | set_appearance (GapAdvertisingData::Appearance appearance)=0 |
Set the value of the appearance characteristic of the GAP GATT service. | |
virtual ble_error_t | get_peripheral_prefered_connection_parameters (::Gap::ConnectionParams_t ¶meters)=0 |
Acquire the peripheral prefered connection parameters stored in the GAP GATT service. | |
virtual ble_error_t | set_peripheral_prefered_connection_parameters (const ::Gap::ConnectionParams_t ¶meters)=0 |
set the value of the peripheral prefered connection parameters stored in the GAP GATT service. |
Detailed Description
Manage state of the GAP service exposed by the GATT server.
- See also:
- Bluetooth 4.2 Vol 3 PartC: 12 - GAP service and characteristics for GATT Server.
Definition at line 35 of file GenericAccessService.h.
Constructor & Destructor Documentation
Empty, default, constructor.
Definition at line 40 of file GenericAccessService.h.
virtual ~GenericAccessService | ( | ) | [virtual] |
Virtual destructor.
Definition at line 45 of file GenericAccessService.h.
Member Function Documentation
virtual ble_error_t get_appearance | ( | GapAdvertisingData::Appearance & | appearance ) | [pure virtual] |
Acquire the appearance stored in the appearance characteristic of the GAP GATT service.
- Parameters:
-
appearance,: If the call succeed will contain the value of the appearance characteristic.
- Returns:
- BLE_ERROR_NONE in case of success or the appropriate error code otherwise.
- See also:
- Bluetooth 4.2 Vol 3 PartC: 12.2 - Appearance Characteristic
virtual ble_error_t get_device_name | ( | Span< uint8_t > & | array ) | [pure virtual] |
Get the current device name.
The result is stored in the array pass in input if the operation succeed. Prior to this call the length of the device name can be acquired with a call to get_device_name_length.
- Parameters:
-
The array which will host the device name
- Returns:
- BLE_ERROR_NONE in case of success or the appropriate error code otherwise.
- See also:
- Bluetooth 4.2 Vol 3 PartC: 12.1 - Device Name Characteristic
virtual ble_error_t get_device_name_length | ( | uint8_t & | length ) | [pure virtual] |
Acquire the length of the device name.
The length can range from 0 (no device name) to 248 octets
- Parameters:
-
length The length of the device name currently stored in the GAP service.
- Returns:
- BLE_ERROR_NONE in case of success or the appropriate error code otherwise.
- See also:
- Bluetooth 4.2 Vol 3 PartC: 12.1 - Device Name Characteristic
virtual ble_error_t get_peripheral_prefered_connection_parameters | ( | ::Gap::ConnectionParams_t & | parameters ) | [pure virtual] |
Acquire the peripheral prefered connection parameters stored in the GAP GATT service.
- Parameters:
-
parameters,: If the call succeed will contain the value of the peripheral prefered connection parameters characteristic.
- Returns:
- BLE_ERROR_NONE in case of success or the appropriate error code otherwise.
- See also:
- Bluetooth 4.2 Vol 3 PartC: 12.3 - Peripheral Preferred Connection Parameters Characteristic
virtual ble_error_t set_appearance | ( | GapAdvertisingData::Appearance | appearance ) | [pure virtual] |
Set the value of the appearance characteristic of the GAP GATT service.
- Parameters:
-
appearance,: The appearance to set.
- Returns:
- BLE_ERROR_NONE in case of success or the appropriate error code otherwise.
- See also:
- Bluetooth 4.2 Vol 3 PartC: 12.2 - Appearance Characteristic
virtual ble_error_t set_device_name | ( | const uint8_t * | device_name ) | [pure virtual] |
Set the value of the device name characteristic exposed by the GAP GATT service.
- Parameters:
-
device_name The name of the device. If NULL the device name value has a length of 0.
- Returns:
- BLE_ERROR_NONE in case of success or the appropriate error code otherwise.
- See also:
- Bluetooth 4.2 Vol 3 PartC: 12.1 - Device Name Characteristic
virtual ble_error_t set_peripheral_prefered_connection_parameters | ( | const ::Gap::ConnectionParams_t & | parameters ) | [pure virtual] |
set the value of the peripheral prefered connection parameters stored in the GAP GATT service.
- Parameters:
-
parameters,: If the peripheral prefered connection parameters to set.
- Returns:
- BLE_ERROR_NONE in case of success or the appropriate error code otherwise.
- See also:
- Bluetooth 4.2 Vol 3 PartC: 12.3 - Peripheral Preferred Connection Parameters Characteristic
Generated on Tue Jul 12 2022 13:55:41 by
