Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Public Types | Public Member Functions | Static Public Member Functions | List of all members
direct_bt::EInfoReport Class Reference

Collection of 'Extended Advertising Data' (EAD), 'Advertising Data' (AD) or 'Extended Inquiry Response' (EIR) information. More...

#include <BTTypes0.hpp>

Collaboration diagram for direct_bt::EInfoReport:

Public Types

enum  Source : int {
  Source::NA, Source::AD, Source::EAD, Source::EIR,
  Source::EIR_MGMT
}
 

Public Member Functions

 EInfoReport () noexcept
 
void setSource (Source s) noexcept
 
void setTimestamp (uint64_t ts) noexcept
 
void setEvtType (AD_PDU_Type et) noexcept
 
void setExtEvtType (EAD_Event_Type eadt) noexcept
 
void setADAddressType (uint8_t adAddressType) noexcept
 
void setAddressType (BDAddressType at) noexcept
 
void setAddress (EUI48 const &a) noexcept
 
void setRSSI (int8_t v) noexcept
 
int read_data (uint8_t const *data, uint8_t const data_length) noexcept
 Reads the Extended Inquiry Response (EIR) or (Extended) Advertising Data (EAD or AD) segments and returns the number of parsed data segments;. More...
 
Source getSource () const noexcept
 
uint64_t getTimestamp () const noexcept
 
bool isSet (EIRDataType bit) const noexcept
 
EIRDataType getEIRDataMask () const noexcept
 
AD_PDU_Type getEvtType () const noexcept
 
EAD_Event_Type getExtEvtType () const noexcept
 
GAPFlags getFlags () const noexcept
 
uint8_t getADAddressType () const noexcept
 
BDAddressType getAddressType () const noexcept
 
EUI48 const & getAddress () const noexcept
 
std::string const & getName () const noexcept
 
std::string const & getShortName () const noexcept
 
int8_t getRSSI () const noexcept
 
int8_t getTxPower () const noexcept
 
std::shared_ptr< ManufactureSpecificDatagetManufactureSpecificData () const noexcept
 
jau::darray< std::shared_ptr< uuid_t > > getServices () const noexcept
 
uint32_t getDeviceClass () const noexcept
 
AppearanceCat getAppearance () const noexcept
 
const TROOctetsgetHash () const noexcept
 
const TROOctetsgetRandomizer () const noexcept
 
uint16_t getDeviceIDSource () const noexcept
 
uint16_t getDeviceIDVendor () const noexcept
 
uint16_t getDeviceIDProduct () const noexcept
 
uint16_t getDeviceIDVersion () const noexcept
 
std::string getDeviceIDModalias () const noexcept
 
std::string eirDataMaskToString () const noexcept
 
std::string toString (const bool includeServices=true) const noexcept
 

Static Public Member Functions

static jau::darray< std::unique_ptr< EInfoReport > > read_ext_ad_reports (uint8_t const *data, jau::nsize_t const data_length) noexcept
 Reads a complete Advertising Data (AD) Report and returns the number of AD reports in form of a sharable list of EInfoReport;. More...
 

Detailed Description

Collection of 'Extended Advertising Data' (EAD), 'Advertising Data' (AD) or 'Extended Inquiry Response' (EIR) information.

References:

Definition at line 802 of file BTTypes0.hpp.

Member Enumeration Documentation

◆ Source

enum direct_bt::EInfoReport::Source : int
strong
Enumerator
NA 

not available

AD 
EAD 
EIR 

Extended Inquiry Response (EIR)

EIR_MGMT 

Extended Inquiry Response (EIR) from Kernel Mgmt.

Definition at line 805 of file BTTypes0.hpp.

Constructor & Destructor Documentation

◆ EInfoReport()

direct_bt::EInfoReport::EInfoReport ( )
inlinenoexcept

Definition at line 862 of file BTTypes0.hpp.

Member Function Documentation

◆ eirDataMaskToString()

std::string EInfoReport::eirDataMaskToString ( ) const
noexcept

Definition at line 908 of file BTTypes0.cpp.

Here is the call graph for this function:

◆ getADAddressType()

uint8_t direct_bt::EInfoReport::getADAddressType ( ) const
inlinenoexcept

Definition at line 939 of file BTTypes0.hpp.

◆ getAddress()

EUI48 const& direct_bt::EInfoReport::getAddress ( ) const
inlinenoexcept

