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 | 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
 
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

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 nameString () const noexcept
 
virtual std::string baseString () const noexcept
 
virtual std::string valueString () const noexcept
 

Static Protected Member Functions

static void checkPacketType (const HCIPacketType type)
 

Protected Attributes

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

 __u8    packet_type;

Definition at line 463 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 492 of file HCITypes.hpp.

Here is the call graph for this function:

◆ 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 502 of file HCITypes.hpp.

Here is the call graph for this function:

◆ ~HCIPacket()

virtual direct_bt::HCIPacket::~HCIPacket ( )
inlinevirtualnoexcept

Definition at line 511 of file HCITypes.hpp.

Member Function Documentation

◆ baseString()

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

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

Definition at line 487 of file HCITypes.hpp.

Here is the caller graph for this function:

◆ checkPacketType()

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

Definition at line 471 of file HCITypes.hpp.

Here is the call graph for this function:
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 520 of file HCITypes.hpp.

◆ getPacketType()

HCIPacketType direct_bt::HCIPacket::getPacketType ( )
inlinenoexcept

Definition at line 527 of file HCITypes.hpp.

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

◆ getPDU()

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

Return the underlying octets read only.

Definition at line 525 of file HCITypes.hpp.

◆ getTotalSize()

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

Definition at line 522 of file HCITypes.hpp.

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

◆ nameString()

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

Reimplemented in direct_bt::HCIMetaEvent, direct_bt::HCICommandStatusEvent, direct_bt::HCICommandCompleteEvent, direct_bt::HCIDisconnectionCompleteEvent, direct_bt::HCIEvent, direct_bt::HCIStructCommand< hcistruct >, direct_bt::HCIDisconnectCmd, and direct_bt::HCICommand.

Definition at line 485 of file HCITypes.hpp.

Here is the caller graph for this function:

◆ toString()

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

Definition at line 529 of file HCITypes.hpp.

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

◆ valueString()

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

Reimplemented in direct_bt::HCIEvent, and direct_bt::HCICommand.

Definition at line 489 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 465 of file HCITypes.hpp.

◆ HCIStructCmdCompleteMetaEvtWrap

template<typename T >
friend class HCIStructCmdCompleteMetaEvtWrap
friend

Definition at line 466 of file HCITypes.hpp.

Member Data Documentation

◆ pdu

POctets direct_bt::HCIPacket::pdu
protected

Definition at line 469 of file HCITypes.hpp.


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