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

BT Core Spec v5.2: Vol 4, Part E HCI: 5.4.4 HCI Event packet. More...

#include <HCITypes.hpp>

Inheritance diagram for direct_bt::HCIEvent:
Collaboration diagram for direct_bt::HCIEvent:

Public Member Functions

 HCIEvent (const uint8_t *buffer, const jau::nsize_t buffer_len, const jau::nsize_t exp_param_size)
 Persistent memory, w/ ownership . More...
 
 HCIEvent (const HCIEventType evt, const jau::nsize_t param_size=0)
 Enabling manual construction of event without given value. More...
 
 HCIEvent (const HCIEventType evt, const uint8_t *param, const jau::nsize_t param_size)
 Enabling manual construction of event with given value. More...
 
virtual ~HCIEvent () noexcept
 
uint64_t getTimestamp () const noexcept
 
constexpr HCIEventType getEventType () const noexcept
 
constexpr bool isEvent (HCIEventType t) const noexcept
 
virtual HCIMetaEventType getMetaEventType () const noexcept
 The meta subevent type. More...
 
bool isMetaEvent (HCIMetaEventType t) const noexcept
 
virtual jau::nsize_t getParamSize () const noexcept
 
virtual const uint8_t * getParam () const noexcept
 
virtual bool validate (const HCICommand &cmd) const noexcept
 
- Public Member Functions inherited from direct_bt::HCIPacket
 HCIPacket (const HCIPacketType type, const jau::nsize_t total_packet_size)
 
 HCIPacket (const uint8_t *packet_data, const jau::nsize_t total_packet_size)
 Persistent memory, w/ ownership . More...
 
virtual ~HCIPacket () noexcept
 
constexpr jau::nsize_t getTotalSize () const noexcept
 
TROOctetsgetPDU () noexcept
 Return the underlying octets read only. More...
 
HCIPacketType getPacketType () noexcept
 
std::string toString () const noexcept
 

Static Public Member Functions

static std::unique_ptr< HCIEventgetSpecialized (const uint8_t *buffer, jau::nsize_t const buffer_size) noexcept
 Return a newly created specialized instance pointer to base class. More...
 
- Static Public Member Functions inherited from direct_bt::HCIPacket
template<class T >
static T * clone (const T &source) noexcept
 Clone template for convenience, based on derived class's copy-constructor. More...
 

Protected Member Functions

std::string nameString () const noexcept override
 
std::string baseString () const noexcept override
 
std::string valueString () const noexcept override
 
jau::nsize_t getBaseParamSize () const noexcept
 

Static Protected Member Functions

static void checkEventType (const HCIEventType has, const HCIEventType min, const HCIEventType max)
 
static void checkEventType (const HCIEventType has, const HCIEventType exp)
 
- Static Protected Member Functions inherited from direct_bt::HCIPacket
static void checkPacketType (const HCIPacketType type)
 

Protected Attributes

uint64_t ts_creation
 
- Protected Attributes inherited from direct_bt::HCIPacket
POctets pdu
 

Detailed Description

BT Core Spec v5.2: Vol 4, Part E HCI: 5.4.4 HCI Event packet.

BT Core Spec v5.2: Vol 4, Part E HCI: 7.7 Events

 __u8    evt;
 __u8    plen;

Definition at line 774 of file HCITypes.hpp.

Constructor & Destructor Documentation

◆ HCIEvent() [1/3]

direct_bt::HCIEvent::HCIEvent ( const uint8_t *  buffer,
const jau::nsize_t  buffer_len,
const jau::nsize_t  exp_param_size 
)
inline

Persistent memory, w/ ownership .

Definition at line 820 of file HCITypes.hpp.

Here is the call graph for this function:

◆ HCIEvent() [2/3]

direct_bt::HCIEvent::HCIEvent ( const HCIEventType  evt,
const jau::nsize_t  param_size = 0 
)
inline

Enabling manual construction of event without given value.


Definition at line 832 of file HCITypes.hpp.

Here is the call graph for this function:

◆ HCIEvent() [3/3]