Definition at line 941 of file BTTypes0.hpp.

Here is the caller graph for this function:

◆ getAddressType()

BDAddressType direct_bt::EInfoReport::getAddressType ( ) const
inlinenoexcept

Definition at line 940 of file BTTypes0.hpp.

Here is the caller graph for this function:

◆ getAppearance()

AppearanceCat direct_bt::EInfoReport::getAppearance ( ) const
inlinenoexcept

Definition at line 951 of file BTTypes0.hpp.

◆ getDeviceClass()

uint32_t direct_bt::EInfoReport::getDeviceClass ( ) const
inlinenoexcept

Definition at line 950 of file BTTypes0.hpp.

◆ getDeviceIDModalias()

std::string EInfoReport::getDeviceIDModalias ( ) const
noexcept

Definition at line 940 of file BTTypes0.cpp.

◆ getDeviceIDProduct()

uint16_t direct_bt::EInfoReport::getDeviceIDProduct ( ) const
inlinenoexcept

Definition at line 956 of file BTTypes0.hpp.

◆ getDeviceIDSource()

uint16_t direct_bt::EInfoReport::getDeviceIDSource ( ) const
inlinenoexcept

Definition at line 954 of file BTTypes0.hpp.

◆ getDeviceIDVendor()

uint16_t direct_bt::EInfoReport::getDeviceIDVendor ( ) const
inlinenoexcept

Definition at line 955 of file BTTypes0.hpp.

◆ getDeviceIDVersion()

uint16_t direct_bt::EInfoReport::getDeviceIDVersion ( ) const
inlinenoexcept

Definition at line 957 of file BTTypes0.hpp.

◆ getEIRDataMask()

EIRDataType direct_bt::EInfoReport::getEIRDataMask ( ) const
inlinenoexcept

Definition at line 934 of file BTTypes0.hpp.

◆ getEvtType()

AD_PDU_Type direct_bt::EInfoReport::getEvtType ( ) const
inlinenoexcept

Definition at line 936 of file BTTypes0.hpp.

◆ getExtEvtType()

EAD_Event_Type direct_bt::EInfoReport::getExtEvtType ( ) const
inlinenoexcept

Definition at line 937 of file BTTypes0.hpp.

◆ getFlags()

GAPFlags direct_bt::EInfoReport::getFlags ( ) const
inlinenoexcept

Definition at line 938 of file BTTypes0.hpp.

◆ getHash()

const TROOctets& direct_bt::EInfoReport::getHash ( ) const
inlinenoexcept

Definition at line 952 of file BTTypes0.hpp.

◆ getManufactureSpecificData()

std::shared_ptr<ManufactureSpecificData> direct_bt::EInfoReport::getManufactureSpecificData ( ) const
inlinenoexcept

Definition at line 947 of file BTTypes0.hpp.

◆ getName()

std::string const& direct_bt::EInfoReport::getName ( ) const
inlinenoexcept

Definition at line 942 of file BTTypes0.hpp.

◆ getRandomizer()

const TROOctets& direct_bt::EInfoReport::getRandomizer ( ) const
inlinenoexcept

Definition at line 953 of file BTTypes0.hpp.

◆ getRSSI()

int8_t direct_bt::EInfoReport::getRSSI ( ) const
inlinenoexcept

Definition at line 944 of file BTTypes0.hpp.

◆ getServices()

jau::darray<std::shared_ptr<uuid_t> > direct_bt::EInfoReport::getServices ( ) const
inlinenoexcept

Definition at line 948 of file BTTypes0.hpp.

◆ getShortName()

std::string const& direct_bt::EInfoReport::getShortName ( ) const
inlinenoexcept

Definition at line 943 of file BTTypes0.hpp.

◆ getSource()

Source direct_bt::EInfoReport::getSource ( ) const
inlinenoexcept

Definition at line 931 of file BTTypes0.hpp.

◆ getTimestamp()

uint64_t direct_bt::EInfoReport::getTimestamp ( ) const
inlinenoexcept

Definition at line 932 of file BTTypes0.hpp.

◆ getTxPower()

int8_t direct_bt::EInfoReport::getTxPower ( ) const
inlinenoexcept

Definition at line 945 of file BTTypes0.hpp.

◆ isSet()

bool direct_bt::EInfoReport::isSet ( EIRDataType  bit) const
inlinenoexcept

