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 | List of all members
direct_bt::HCICommand Class Reference

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

#include <HCITypes.hpp>

Inheritance diagram for direct_bt::HCICommand:
Collaboration diagram for direct_bt::HCICommand:

Public Member Functions

 HCICommand (const HCIOpcode opc, const jau::nsize_t param_size)
 Enabling manual construction of command without given value. More...
 
 HCICommand (const HCIOpcode opc, const uint8_t *param, const jau::nsize_t param_size)
 Enabling manual construction of command with given value. More...
 
 HCICommand (const uint8_t *buffer, const jau::nsize_t buffer_len, const jau::nsize_t exp_param_size)
 Persistent memory, w/ ownership . More...
 
 ~HCICommand () noexcept override=default
 
HCIOpcode getOpcode () const noexcept
 
const uint8_t * getParam () const noexcept
 
jau::nsize_t getParamSize () const noexcept
 
void trimParamSize (const jau::nsize_t param_size)
 
- 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 std::unique_ptr< HCICommandgetSpecialized (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 baseString () const noexcept override
 
std::string nameString () const noexcept override
 
std::string valueString () const noexcept override
 
virtual std::string baseString () const noexcept
 
virtual std::string nameString () const noexcept
 
virtual std::string valueString () const noexcept
 

Static Protected Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from direct_bt::HCIPacket
jau::POctets pdu
 

Detailed Description

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: 7.8 LE Controller Commands

HCIPacket:

Definition at line 615 of file HCITypes.hpp.

Constructor & Destructor Documentation

◆ HCICommand() [1/3]

direct_bt::HCICommand::HCICommand ( 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 656 of file HCITypes.hpp.

◆ HCICommand() [2/3]

direct_bt::HCICommand::HCICommand ( const HCIOpcode  opc,
const jau::nsize_t  param_size 
)
inline

Enabling manual construction of command without given value.

Definition at line 668 of file HCITypes.hpp.

◆ HCICommand() [3/3]

direct_bt::HCICommand::HCICommand ( const HCIOpcode  opc,
const uint8_t *  param,
const jau::nsize_t  param_size 
)
inline

Enabling manual construction of command with given value.


Definition at line 681 of file HCITypes.hpp.

◆ ~HCICommand()

direct_bt::HCICommand::~HCICommand ( )
overridedefaultnoexcept

Member Function Documentation

◆ checkOpcode() [1/2]

static void direct_bt::HCICommand::checkOpcode ( const HCIOpcode  has,
const HCIOpcode  min,
const HCIOpcode  max 
)
inlinestaticprotected

Definition at line 618 of file HCITypes.hpp.

Here is the caller graph for this function:

◆ checkOpcode() [2/2]

static void direct_bt::HCICommand::checkOpcode ( const HCIOpcode  has,
const HCIOpcode  exp 
)
inlinestaticprotected

Definition at line 626 of file HCITypes.hpp.

◆ nameString()

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

◆ baseString()

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

Reimplemented from direct_bt::HCIPacket.

Definition at line 636 of file HCITypes.hpp.

◆ valueString()

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

◆ getSpecialized()

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

◆ getOpcode()

HCIOpcode direct_bt::HCICommand::getOpcode ( ) const
inlinenoexcept

Definition at line 691 of file HCITypes.hpp.

Here is the caller graph for this function:

◆ getParamSize()

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

Definition at line 692 of file HCITypes.hpp.

Here is the caller graph for this function:

◆ getParam()

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

Definition at line 693 of file HCITypes.hpp.

Here is the caller graph for this function:

◆ trimParamSize()

void direct_bt::HCICommand::trimParamSize ( const jau::nsize_t  param_size)
inline

Definition at line 695 of file HCITypes.hpp.


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