Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | List of all members
DBGattServerHandler Class Reference
Inheritance diagram for DBGattServerHandler:
Collaboration diagram for DBGattServerHandler:

Public Member Functions

 DBGattServerHandler (BTGattHandler &gh_, DBGattServerRef gsd) noexcept
 
 ~DBGattServerHandler () override
 
void close () noexcept override
 Close and clear this handler, i.e. More...
 
DBGattServer::Mode getMode () noexcept override
 
bool replyExchangeMTUReq (const AttExchangeMTU *pdu) noexcept override
 Reply to an exchange MTU request. More...
 
bool replyFindByTypeValueReq (const AttFindByTypeValueReq *pdu) noexcept override
 Reply to a find by type value request. More...
 
bool replyFindInfoReq (const AttFindInfoReq *pdu) noexcept override
 Reply to a find info request. More...
 
bool replyReadByGroupTypeReq (const AttReadByNTypeReq *pdu) noexcept override
 Reply to a read by group type request. More...
 
bool replyReadByTypeReq (const AttReadByNTypeReq *pdu) noexcept override
 Reply to a read by type request. More...
 
bool replyReadReq (const AttPDUMsg *pdu) noexcept override
 Reply to a read request. More...
 
bool replyWriteReq (const AttPDUMsg *pdu) noexcept override
 Reply to a write request. More...
 
- Public Member Functions inherited from direct_bt::BTGattHandler::GattServerHandler
virtual ~GattServerHandler ()=default
 
virtual void close () noexcept
 Close and clear this handler, i.e. More...
 
virtual DBGattServer::Mode getMode () noexcept=0
 
virtual bool replyExchangeMTUReq (const AttExchangeMTU *pdu) noexcept=0
 Reply to an exchange MTU request. More...
 
virtual bool replyFindByTypeValueReq (const AttFindByTypeValueReq *pdu) noexcept=0
 Reply to a find by type value request. More...
 
virtual bool replyFindInfoReq (const AttFindInfoReq *pdu) noexcept=0
 Reply to a find info request. More...
 
virtual bool replyReadByGroupTypeReq (const AttReadByNTypeReq *pdu) noexcept=0
 Reply to a read by group type request. More...
 
virtual bool replyReadByTypeReq (const AttReadByNTypeReq *pdu) noexcept=0
 Reply to a read by type request. More...
 
virtual bool replyReadReq (const AttPDUMsg *pdu) noexcept=0
 Reply to a read request. More...
 
virtual bool replyWriteReq (const AttPDUMsg *pdu) noexcept=0
 Reply to a write request. More...
 

Detailed Description

Definition at line 107 of file BTGattServerHandler.cpp.

Constructor & Destructor Documentation

◆ DBGattServerHandler()

DBGattServerHandler::DBGattServerHandler ( BTGattHandler gh_,
DBGattServerRef  gsd 
)
inlinenoexcept

Definition at line 137 of file BTGattServerHandler.cpp.

◆ ~DBGattServerHandler()

DBGattServerHandler::~DBGattServerHandler ( )
inlineoverride

Definition at line 140 of file BTGattServerHandler.cpp.

Member Function Documentation

◆ close()

void DBGattServerHandler::close ( )
inlineoverridevirtualnoexcept

Close and clear this handler, i.e.

release all resources.

Usually called when disconnected or destructed.

Reimplemented from direct_bt::BTGattHandler::GattServerHandler.

Definition at line 142 of file BTGattServerHandler.cpp.

◆ getMode()

DBGattServer::Mode DBGattServerHandler::getMode ( )
inlineoverridevirtualnoexcept

◆ replyExchangeMTUReq()

bool DBGattServerHandler::replyExchangeMTUReq ( const AttExchangeMTU pdu)
inlineoverridevirtualnoexcept

Reply to an exchange MTU request.

  • BT Core Spec v5.2: Vol 3, Part G GATT: 4.3.1 Exchange MTU (Server configuration)
    Parameters
    pdu
    Returns
    true if transmission was successful, otherwise false

Implements direct_bt::BTGattHandler::GattServerHandler.

Definition at line 357 of file BTGattServerHandler.cpp.

◆ replyWriteReq()

bool DBGattServerHandler::replyWriteReq ( const AttPDUMsg pdu)
inlineoverridevirtualnoexcept

Reply to a write request.

Without Response:

  • BT Core Spec v5.2: Vol 3, Part F ATT: 3.4.5.3 ATT_WRITE_CMD
  • BT Core Spec v5.2: Vol 3, Part G GATT: 4.9.1 Write Characteristic Value without Response