Definition at line 933 of file BTTypes0.hpp.

◆ read_data()

int EInfoReport::read_data ( uint8_t const *  data,
uint8_t const  data_length 
)
noexcept

Reads the Extended Inquiry Response (EIR) or (Extended) Advertising Data (EAD or AD) segments and returns the number of parsed data segments;.

AD as well as EIR information is passed in little endian order in the same fashion data block:

a -> {
            uint8_t len
            uint8_t type
            uint8_t data[len-1];
        }
b -> next block = a + 1 + len;

References:

  • BT Core Spec v5.2: Vol 3, Part C, 11 ADVERTISING AND SCAN RESPONSE DATA FORMAT
  • BT Core Spec v5.2: Vol 3, Part C, 8 EXTENDED INQUIRY RESPONSE DATA FORMAT
  • BT Core Spec Supplement v9, Part A: Section 1 + 2 Examples, p25..
  • Assigned Numbers - Generic Access Profile

https://www.bluetooth.com/specifications/archived-specifications/

Definition at line 993 of file BTTypes0.cpp.

Here is the call graph for this function:

◆ read_ext_ad_reports()

jau::darray< std::unique_ptr< EInfoReport > > EInfoReport::read_ext_ad_reports ( uint8_t const *  data,
jau::nsize_t const  data_length 
)
staticnoexcept

Reads a complete Advertising Data (AD) Report and returns the number of AD reports in form of a sharable list of EInfoReport;.

   BT Core Spec v5.2: Vol 4, Part E, 7.7.65.2 LE Advertising Report event
   BT Core Spec v5.2: Vol 3, Part C, 11 ADVERTISING AND SCAN RESPONSE DATA FORMAT
   BT Core Spec v5.2: Vol 3, Part C, 8  EXTENDED INQUIRY RESPONSE DATA FORMAT
   
   https://www.bluetooth.com/specifications/archived-specifications/
   
 */
static jau::darray<std::unique_ptr<EInfoReport>> read_ad_reports(uint8_t const * data, jau::nsize_t const data_length) noexcept;
/**
   Reads a complete Extended Advertising Data (AD) Report
   and returns the number of AD reports in form of a sharable list of EInfoReport;
   
   BT Core Spec v5.2: Vol 4, Part E, 7.7.65.13 LE Extended Advertising Report event
   BT Core Spec v5.2: Vol 3, Part C, 11 ADVERTISING AND SCAN RESPONSE DATA FORMAT
   BT Core Spec v5.2: Vol 3, Part C, 8  EXTENDED INQUIRY RESPONSE DATA FORMAT
   
   https://www.bluetooth.com/specifications/archived-specifications/
   

Definition at line 1183 of file BTTypes0.cpp.

Here is the call graph for this function:

◆ setADAddressType()

void EInfoReport::setADAddressType ( uint8_t  adAddressType)
noexcept

Definition at line 847 of file BTTypes0.cpp.

◆ setAddress()

void direct_bt::EInfoReport::setAddress ( EUI48 const &  a)
inlinenoexcept

Definition at line 870 of file BTTypes0.hpp.

◆ setAddressType()

void EInfoReport::setAddressType ( BDAddressType  at)
noexcept

Definition at line 859 of file BTTypes0.cpp.

◆ setEvtType()

void direct_bt::EInfoReport::setEvtType ( AD_PDU_Type  et)
inlinenoexcept

Definition at line 866 of file BTTypes0.hpp.

◆ setExtEvtType()

void direct_bt::EInfoReport::setExtEvtType ( EAD_Event_Type  eadt)
inlinenoexcept

Definition at line 867 of file BTTypes0.hpp.

◆ setRSSI()

void direct_bt::EInfoReport::setRSSI ( int8_t  v)
inlinenoexcept

Definition at line 871 of file BTTypes0.hpp.

◆ setSource()

void direct_bt::EInfoReport::setSource ( Source  s)
inlinenoexcept

Definition at line 864 of file BTTypes0.hpp.

◆ setTimestamp()

void direct_bt::EInfoReport::setTimestamp ( uint64_t  ts)
inlinenoexcept

Definition at line 865 of file BTTypes0.hpp.

◆ toString()

std::string EInfoReport::toString ( const bool  includeServices = true) const
noexcept

Definition at line 911 of file BTTypes0.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: