CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
BleAdvParser.cpp File Reference
#include "cdc_hal/IBluetoothController.h"
#include <cstring>

Go to the source code of this file.

Namespaces

namespace  cdc
namespace  cdc::hal
namespace  cdc::hal::BleAdvParser

Functions

template<typename Callback>
static bool cdc::hal::BleAdvParser::walkAdStructures (const uint8_t *advData, uint8_t len, Callback callback)
 Iterates over AD structures and invokes a callback for each structure.
bool cdc::hal::BleAdvParser::findManufacturerData (const uint8_t *advData, uint8_t len, uint16_t *companyId, const uint8_t **data, uint8_t *dataLen)
 Extracts manufacturer-specific AD payload and company identifier.
bool cdc::hal::BleAdvParser::findServiceUuid128 (const uint8_t *advData, uint8_t len, const uint8_t uuid128[16])
 Checks whether a specific 128-bit service UUID is present in AD structures.
bool cdc::hal::BleAdvParser::findName (const uint8_t *advData, uint8_t len, char *name, uint8_t nameMaxLen)
 Extracts local device name from advertising data.

Variables

static constexpr uint8_t cdc::hal::BleAdvParser::AD_TYPE_SHORTENED_NAME = 0x08
 AD type constants from BLE Core Spec Supplement, Part A.
static constexpr uint8_t cdc::hal::BleAdvParser::AD_TYPE_COMPLETE_NAME = 0x09
static constexpr uint8_t cdc::hal::BleAdvParser::AD_TYPE_INCOMPLETE_UUID128 = 0x06
static constexpr uint8_t cdc::hal::BleAdvParser::AD_TYPE_COMPLETE_UUID128 = 0x07
static constexpr uint8_t cdc::hal::BleAdvParser::AD_TYPE_MANUFACTURER_SPECIFIC = 0xFF
static constexpr uint8_t cdc::hal::BleAdvParser::UUID128_SIZE = 16
static constexpr uint8_t cdc::hal::BleAdvParser::COMPANY_ID_SIZE = 2