With Response:

  • BT Core Spec v5.2: Vol 3, Part F ATT: 3.4.5.1 ATT_WRITE_REQ
  • BT Core Spec v5.2: Vol 3, Part G GATT: 4.9.3 Write Characteristic Value
  • BT Core Spec v5.2: Vol 3, Part G GATT: 3.3.3.3 Client Characteristic Configuration
  • BT Core Spec v5.2: Vol 3, Part F ATT: 3.4.5.2 ATT_WRITE_RSP
  • BT Core Spec v5.2: Vol 3, Part G GATT: 4.9.3 Write Characteristic Value
Parameters
pdu
Returns
true if transmission was successful, otherwise false

Implements direct_bt::BTGattHandler::GattServerHandler.

Definition at line 383 of file BTGattServerHandler.cpp.

◆ replyReadReq()

bool DBGattServerHandler::replyReadReq ( const AttPDUMsg pdu)
inlineoverridevirtualnoexcept

Reply to a read request.

  • BT Core Spec v5.2: Vol 3, Part G GATT: 4.8.1 Read Characteristic Value
  • BT Core Spec v5.2: Vol 3, Part G GATT: 4.8.3 Read Long Characteristic Value
  • For any follow up request, which previous request reply couldn't fit in ATT_MTU (Long Write)
    Parameters
    pdu
    Returns
    true if transmission was successful, otherwise false

Implements direct_bt::BTGattHandler::GattServerHandler.

Definition at line 497 of file BTGattServerHandler.cpp.

◆ replyFindInfoReq()

bool DBGattServerHandler::replyFindInfoReq ( const AttFindInfoReq pdu)
inlineoverridevirtualnoexcept

Reply to a find info request.

  • BT Core Spec v5.2: Vol 3, Part F ATT: 3.4.3.1 ATT_FIND_INFORMATION_REQ
  • BT Core Spec v5.2: Vol 3, Part F ATT: 3.4.3.2 ATT_FIND_INFORMATION_RSP
  • BT Core Spec v5.2: Vol 3, Part G GATT: 4.7.1 Discover All Characteristic Descriptors
Parameters
pdu
Returns
true if transmission was successful, otherwise false

Implements direct_bt::BTGattHandler::GattServerHandler.

Definition at line 643 of file BTGattServerHandler.cpp.

◆ replyFindByTypeValueReq()

bool DBGattServerHandler::replyFindByTypeValueReq ( const AttFindByTypeValueReq pdu)
inlineoverridevirtualnoexcept

Reply to a find by type value request.

  • BT Core Spec v5.2: Vol 3, Part F ATT: 3.4.3.3 ATT_FIND_BY_TYPE_VALUE_REQ
  • BT Core Spec v5.2: Vol 3, Part F ATT: 3.4.3.4 ATT_FIND_BY_TYPE_VALUE_RSP
  • BT Core Spec v5.2: Vol 3, Part G GATT: 4.4.2 Discover Primary Service by Service UUID
    Parameters
    pdu
    Returns
    true if transmission was successful, otherwise false

Implements direct_bt::BTGattHandler::GattServerHandler.

Definition at line 700 of file BTGattServerHandler.cpp.

◆ replyReadByTypeReq()

bool DBGattServerHandler::replyReadByTypeReq ( const AttReadByNTypeReq pdu)
inlineoverridevirtualnoexcept

Reply to a read by type request.

  • BT Core Spec v5.2: Vol 3, Part F ATT: 3.4.4.1 ATT_READ_BY_TYPE_REQ
  • BT Core Spec v5.2: Vol 3, Part F ATT: 3.4.4.2 ATT_READ_BY_TYPE_RSP
  • BT Core Spec v5.2: Vol 3, Part G GATT: 4.6.1 Discover All Characteristics of a Service
Parameters
pdu
Returns
true if transmission was successful, otherwise false

Implements direct_bt::BTGattHandler::GattServerHandler.

Definition at line 776 of file BTGattServerHandler.cpp.

◆ replyReadByGroupTypeReq()

bool DBGattServerHandler::replyReadByGroupTypeReq ( const AttReadByNTypeReq pdu)
inlineoverridevirtualnoexcept

Reply to a read by group type request.

  • BT Core Spec v5.2: Vol 3, Part F ATT: 3.4.4.9 ATT_READ_BY_GROUP_TYPE_REQ
  • BT Core Spec v5.2: Vol 3, Part F ATT: 3.4.4.10 ATT_READ_BY_GROUP_TYPE_RSP
  • BT Core Spec v5.2: Vol 3, Part G GATT: 4.4.1 Discover All Primary Services
Parameters
pdu
Returns
true if transmission was successful, otherwise false

Implements direct_bt::BTGattHandler::GattServerHandler.

Definition at line 896 of file BTGattServerHandler.cpp.


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