Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | List of all members
direct_bt::BTGattHandler::GattServerHandler Class Referenceabstract

Internal handler implementation for given DBGattServer instance matching its DBGattServer::Mode. More...

#include <BTGattHandler.hpp>

Inheritance diagram for direct_bt::BTGattHandler::GattServerHandler:
Collaboration diagram for direct_bt::BTGattHandler::GattServerHandler:

Public Member Functions

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

Internal handler implementation for given DBGattServer instance matching its DBGattServer::Mode.

The specific implementation acts upon GATT requests from a connected client according to DBGattServer::Mode.

Definition at line 201 of file BTGattHandler.hpp.

Constructor & Destructor Documentation

◆ ~GattServerHandler()

virtual direct_bt::BTGattHandler::GattServerHandler::~GattServerHandler ( )
virtualdefault

Member Function Documentation

◆ close()

virtual void direct_bt::BTGattHandler::GattServerHandler::close ( )
inlinevirtualnoexcept

Close and clear this handler, i.e.

release all resources.

Usually called when disconnected or destructed.

Reimplemented in NopGattServerHandler, DBGattServerHandler, and FwdGattServerHandler.

Definition at line 210 of file BTGattHandler.hpp.

◆ getMode()

virtual DBGattServer::Mode direct_bt::BTGattHandler::GattServerHandler::getMode ( )
pure virtualnoexcept

◆ replyExchangeMTUReq()

virtual bool direct_bt::BTGattHandler::GattServerHandler::replyExchangeMTUReq ( const AttExchangeMTU pdu)
pure virtualnoexcept

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

Implemented in NopGattServerHandler, DBGattServerHandler, and FwdGattServerHandler.

◆ replyReadReq()

virtual bool direct_bt::BTGattHandler::GattServerHandler::replyReadReq ( const AttPDUMsg pdu)
pure virtualnoexcept

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

Implemented in NopGattServerHandler, DBGattServerHandler, and FwdGattServerHandler.

◆ replyWriteReq()

virtual bool direct_bt::BTGattHandler::GattServerHandler::replyWriteReq ( const AttPDUMsg pdu)
pure virtualnoexcept

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

Implemented in NopGattServerHandler, DBGattServerHandler, and FwdGattServerHandler.

◆ replyFindInfoReq()

virtual bool direct_bt::BTGattHandler::GattServerHandler::replyFindInfoReq ( const AttFindInfoReq pdu)
pure virtualnoexcept

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

Implemented in NopGattServerHandler, DBGattServerHandler, and FwdGattServerHandler.

◆ replyFindByTypeValueReq()

virtual bool direct_bt::BTGattHandler::GattServerHandler::replyFindByTypeValueReq ( const AttFindByTypeValueReq pdu)
pure virtualnoexcept

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

Implemented in NopGattServerHandler, DBGattServerHandler, and FwdGattServerHandler.

◆ replyReadByTypeReq()

virtual bool direct_bt::BTGattHandler::GattServerHandler::replyReadByTypeReq ( const AttReadByNTypeReq pdu)
pure virtualnoexcept

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

Implemented in NopGattServerHandler, DBGattServerHandler, and FwdGattServerHandler.

◆ replyReadByGroupTypeReq()

virtual bool direct_bt::BTGattHandler::GattServerHandler::replyReadByGroupTypeReq ( const AttReadByNTypeReq pdu)
pure virtualnoexcept

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

Implemented in NopGattServerHandler, DBGattServerHandler, and FwdGattServerHandler.


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