Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Classes | Public Member Functions | Protected Member Functions | List of all members
direct_bt::AttFindInfoRsp Class Referencefinal

BT Core Spec v5.2: Vol 3, Part F ATT: 3.4.3.2 ATT_FIND_INFORMATION_RSP. More...

#include <ATTPDUTypes.hpp>

Inheritance diagram for direct_bt::AttFindInfoRsp:
Collaboration diagram for direct_bt::AttFindInfoRsp:

Classes

class  Element
 element := { uint16_t handle, UUID value }, with a UUID of UUID16 or UUID128 More...
 

Public Member Functions

 AttFindInfoRsp (const jau::nsize_t total_length)
 Create an incomplete response with maximal (MTU) length. More...
 
 AttFindInfoRsp (const uint8_t *source, const jau::nsize_t length)
 
Element getElement (const jau::nsize_t elementIdx) const
 
uint16_t getElementHandle (const jau::nsize_t elementIdx) const
 
jau::nsize_t getElementSize () const override
 Returns element size. More...
 
std::unique_ptr< const jau::uuid_tgetElementValue (const jau::nsize_t elementIdx) const
 
jau::uuid_t::TypeSize getElementValueFormat () const
 
jau::nsize_t getElementValueSize () const override
 Net element-value size, i.e. More...
 
std::string getName () const noexcept override
 
constexpr_cxx20 jau::nsize_t getPDUValueOffset () const noexcept override
 opcode + format More...
 
void setElementHandle (const jau::nsize_t elementIdx, const uint16_t h)
 
void setElementSize (const uint8_t element_length) override
 Fixate element length. More...
 
void setElementValueUUID (const jau::nsize_t elementIdx, const jau::uuid_t &v)
 
- Public Member Functions inherited from direct_bt::AttElementList
 ~AttElementList () noexcept override=default
 
constexpr_cxx20 jau::nsize_t getElementCount () const noexcept
 Number of elements. More...
 
jau::nsize_t getElementPDUOffset (const jau::nsize_t elementIdx) const
 
uint8_t const * getElementPtr (const jau::nsize_t elementIdx) const
 
virtual jau::nsize_t getElementSize () const =0
 Total size of one element. More...
 
virtual jau::nsize_t getElementValueSize () const =0
 Net element-value size, i.e. More...
 
std::string getName () const noexcept override
 
void setElementCount (const jau::nsize_t count)
 Fixate element count. More...
 
virtual void setElementSize (const uint8_t element_length)=0
 Fixate element length. More...
 
- Public Member Functions inherited from direct_bt::AttPDUMsg
 AttPDUMsg (AttPDUMsg &&o) noexcept=default
 
 AttPDUMsg (const AttPDUMsg &o)=default
 
 AttPDUMsg (const Opcode opc, const jau::nsize_t size)
 Persistent memory, w/ ownership . More...
 
 AttPDUMsg (const uint8_t *source, const jau::nsize_t size)
 Persistent memory, w/ ownership . More...
 
virtual ~AttPDUMsg () noexcept=default
 
constexpr jau::nsize_t getAuthSigSize () const noexcept
 ATT PDU Format Vol 3, Part F 3.3.1. More...
 
constexpr_cxx20 jau::nsize_t getMaxPDUValueSize (const jau::nsize_t mtu) const noexcept
 Returns the theoretical maximum value size of a PDU's attribute value. More...
 
virtual std::string getName () const noexcept
 
constexpr bool getOpAuthSigFlag () const noexcept
 ATT PDU Format Vol 3, Part F 3.3.1. More...
 
constexpr Opcode getOpcode () const noexcept
 ATT PDU Format Vol 3, Part F 3.3.1. More...
 
constexpr bool getOpCommandFlag () const noexcept
 ATT PDU Format Vol 3, Part F 3.3.1. More...
 
constexpr Opcode getOpMethod () const noexcept
 ATT PDU Format Vol 3, Part F 3.3.1. More...
 
constexpr_cxx20 jau::nsize_t getPDUMinSize () const noexcept
 Returns this PDU's minimum size, i.e. More...
 
constexpr jau::nsize_t getPDUParamSize () const noexcept
 ATT PDU Format Vol 3, Part F 3.3.1. More...
 
virtual constexpr_cxx20 jau::nsize_t getPDUValueOffset () const noexcept
 Returns the octet offset to the value segment in this PDU including the mandatory opcode, i.e. More...
 
constexpr_cxx20 jau::nsize_t getPDUValueSize () const noexcept
 Returns the net octet size of this PDU's attributes value, i.e. More...
 
AttPDUMsgoperator= (AttPDUMsg &&o) noexcept=delete
 
