Data Gator
Hardware and software documentation for the Data Gator project.
Loading...
Searching...
No Matches
ble_util.hpp File Reference

Utilities such as callbacks for parsing bluetooth packets. More...

#include <NimBLEAdvertisedDevice.h>
#include <BLESensor.hpp>
#include <MinewS1.hpp>
#include <KKM_K6P.hpp>
#include <logger.hpp>
Include dependency graph for ble_util.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ScanCallbacks
 Callbacks for BLE packets. More...
 

Detailed Description

Utilities such as callbacks for parsing bluetooth packets.

Basic Functional Summary

The callback onResult() receives data from advertising sensors and then checks if that packet belongs to a known/supported sensor. If so, then the data is parsed and logged using the logging utils in logger.hpp.

Integration

All BLE supported BLE sensors should be integrated with their own class which inherits from BLESensor.hpp. The class should also implement a function <sensor class>.advertisedDeviceIs<sensor type>(dev) which parses the data packet and returns true if identified as an instance of that sensor type.

Author
Garrett Wells
Date
2023