|
Bluenet
5.7.0
Bluenet, firmware for nRF52 smart home devices
|
Class that parses advertisements for background broadcasts. More...
#include <cs_BackgroundAdvHandler.h>


Public Member Functions | |
| void | handleEvent (event_t &event) |
| Handle events. More... | |
Public Member Functions inherited from EventListener | |
| EventListener () | |
| virtual | ~EventListener () |
| unregisters the listener. More... | |
| virtual void | handleEvent (event_t &event)=0 |
| Handle events. More... | |
| void | listen () |
| Registers this with the EventDispatcher. More... | |
Static Public Member Functions | |
| static BackgroundAdvertisementHandler & | getInstance () |
Private Member Functions | |
| TYPIFY (CONFIG_SPHERE_ID) _sphereId=0 | |
| Own sphere id. More... | |
| BackgroundAdvertisementHandler () | |
| void | parseAdvertisement (scanned_device_t *scannedDevice) |
| Parse, decrypt, and validate an advertisement. More... | |
| void | parseServicesAdvertisement (scanned_device_t *scannedDevice) |
| Parse an advertisement with incomplete list of service UUIDs. More... | |
| void | handleBackgroundAdvertisement (adv_background_t *backgroundAdvertisement) |
| Handle a validated background advertisement. More... | |
| int8_t | getAdjustedRssi (int16_t rssi, int16_t rssiOffset) |
| Return the adjusted RSSI value, given the actual RSSI and the offset from the background advertisement payload. More... | |
Private Attributes | |
| uint8_t | _uuidMap [256] |
| Map 16 bit service UUIDs to bit positions in the 128b bitmask. More... | |
| uint64_t | _lastBitmask [2] = {0} |
| Store the last mapped bitmask. More... | |
| uint8_t | _lastMacAddress [MAC_ADDRESS_LEN] = {0} |
| Store the address of the last bitmask. More... | |
Class that parses advertisements for background broadcasts.
Receives data from either EVT_DEVICE_SCANNED, or EVT_ADV_BACKGROUND. Parses and decrypts. Sends event EVT_ADV_BACKGROUND_PARSED.
|
private |
Return the adjusted RSSI value, given the actual RSSI and the offset from the background advertisement payload.
|
inlinestatic |
|
private |
Handle a validated background advertisement.
Adjusts RSSI, and send event.
|
virtual |
Handle events.
This method is overloaded by all classes that derive from EventListener. They can receive an event_t struct and act upon it. These events are dispatched by the EventDispatcher.
Implements EventListener.
|
private |
Parse, decrypt, and validate an advertisement.
|
private |
Parse an advertisement with incomplete list of service UUIDs.
These get mapped to a bitmask, and stored together with the mac address.
|
privatepure virtual |
Own sphere id.
|
private |
Store the last mapped bitmask.
|
private |
Store the address of the last bitmask.
|
private |
Map 16 bit service UUIDs to bit positions in the 128b bitmask.