#include <BLEHub.h>
◆ BLEHub()
◆ attachCharacteristic()
bool BLEHub::attachCharacteristic |
( |
NimBLEUUID | serviceUUID, |
|
|
NimBLEUUID | characteristicUUID ) |
|
protected |
◆ BlinkLights()
void BLEHub::BlinkLights |
( |
int | durationInMs | ) |
|
◆ Connect()
bool BLEHub::Connect |
( |
const uint8_t | watchdogTimeOutInTensOfSeconds | ) |
|
Check if we have a client we should reuse first
Special case when we already know this device, we send false as the second argument in connect() to prevent refreshing the service database. This saves considerable time and power.
We don't already have a client that knows this device, we will check for a client that is disconnected that we can use.
No client to reuse? Create a new one.
Set how long we are willing to wait for the connection to complete (seconds)
Created a client but failed to connect, don't need to keep it as it has no data
◆ connected()
void BLEHub::connected |
( |
| ) |
|
|
protected |
◆ disconnected()
void BLEHub::disconnected |
( |
| ) |
|
|
protected |
◆ Drive()
void BLEHub::Drive |
( |
const int16_t | minPwrPerc, |
|
|
const int16_t | pwrPerc ) |
◆ driveTaskImpl()
void BLEHub::driveTaskImpl |
( |
void * | _this | ) |
|
|
staticprotected |
◆ DriveTaskLoop()
virtual void BLEHub::DriveTaskLoop |
( |
| ) |
|
|
pure virtual |
◆ dumpPData()
void BLEHub::dumpPData |
( |
uint8_t * | pData, |
|
|
size_t | length ) |
|
protected |
◆ Execute()
◆ findControllerByChannel()
◆ GetAddress()
NimBLEAddress BLEHub::GetAddress |
( |
| ) |
|
◆ GetCurrentDrivePwrPerc()
int16_t BLEHub::GetCurrentDrivePwrPerc |
( |
| ) |
|
◆ GetRawAddress()
std::string BLEHub::GetRawAddress |
( |
| ) |
|
◆ getRawChannelPwrForController()
◆ getRawLedColorForController()
◆ initChannelControllers()
void BLEHub::initChannelControllers |
( |
| ) |
|
|
protected |
◆ IsConnected()
bool BLEHub::IsConnected |
( |
| ) |
|
◆ IsDiscovered()
bool BLEHub::IsDiscovered |
( |
| ) |
|
◆ MapPwrPercToRaw()
virtual int16_t BLEHub::MapPwrPercToRaw |
( |
int | pwrPerc | ) |
|
|
pure virtual |
◆ NotifyCallback()
virtual void BLEHub::NotifyCallback |
( |
NimBLERemoteCharacteristic * | pBLERemoteCharacteristic, |
|
|
uint8_t * | pData, |
|
|
size_t | length, |
|
|
bool | isNotify ) |
|
pure virtual |
◆ SetConnectCallback()
void BLEHub::SetConnectCallback |
( |
std::function< void(bool)> | callback | ) |
|
◆ SetEmergencyBrake()
void BLEHub::SetEmergencyBrake |
( |
const bool | enabled | ) |
|
◆ SetHubLedColor()
◆ SetManualBrake()
void BLEHub::SetManualBrake |
( |
const bool | enabled | ) |
|
◆ setTargetPwrPercByAttachedDevice()
void BLEHub::setTargetPwrPercByAttachedDevice |
( |
DeviceType | device, |
|
|
int16_t | minPwrPerc, |
|
|
int16_t | pwrPerc ) |
|
protected |
◆ SetWatchdogTimeout()
virtual bool BLEHub::SetWatchdogTimeout |
( |
const uint8_t | watchdogTimeOutInTensOfSeconds | ) |
|
|
pure virtual |
◆ startDriveTask()
bool BLEHub::startDriveTask |
( |
| ) |
|
|
protected |
◆ BLEClientCallback
◆ BLEDeviceCallbacks
◆ _advertisedDevice
NimBLEAdvertisedDevice* BLEHub::_advertisedDevice |
|
protected |
◆ _advertisedDeviceCallback
NimBLEAdvertisedDeviceCallbacks* BLEHub::_advertisedDeviceCallback |
|
protected |
◆ _blinkLights
bool BLEHub::_blinkLights |
|
protected |
◆ _blinkUntil
ulong BLEHub::_blinkUntil |
|
protected |
◆ _channelControllers
◆ _clientCallback
NimBLEClientCallbacks* BLEHub::_clientCallback |
|
protected |
◆ _config
◆ _driveTaskHandle
TaskHandle_t BLEHub::_driveTaskHandle |
|
protected |
◆ _ebrake
◆ _hub
NimBLEClient* BLEHub::_hub |
|
protected |
◆ _isConnected
bool BLEHub::_isConnected |
|
protected |
◆ _isDiscovered
bool BLEHub::_isDiscovered |
|
protected |
◆ _mbrake
◆ _onConnectionChangedCallback
std::function<void(bool)> BLEHub::_onConnectionChangedCallback |
|
protected |
◆ _remoteControlCharacteristic
NimBLERemoteCharacteristic* BLEHub::_remoteControlCharacteristic |
|
protected |
◆ _remoteControlService
NimBLERemoteService* BLEHub::_remoteControlService |
|
protected |
◆ _watchdogTimeOutInTensOfSeconds
uint16_t BLEHub::_watchdogTimeOutInTensOfSeconds |
|
protected |
The documentation for this class was generated from the following files:
- /home/hilbert/src/MattzoStuff/MattzoControllers/src/MTC4BT/include/BLEHub.h
- /home/hilbert/src/MattzoStuff/MattzoControllers/src/MTC4BT/src/BLEHub.cpp