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

Vol 3, Part H: 3.5.5 Pairing Failed message. More...

#include <SMPTypes.hpp>

Inheritance diagram for direct_bt::SMPPairFailedMsg:
Collaboration diagram for direct_bt::SMPPairFailedMsg:

Public Types

enum  ReasonCode : uint8_t {
  ReasonCode::UNDEFINED = 0x00, ReasonCode::PASSKEY_ENTRY_FAILED = 0x01, ReasonCode::OOB_NOT_AVAILABLE = 0x02, ReasonCode::AUTHENTICATION_REQUIREMENTS = 0x03,
  ReasonCode::CONFIRM_VALUE_FAILED = 0x04, ReasonCode::PAIRING_NOT_SUPPORTED = 0x05, ReasonCode::ENCRYPTION_KEY_SIZE = 0x06, ReasonCode::COMMON_NOT_SUPPORTED = 0x07,
  ReasonCode::UNSPECIFIED_REASON = 0x08, ReasonCode::REPEATED_ATTEMPTS = 0x09, ReasonCode::INVALID_PARAMTERS = 0x0A, ReasonCode::DHKEY_CHECK_FAILED = 0x0B,
  ReasonCode::NUMERIC_COMPARISON_FAILED = 0x0C, ReasonCode::BREDR_PAIRING_IN_PROGRESS = 0x0D, ReasonCode::CROSSXPORT_KEY_DERIGEN_NOT_ALLOWED = 0x0E
}
 
- Public Types inherited from direct_bt::SMPPDUMsg
enum  Opcode : uint8_t {
  Opcode::UNDEFINED = 0x00, Opcode::PAIRING_REQUEST = 0x01, Opcode::PAIRING_RESPONSE = 0x02, Opcode::PAIRING_CONFIRM = 0x03,
  Opcode::PAIRING_RANDOM = 0x04, Opcode::PAIRING_FAILED = 0x05, Opcode::ENCRYPTION_INFORMATION = 0x06, Opcode::MASTER_IDENTIFICATION = 0x07,
  Opcode::IDENTITY_INFORMATION = 0x08, Opcode::IDENTITY_ADDRESS_INFORMATION = 0x09, Opcode::SIGNING_INFORMATION = 0x0A, Opcode::SECURITY_REQUEST = 0x0B,
  Opcode::PAIRING_PUBLIC_KEY = 0x0C, Opcode::PAIRING_DHKEY_CHECK = 0x0D, Opcode::PAIRING_KEYPRESS_NOTIFICATION = 0x0E
}
 SMP Command Codes Vol 3, Part H (SM): 3.3. More...
 

Public Member Functions

 SMPPairFailedMsg (const uint8_t *source, const jau::nsize_t length)
 
 SMPPairFailedMsg (const ReasonCode rc)
 
constexpr_cxx20 jau::nsize_t getDataSize () const noexcept override
 Returns the required data size according to the specified packet, which should be within 0-22 or 64 octets. More...
 
constexpr ReasonCode getReasonCode () const noexcept
 
constexpr_cxx20 std::string getName () const noexcept override
 
- Public Member Functions inherited from direct_bt::SMPPDUMsg
 SMPPDUMsg (const uint8_t *source, const jau::nsize_t size)
 Persistent memory, w/ ownership . More...
 
 SMPPDUMsg (const Opcode opc, const jau::nsize_t size)
 Persistent memory, w/ ownership . More...
 
virtual ~SMPPDUMsg () noexcept
 
constexpr uint64_t getTimestamp () const noexcept
 
constexpr Opcode getOpcode () const noexcept
 SMP Command Codes Vol 3, Part H (SM): 3.3. More...
 
constexpr jau::nsize_t getPDUParamSize () const noexcept
 Returns the actual PDU size less one octet for the opcode, which should result in 0-22 octets or 64 octets. More...
 
constexpr jau::nsize_t getDataOffset () const noexcept
 Returns the octet offset to the data segment in this PDU including the mandatory opcode, i.e. More...
 
virtual std::string toString () const noexcept
 

Static Public Member Functions

static constexpr uint8_t number (const ReasonCode rhs) noexcept
 
static std::string getReasonCodeString (const ReasonCode reasonCode) noexcept
 
