Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Classes | Public Member Functions | Static Public Member Functions | List of all members
direct_bt::HCIACLData Class Reference

BT Core Spec v5.2: Vol 4, Part E HCI: 5.4.2 HCI ACL Data packets. More...

#include <HCITypes.hpp>

Inheritance diagram for direct_bt::HCIACLData:
Collaboration diagram for direct_bt::HCIACLData:

Classes

struct  l2cap_frame
 Representing ACL Datas' L2CAP Frame. More...
 

Public Member Functions

 HCIACLData (const uint8_t *buffer, const jau::nsize_t buffer_len)
 Persistent memory, w/ ownership . More...
 
uint16_t getHandleAndFlags () const noexcept
 
l2cap_frame getL2CAPFrame (const uint8_t *&l2cap_data) const noexcept
 
const uint8_t * getParam () const noexcept
 
jau::nsize_t getParamSize () const noexcept
 
std::string toString () const noexcept
 
std::string toString (const l2cap_frame &l2cap, const uint8_t *l2cap_data) 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=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

static constexpr uint8_t get_bcflag (const uint16_t handle_and_flags) noexcept
 Returns the Broadcast_Flag. More...
 
static constexpr uint16_t get_handle (const uint16_t handle_and_flags) noexcept
 Returns the handle. More...
 
static constexpr uint8_t get_pbflag (const uint16_t handle_and_flags) noexcept
 Returns the Packet_Boundary_Flag. More...
 
static std::unique_ptr< HCIACLDatagetSpecialized (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...
 

Additional Inherited Members

- Protected Member Functions inherited from direct_bt::HCIPacket
virtual std::string baseString () const noexcept
 
virtual std::string nameString () const noexcept
 
virtual std::string valueString () const noexcept
 
- Static Protected Member Functions inherited from direct_bt::HCIPacket
static void checkPacketType (const HCIPacketType type)
 
- Protected Attributes inherited from direct_bt::HCIPacket
jau::POctets pdu
 

Detailed Description

BT Core Spec v5.2: Vol 4, Part E HCI: 5.4.2 HCI ACL Data packets.

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

ACL Data allows us to receive SMPPDUMsg inside an HCIACLData::l2cap_frame via HCIACLData::getL2CAPFrame() and HCIACLData::l2cap_frame::getSMPPDUMsg().

 uint16_t  handle;
 uint16_t  len;
 uint8_t   data[len];

Definition at line 968 of file HCITypes.hpp.

Constructor & Destructor Documentation

◆ HCIACLData()

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

Persistent memory, w/ ownership .

Definition at line 1053 of file HCITypes.hpp.

Member Function Documentation

◆ getSpecialized()

std::unique_ptr< HCIACLData > direct_bt::HCIACLData::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 404 of file HCITypes.cpp.

◆ get_handle()

static constexpr uint16_t direct_bt::HCIACLData::get_handle ( const uint16_t  handle_and_flags)
inlinestaticconstexprnoexcept

Returns the handle.

Definition at line 1040 of file HCITypes.hpp.

◆ get_pbflag()

static constexpr uint8_t direct_bt::HCIACLData::get_pbflag ( const uint16_t  handle_and_flags)
inlinestaticconstexprnoexcept

Returns the Packet_Boundary_Flag.

Definition at line 1045 of file HCITypes.hpp.

◆ get_bcflag()

static constexpr uint8_t direct_bt::HCIACLData::get_bcflag ( const uint16_t  handle_and_flags)
inlinestaticconstexprnoexcept

Returns the Broadcast_Flag.

Definition at line 1050 of file HCITypes.hpp.

◆ getHandleAndFlags()

uint16_t direct_bt::HCIACLData::getHandleAndFlags ( ) const
inlinenoexcept

Definition at line 1060 of file HCITypes.hpp.

◆ getParamSize()

jau::nsize_t direct_bt::HCIACLData::getParamSize ( ) const
inlinenoexcept

Definition at line 1061 of file HCITypes.hpp.

Here is the caller graph for this function:

◆ getParam()

const uint8_t * direct_bt::HCIACLData::getParam ( ) const
inlinenoexcept

Definition at line 1062 of file HCITypes.hpp.

◆ getL2CAPFrame()

HCIACLData::l2cap_frame direct_bt::HCIACLData::getL2CAPFrame ( const uint8_t *&  l2cap_data) const
noexcept

Definition at line 425 of file HCITypes.cpp.

Here is the caller graph for this function:

◆ toString() [1/2]

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

Definition at line 1066 of file HCITypes.hpp.

◆ toString() [2/2]

std::string direct_bt::HCIACLData::toString ( const l2cap_frame l2cap,
const uint8_t *  l2cap_data 
) const
inlinenoexcept

Definition at line 1070 of file HCITypes.hpp.


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