Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | Static Public Member Functions | List of all members
direct_bt::DBGattService Class Reference

Representing a Gatt Service object from the GATTRole::Server perspective. More...

#include <DBGattServer.hpp>

Inheritance diagram for direct_bt::DBGattService:
Collaboration diagram for direct_bt::DBGattService:

Public Member Functions

 DBGattService (const bool primary_, std::shared_ptr< const jau::uuid_t > type_, jau::darray< DBGattCharRef > &&characteristics_)
 
 DBGattService (const DBGattService &o)=default
 
 DBGattService (DBGattService &&o) noexcept=default
 
 ~DBGattService () noexcept override
 
DBGattCharRef findGattChar (const jau::uuid_t &char_uuid) noexcept
 
DBGattCharRef findGattCharByValueHandle (const uint16_t char_value_handle) noexcept
 
std::string get_java_class () const noexcept override
 
jau::darray< DBGattCharRef > & getCharacteristics () noexcept
 List of Characteristic Declarations. More...
 
uint16_t getEndHandle () const noexcept
 Service end handle, inclusive. More...
 
uint16_t getHandle () const noexcept
 Service start handle. More...
 
std::shared_ptr< const jau::uuid_tgetType () const noexcept
 Service type UUID. More...
 
std::shared_ptr< const jau::uuid_t > & getType () noexcept
 Service type UUID. More...
 
bool isPrimary () const noexcept
 Indicate whether this service is a primary service. More...
 
int setHandles (const uint16_t start_handle)
 Sets all handles of this service instance and all its owned childs, i.e. More...
 
std::string toString () const noexcept override
 

Static Public Member Functions

static std::string java_class () noexcept
 

Detailed Description

Representing a Gatt Service object from the GATTRole::Server perspective.

A list of shared DBGattService instances are passed at DBGattServer construction and are retrievable via DBGattServer::getServices().

See Direct-BT Overview.

BT Core Spec v5.2: Vol 3, Part G GATT: 3.1 Service Definition

Includes a complete [Primary] Service Declaration including its list of Characteristic Declarations, which also may include its client config if available.

Since
2.4.0

Definition at line 565 of file DBGattServer.hpp.

Constructor & Destructor Documentation

◆ ~DBGattService()

direct_bt::DBGattService::~DBGattService ( )
inlineoverridenoexcept

Definition at line 616 of file DBGattServer.hpp.

◆ DBGattService() [1/3]

direct_bt::DBGattService::DBGattService ( const bool  primary_,
std::shared_ptr< const jau::uuid_t type_,
jau::darray< DBGattCharRef > &&  characteristics_ 
)
inline

Definition at line 620 of file DBGattServer.hpp.

◆ DBGattService() [2/3]

direct_bt::DBGattService::DBGattService ( const DBGattService o)
default

◆ DBGattService() [3/3]

direct_bt::DBGattService::DBGattService ( DBGattService &&  o)
defaultnoexcept

Member Function Documentation

◆ isPrimary()

bool direct_bt::DBGattService::isPrimary ( ) const
inlinenoexcept

Indicate whether this service is a primary service.

Definition at line 581 of file DBGattServer.hpp.

◆ getHandle()

uint16_t direct_bt::DBGattService::getHandle ( ) const
inlinenoexcept

Service start handle.

Attribute handles are unique for each device (server) (BT Core Spec v5.2: Vol 3, Part F Protocol..: 3.2.2 Attribute Handle).

Definition at line 589 of file DBGattServer.hpp.

◆ getEndHandle()

uint16_t direct_bt::DBGattService::getEndHandle ( ) const
inlinenoexcept

Service end handle, inclusive.

Attribute handles are unique for each device (server) (BT Core Spec v5.2: Vol 3, Part F Protocol..: 3.2.2 Attribute Handle).

Definition at line 597 of file DBGattServer.hpp.

◆ getType() [1/2]

std::shared_ptr< const jau::uuid_t > & direct_bt::DBGattService::getType ( )
inlinenoexcept

Service type UUID.

Definition at line 600 of file DBGattServer.hpp.

◆ getType() [2/2]

std::shared_ptr< const jau::uuid_t > direct_bt::DBGattService::getType ( ) const
inlinenoexcept

Service type UUID.

Definition at line 603 of file DBGattServer.hpp.

◆ getCharacteristics()

jau::darray< DBGattCharRef > & direct_bt::DBGattService::getCharacteristics ( )
inlinenoexcept

List of Characteristic Declarations.

Definition at line 606 of file DBGattServer.hpp.

◆ java_class()

static std::string direct_bt::DBGattService::java_class ( )
inlinestaticnoexcept

Definition at line 608 of file DBGattServer.hpp.

Here is the caller graph for this function:

◆ get_java_class()

std::string direct_bt::DBGattService::get_java_class ( ) const
inlineoverridevirtualnoexcept

Implements jau::jni::JavaUplink.

Definition at line 612 of file DBGattServer.hpp.

◆ findGattChar()

DBGattCharRef direct_bt::DBGattService::findGattChar ( const jau::uuid_t char_uuid)
inlinenoexcept

Definition at line 631 of file DBGattServer.hpp.

◆ findGattCharByValueHandle()

DBGattCharRef direct_bt::DBGattService::findGattCharByValueHandle ( const uint16_t  char_value_handle)
inlinenoexcept

Definition at line 639 of file DBGattServer.hpp.

◆ setHandles()

int direct_bt::DBGattService::setHandles ( const uint16_t  start_handle)
inline

Sets all handles of this service instance and all its owned childs, i.e.

DBGattChars elements and its DBGattDesc elements.

Parameters
start_handlea valid and unique start handle number > 0
Returns
number of set handles, i.e. ( end_handle - handle ) + 1

Definition at line 655 of file DBGattServer.hpp.

◆ toString()

std::string direct_bt::DBGattService::toString ( ) const
inlineoverridevirtualnoexcept

Reimplemented from jau::jni::JavaUplink.

Definition at line 675 of file DBGattServer.hpp.


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