- Static Public Member Functions inherited from direct_bt::SMPPDUMsg
static constexpr uint8_t number (const Opcode rhs) noexcept
 
static std::string getOpcodeString (const Opcode opc) noexcept
 
static std::unique_ptr< const SMPPDUMsggetSpecialized (const uint8_t *buffer, jau::nsize_t const buffer_size) noexcept
 Return a newly created specialized instance pointer to base class. More...
 
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 valueString () const noexcept override
 
- Protected Member Functions inherited from direct_bt::SMPPDUMsg
void checkOpcode (const Opcode expected) const
 
void checkOpcode (const Opcode exp1, const Opcode exp2) const
 
virtual std::string baseString () const noexcept
 

Additional Inherited Members

- Protected Attributes inherited from direct_bt::SMPPDUMsg
POctets pdu
 actual received PDU More...
 
uint64_t ts_creation
 creation timestamp in milliseconds More...
 

Detailed Description

Vol 3, Part H: 3.5.5 Pairing Failed message.

Vol 3 (Host), Part H (SM): 3 (SMP), 3.5 Pairing Methods

Opcode::PAIRING_FAILED

[uint8_t opcode]
uint8_t reason_code

Definition at line 1187 of file SMPTypes.hpp.

Member Enumeration Documentation

◆ ReasonCode

Enumerator
UNDEFINED 
PASSKEY_ENTRY_FAILED 
OOB_NOT_AVAILABLE 
AUTHENTICATION_REQUIREMENTS 
CONFIRM_VALUE_FAILED 
PAIRING_NOT_SUPPORTED 
ENCRYPTION_KEY_SIZE 
COMMON_NOT_SUPPORTED 
UNSPECIFIED_REASON 
REPEATED_ATTEMPTS 
INVALID_PARAMTERS 
DHKEY_CHECK_FAILED 
NUMERIC_COMPARISON_FAILED 
BREDR_PAIRING_IN_PROGRESS 
CROSSXPORT_KEY_DERIGEN_NOT_ALLOWED 

Definition at line 1190 of file SMPTypes.hpp.

Constructor & Destructor Documentation

◆ SMPPairFailedMsg() [1/2]

direct_bt::SMPPairFailedMsg::SMPPairFailedMsg ( const uint8_t *  source,
const jau::nsize_t  length 
)
inline

Definition at line 1212 of file SMPTypes.hpp.

Here is the call graph for this function:

◆ SMPPairFailedMsg() [2/2]

direct_bt::SMPPairFailedMsg::SMPPairFailedMsg ( const ReasonCode  rc)
inline

Definition at line 1216 of file SMPTypes.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ getDataSize()

constexpr_cxx20 jau::nsize_t direct_bt::SMPPairFailedMsg::getDataSize ( ) const
inlineoverridevirtualnoexcept

Returns the required data size according to the specified packet, which should be within 0-22 or 64 octets.

See also
SMPPDUMsg::getPDUParamSize()

Reimplemented from direct_bt::SMPPDUMsg.

Definition at line 1222 of file SMPTypes.hpp.

◆ getName()

constexpr_cxx20 std::string direct_bt::SMPPairFailedMsg::getName ( ) const
inlineoverridevirtualnoexcept

Reimplemented from direct_bt::SMPPDUMsg.

Definition at line 1230 of file SMPTypes.hpp.

◆ getReasonCode()

constexpr ReasonCode direct_bt::SMPPairFailedMsg::getReasonCode ( ) const
inlineconstexprnoexcept

Definition at line 1226 of file SMPTypes.hpp.

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

◆ getReasonCodeString()

std::string SMPPairFailedMsg::getReasonCodeString ( const ReasonCode  reasonCode)
staticnoexcept

Definition at line 384 of file SMPTypes.cpp.

Here is the caller graph for this function:

◆ number()

static constexpr uint8_t direct_bt::SMPPairFailedMsg::number ( const ReasonCode  rhs)
inlinestaticconstexprnoexcept

Definition at line 1207 of file SMPTypes.hpp.

Here is the caller graph for this function:

◆ valueString()

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

Reimplemented from direct_bt::SMPPDUMsg.

Definition at line 1235 of file SMPTypes.hpp.

Here is the call graph for this function:

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