|
Sentinel
|
Class to handle Bluetooth client operations. More...
#include <bluetooth.h>
Public Member Functions | |
| BluetoothClient () | |
| Construct a new Bluetooth Client object. | |
| void | begin () |
| Initialize the Bluetooth client. | |
| void | loop () |
| Loop function for the Bluetooth client. | |
| uint8_t | getHeartRate () const |
| Get the heart rate value. | |
| void | onConnect (NimBLEClient *pClient) override |
| Callback function for when the client connects to a device. | |
| void | onDisconnect (NimBLEClient *pClient, int reason) override |
| Callback function for when the client disconnects from a device. | |
| void | setConnectFlag (const NimBLEAdvertisedDevice *device) |
| Set the connect flag for the Bluetooth client. | |
Class to handle Bluetooth client operations.
| void BluetoothClient::begin | ( | ) |
Initialize the Bluetooth client.
This function initializes the Bluetooth client and starts scanning for devices.
| uint8_t BluetoothClient::getHeartRate | ( | ) | const |
Get the heart rate value.
This function returns the current heart rate value.
| void BluetoothClient::loop | ( | ) |
Loop function for the Bluetooth client.
This function checks if a connection is needed and handles the connection process.
|
override |
Callback function for when the client connects to a device.
| pClient | The connected client |
This function is called when the client successfully connects to a device.
|
override |
Callback function for when the client disconnects from a device.
| pClient | The disconnected client |
| reason | The reason for disconnection |
This function is called when the client disconnects from a device.
| void BluetoothClient::setConnectFlag | ( | const NimBLEAdvertisedDevice * | device | ) |
Set the connect flag for the Bluetooth client.
| device | The advertised device to connect to |
This function sets the connect flag and stores the advertised device.