AttPDUMsgoperator= (const AttPDUMsg &o) noexcept=delete
 
virtual std::string toString () const noexcept
 

Protected Member Functions

std::string addValueString () const override
 
std::string elementString (const jau::nsize_t idx) const override
 
- Protected Member Functions inherited from direct_bt::AttElementList
 AttElementList (const Opcode opc, const jau::nsize_t size)
 
 AttElementList (const uint8_t *source, const jau::nsize_t length)
 
virtual std::string addValueString () const
 
virtual std::string elementString (const jau::nsize_t idx) const
 
std::string valueString () const noexcept override
 
- Protected Member Functions inherited from direct_bt::AttPDUMsg
virtual std::string baseString () const noexcept
 
void check_range ()
 
void checkOpcode (const Opcode exp1, const Opcode exp2) const
 
void checkOpcode (const Opcode expected) const
 
virtual std::string valueString () const noexcept
 

Additional Inherited Members

- Public Types inherited from direct_bt::AttPDUMsg
enum class  Opcode : uint8_t {
  PDU_UNDEFINED = 0x00 , METHOD_MASK = 0x3F , COMMAND_FLAG = 0x40 , AUTH_SIGNATURE_FLAG = 0x80 ,
  ERROR_RSP = 0x01 , EXCHANGE_MTU_REQ = 0x02 , EXCHANGE_MTU_RSP = 0x03 , FIND_INFORMATION_REQ = 0x04 ,
  FIND_INFORMATION_RSP = 0x05 , FIND_BY_TYPE_VALUE_REQ = 0x06 , FIND_BY_TYPE_VALUE_RSP = 0x07 , READ_BY_TYPE_REQ = 0x08 ,
  READ_BY_TYPE_RSP = 0x09 , READ_REQ = 0x0A , READ_RSP = 0x0B , READ_BLOB_REQ = 0x0C ,
  READ_BLOB_RSP = 0x0D , READ_MULTIPLE_REQ = 0x0E , READ_MULTIPLE_RSP = 0x0F , READ_BY_GROUP_TYPE_REQ = 0x10 ,
  READ_BY_GROUP_TYPE_RSP = 0x11 , WRITE_REQ = 0x12 , WRITE_RSP = 0x13 , WRITE_CMD = WRITE_REQ + COMMAND_FLAG ,
  PREPARE_WRITE_REQ = 0x16 , PREPARE_WRITE_RSP = 0x17 , EXECUTE_WRITE_REQ = 0x18 , EXECUTE_WRITE_RSP = 0x19 ,
  READ_MULTIPLE_VARIABLE_REQ = 0x20 , READ_MULTIPLE_VARIABLE_RSP = 0x21 , MULTIPLE_HANDLE_VALUE_NTF = 0x23 , HANDLE_VALUE_NTF = 0x1B ,
  HANDLE_VALUE_IND = 0x1D , HANDLE_VALUE_CFM = 0x1E , SIGNED_WRITE_CMD = WRITE_REQ + COMMAND_FLAG + AUTH_SIGNATURE_FLAG
}
 ATT Opcode Summary Vol 3, Part F 3.4.8. More...
 
enum class  OpcodeType : uint8_t {
  UNDEFINED = 0 , REQUEST = 1 , RESPONSE = 2 , NOTIFICATION = 3 ,
  INDICATION = 4
}
 
enum class  ReqRespType : bool { REQUEST = true , RESPONSE = false }
 
- Static Public Member Functions inherited from direct_bt::AttPDUMsg
static constexpr OpcodeType get_type (const Opcode rhs) noexcept
 
static std::string getOpcodeString (const Opcode opc) noexcept
 
static std::unique_ptr< const AttPDUMsggetSpecialized (const uint8_t *buffer, jau::nsize_t const buffer_size) noexcept
 Return a newly created specialized instance pointer to base class. More...
 
static constexpr bool is_request (const ReqRespType rhs) noexcept
 
static constexpr uint8_t number (const Opcode rhs) noexcept
 
- Public Attributes inherited from direct_bt::AttPDUMsg
jau::POctets pdu
 actual received PDU More...
 
const uint64_t ts_creation
 creation timestamp in milliseconds More...
 

Detailed Description

BT Core Spec v5.2: Vol 3, Part F ATT: 3.4.3.2 ATT_FIND_INFORMATION_RSP.

ATT_FIND_INFORMATION_RSP

Contains a list of elements, each comprised of { handle, [UUID16 | UUID128] } pair. The handle is comprised of two octets, i.e. uint16_t. The UUID is either comprised of 2 octets for UUID16 or 16 octets for UUID128 depending on the given format.

 element := { uint16_t handle, UUID value }, with a UUID of UUID16 or UUID128