direct_bt::HCIEvent::HCIEvent ( const HCIEventType  evt,
const uint8_t *  param,
const jau::nsize_t  param_size 
)
inline

Enabling manual construction of event with given value.


Definition at line 841 of file HCITypes.hpp.

Here is the call graph for this function:

◆ ~HCIEvent()

virtual direct_bt::HCIEvent::~HCIEvent ( )
inlinevirtualnoexcept

Definition at line 849 of file HCITypes.hpp.

Member Function Documentation

◆ baseString()

std::string direct_bt::HCIEvent::baseString ( ) const
inlineoverrideprotectedvirtualnoexcept

Reimplemented from direct_bt::HCIPacket.

Reimplemented in direct_bt::HCIMetaEvent, direct_bt::HCICommandStatusEvent, direct_bt::HCICommandCompleteEvent, and direct_bt::HCIDisconnectionCompleteEvent.

Definition at line 797 of file HCITypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkEventType() [1/2]

static void direct_bt::HCIEvent::checkEventType ( const HCIEventType  has,
const HCIEventType  exp 
)
inlinestaticprotected

Definition at line 787 of file HCITypes.hpp.

Here is the call graph for this function:

◆ checkEventType() [2/2]

static void direct_bt::HCIEvent::checkEventType ( const HCIEventType  has,
const HCIEventType  min,
const HCIEventType  max 
)
inlinestaticprotected

Definition at line 779 of file HCITypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBaseParamSize()

jau::nsize_t direct_bt::HCIEvent::getBaseParamSize ( ) const
inlineprotectednoexcept

Definition at line 807 of file HCITypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEventType()

constexpr HCIEventType direct_bt::HCIEvent::getEventType ( ) const
inlineconstexprnoexcept

Definition at line 853 of file HCITypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMetaEventType()

virtual HCIMetaEventType direct_bt::HCIEvent::getMetaEventType ( ) const
inlinevirtualnoexcept

The meta subevent type.

Reimplemented in direct_bt::HCIMetaEvent.

Definition at line 859 of file HCITypes.hpp.

Here is the caller graph for this function:

◆ getParam()

virtual const uint8_t* direct_bt::HCIEvent::getParam ( ) const
inlinevirtualnoexcept

Reimplemented in direct_bt::HCIMetaEvent.

Definition at line 863 of file HCITypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getParamSize()

virtual jau::nsize_t direct_bt::HCIEvent::getParamSize ( ) const
inlinevirtualnoexcept

Reimplemented in direct_bt::HCIMetaEvent.

Definition at line 862 of file HCITypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSpecialized()

std::unique_ptr< HCIEvent > direct_bt::HCIEvent::getSpecialized ( const uint8_t *  buffer,
jau::nsize_t const  buffer_size 
)
staticnoexcept

Return a newly created specialized instance pointer to base class.

Returned memory reference is managed by caller (delete etc)

Definition at line 306 of file HCITypes.cpp.

Here is the call graph for this function:

◆ getTimestamp()

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

Definition at line 851 of file HCITypes.hpp.

◆ isEvent()

constexpr bool direct_bt::HCIEvent::isEvent ( HCIEventType  t) const
inlineconstexprnoexcept

Definition at line 854 of file HCITypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isMetaEvent()

bool direct_bt::HCIEvent::isMetaEvent ( HCIMetaEventType  t) const
inlinenoexcept

Definition at line 860 of file HCITypes.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nameString()

std::string direct_bt::HCIEvent::nameString ( ) const
inlineoverrideprotectedvirtualnoexcept

◆ validate()

virtual bool direct_bt::HCIEvent::validate ( const HCICommand cmd) const
inlinevirtualnoexcept

◆ valueString()

std::string direct_bt::HCIEvent::valueString ( ) const
inlineoverrideprotectedvirtualnoexcept

Reimplemented from direct_bt::HCIPacket.

Definition at line 800 of file HCITypes.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ ts_creation

uint64_t direct_bt::HCIEvent::ts_creation
protected

Definition at line 777 of file HCITypes.hpp.


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