Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
direct_bt::HCIPacket Class Reference

BT Core Spec v5.2: Vol 4, Part E HCI: 5.4 Exchange of HCI-specific information. More...

#include <HCITypes.hpp>

Inheritance diagram for direct_bt::HCIPacket:
Collaboration diagram for direct_bt::HCIPacket:

Public Member Functions

 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=default
 
HCIPacketType getPacketType () noexcept
 
jau::TROOctetsgetPDU () noexcept
 Return the underlying octets read only. More...
 
constexpr jau::nsize_t getTotalSize () const noexcept
 
std::string toString () const noexcept
 

Static Public Member Functions

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

virtual std::string baseString () const noexcept
 
virtual std::string nameString () const noexcept
 
virtual std::string valueString () const noexcept
 

Static Protected Member Functions

static void checkPacketType (const HCIPacketType type)
 

Protected Attributes

jau::POctets pdu
 

Friends

template<typename T >
class HCIStructCmdCompleteEvtWrap
 
template<typename T >
class HCIStructCmdCompleteMetaEvtWrap
 

Detailed Description

BT Core Spec v5.2: Vol 4, Part E HCI: 5.4 Exchange of HCI-specific information.

BT Core Spec v5.2: Vol 4, Part E HCI: 5.4.1 HCI Command packet

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

HCIPacket:

Definition at line 531 of file HCITypes.hpp.

Constructor & Destructor Documentation

◆ HCIPacket() [1/2]

direct_bt::HCIPacket::HCIPacket ( const HCIPacketType  type,
const jau::nsize_t  total_packet_size 
)
inline

Definition at line 560 of file HCITypes.hpp.

◆ HCIPacket() [2/2]

direct_bt::HCIPacket::HCIPacket ( const uint8_t *  packet_data,
const jau::nsize_t  total_packet_size 
)
inline

Persistent memory, w/ ownership .

Definition at line 570 of file HCITypes.hpp.

◆ ~HCIPacket()

virtual direct_bt::HCIPacket::~HCIPacket ( )
virtualdefaultnoexcept

Member Function Documentation

◆ checkPacketType()

static void direct_bt::HCIPacket::checkPacketType ( const HCIPacketType  type)
inlinestaticprotected

Definition at line 539 of file HCITypes.hpp.

Here is the caller graph for this function:

◆ nameString()

virtual std::string direct_bt::HCIPacket::nameString ( ) const
inlineprotectedvirtualnoexcept

◆ baseString()

virtual std::string direct_bt::HCIPacket::baseString ( ) const
inlineprotectedvirtualnoexcept

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

Definition at line 555 of file HCITypes.hpp.

Here is the caller graph for this function:

◆ valueString()

virtual std::string direct_bt::HCIPacket::valueString ( ) const
inlineprotectedvirtualnoexcept

Reimplemented in direct_bt::HCICommand, direct_bt::HCIDisconnectCmd, direct_bt::HCILEEnableEncryptionCmd, direct_bt::HCILELTKReplyAckCmd, direct_bt::HCILELTKReplyRejCmd, direct_bt::HCIEvent, and direct_bt::HCILELTKReqEvent.

Definition at line 557 of file HCITypes.hpp.

Here is the caller graph for this function:

◆ clone()

template<class T >
static T * direct_bt::HCIPacket::clone ( const T &  source)
inlinestaticnoexcept

Clone template for convenience, based on derived class's copy-constructor.

Template Parameters
TThe derived definite class type, deducible by source argument
Parameters
sourcethe source to be copied
Returns
a new instance.

Definition at line 588 of file HCITypes.hpp.

◆ getTotalSize()

constexpr jau::nsize_t direct_bt::HCIPacket::getTotalSize ( ) const
inlineconstexprnoexcept

Definition at line 590 of file HCITypes.hpp.

Here is the caller graph for this function:

◆ getPDU()

jau::TROOctets & direct_bt::HCIPacket::getPDU ( )
inlinenoexcept

Return the underlying octets read only.

Definition at line 593 of file HCITypes.hpp.

◆ getPacketType()

HCIPacketType direct_bt::HCIPacket::getPacketType ( )
inlinenoexcept

Definition at line 595 of file HCITypes.hpp.

Here is the caller graph for this function:

◆ toString()

std::string direct_bt::HCIPacket::toString ( ) const
inlinenoexcept

Definition at line 597 of file HCITypes.hpp.

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ HCIStructCmdCompleteEvtWrap

template<typename T >
friend class HCIStructCmdCompleteEvtWrap
friend

Definition at line 533 of file HCITypes.hpp.

◆ HCIStructCmdCompleteMetaEvtWrap

template<typename T >
friend class HCIStructCmdCompleteMetaEvtWrap
friend

Definition at line 534 of file HCITypes.hpp.

Member Data Documentation

◆ pdu

jau::POctets direct_bt::HCIPacket::pdu
protected

Definition at line 537 of file HCITypes.hpp.


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