Used in:

BT Core Spec v5.2: Vol 3, Part G GATT: 4.7.1 Discover All Characteristic Descriptors

Definition at line 1812 of file ATTPDUTypes.hpp.

Constructor & Destructor Documentation

◆ AttFindInfoRsp() [1/2]

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

Definition at line 1847 of file ATTPDUTypes.hpp.

◆ AttFindInfoRsp() [2/2]

direct_bt::AttFindInfoRsp::AttFindInfoRsp ( const jau::nsize_t  total_length)
inline

Create an incomplete response with maximal (MTU) length.

User shall set all elements via the set*() methods and finally use setElementSize() to fixate element length and setElementCount() to set element count.

Parameters
total_lengthmaximum

Definition at line 1904 of file ATTPDUTypes.hpp.

Member Function Documentation

◆ getPDUValueOffset()

constexpr_cxx20 jau::nsize_t direct_bt::AttFindInfoRsp::getPDUValueOffset ( ) const
inlineoverridevirtualnoexcept

opcode + format

Reimplemented from direct_bt::AttPDUMsg.

Definition at line 1859 of file ATTPDUTypes.hpp.

◆ getElementSize()

jau::nsize_t direct_bt::AttFindInfoRsp::getElementSize ( ) const
inlineoverridevirtual

Returns element size.

element := { uint16_t handle, UUID value }, with a UUID of UUID16 or UUID128

Implements direct_bt::AttElementList.

Definition at line 1867 of file ATTPDUTypes.hpp.

Here is the caller graph for this function:

◆ getElementValueFormat()

jau::uuid_t::TypeSize direct_bt::AttFindInfoRsp::getElementValueFormat ( ) const
inline

Definition at line 1871 of file ATTPDUTypes.hpp.

Here is the caller graph for this function:

◆ getElementValueSize()

jau::nsize_t direct_bt::AttFindInfoRsp::getElementValueSize ( ) const
inlineoverridevirtual

Net element-value size, i.e.

element size less handles.

element := { uint16_t handle, UUID value }, with a UUID of UUID16 or UUID128

Implements direct_bt::AttElementList.

Definition at line 1881 of file ATTPDUTypes.hpp.

Here is the caller graph for this function:

◆ setElementSize()

void direct_bt::AttFindInfoRsp::setElementSize ( const uint8_t  element_length)
inlineoverridevirtual

Fixate element length.

Parameters
element_length

Implements direct_bt::AttElementList.

Definition at line 1889 of file ATTPDUTypes.hpp.

Here is the caller graph for this function:

◆ getElement()

Element direct_bt::AttFindInfoRsp::getElement ( const jau::nsize_t  elementIdx) const
inline

Definition at line 1911 of file ATTPDUTypes.hpp.

Here is the caller graph for this function:

◆ getElementHandle()

uint16_t direct_bt::AttFindInfoRsp::getElementHandle ( const jau::nsize_t  elementIdx) const
inline

Definition at line 1915 of file ATTPDUTypes.hpp.

◆ setElementHandle()

void direct_bt::AttFindInfoRsp::setElementHandle ( const jau::nsize_t  elementIdx,
const uint16_t  h 
)
inline

Definition at line 1918 of file ATTPDUTypes.hpp.

Here is the caller graph for this function:

◆ getElementValue()

std::unique_ptr< const jau::uuid_t > direct_bt::AttFindInfoRsp::getElementValue ( const jau::nsize_t  elementIdx) const
inline

Definition at line 1922 of file ATTPDUTypes.hpp.

◆ setElementValueUUID()

void direct_bt::AttFindInfoRsp::setElementValueUUID ( const jau::nsize_t  elementIdx,
const jau::uuid_t v 
)
inline

Definition at line 1925 of file ATTPDUTypes.hpp.

Here is the caller graph for this function:

◆ getName()

std::string direct_bt::AttFindInfoRsp::getName ( ) const
inlineoverridevirtualnoexcept

Reimplemented from direct_bt::AttElementList.

Definition at line 1930 of file ATTPDUTypes.hpp.

◆ addValueString()

std::string direct_bt::AttFindInfoRsp::addValueString ( ) const
inlineoverrideprotectedvirtual

Reimplemented from direct_bt::AttElementList.

Definition at line 1935 of file ATTPDUTypes.hpp.

◆ elementString()

std::string direct_bt::AttFindInfoRsp::elementString ( const jau::nsize_t  idx) const
inlineoverrideprotectedvirtual

Reimplemented from direct_bt::AttElementList.

Definition at line 1937 of file ATTPDUTypes.hpp.


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