Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
Representing a Gatt Service object from the GATTRole::Client perspective. More...
#include <BTGattService.hpp>
Public Member Functions | |
BTGattService (const std::shared_ptr< BTGattHandler > &handler_, const bool isPrimary_, const uint16_t startHandle_, const uint16_t endHandle_, std::unique_ptr< const jau::uuid_t > &&type_) noexcept | |
BTGattCharRef | findGattChar (const BTGattChar &characteristic) noexcept |
Find a BTGattChar by itself, i.e. More... | |
BTGattCharRef | findGattChar (const jau::uuid_t &char_uuid) noexcept |
Find a BTGattChar by its char_uuid. More... | |
std::string | get_java_class () const noexcept override |
BTDeviceRef | getDeviceChecked () const |
BTDeviceRef | getDeviceUnchecked () const noexcept |
BTGattHandlerRef | getGattHandlerChecked () const |
BTGattHandlerRef | getGattHandlerUnchecked () const noexcept |
std::string | toString () const noexcept override |
Public Member Functions inherited from direct_bt::BTObject | |
~BTObject () noexcept override | |
void | checkValidInstance () const override |
Throws an IllegalStateException if instance is not valid. More... | |
bool | isValidInstance () const noexcept |
Returns whether the object's reference is valid and in a general operational state. More... | |
std::string | toString () const noexcept override |
Public Member Functions inherited from jau::jni::JavaUplink | |
JavaUplink () noexcept=default | |
JavaUplink (const JavaUplink &o) noexcept=default | |
JavaUplink (JavaUplink &&o) noexcept=default | |
virtual | ~JavaUplink () noexcept |
virtual void | checkValidInstance () const |
Throws an IllegalStateException if instance is not valid. More... | |
virtual std::string | get_java_class () const noexcept=0 |
const JavaAnonRef & | getJavaObject () noexcept |
std::string | javaObjectToString () const noexcept |
JavaUplink & | operator= (const JavaUplink &o) noexcept=default |
JavaUplink & | operator= (JavaUplink &&o) noexcept=default |
void | setJavaObject () noexcept |
Resets the shared JavaAnon reference, the replaced item might be deleted via JNI from dtor. More... | |
void | setJavaObject (const JavaAnonRef &objRef) noexcept |
Assigns a new shared JavaAnon reference, replaced item might be deleted via JNI from dtor. More... | |
virtual std::string | toString () const noexcept |
Static Public Member Functions | |
static std::string | java_class () noexcept |
Public Attributes | |
jau::darray< BTGattCharRef > | characteristicList |
List of Characteristic Declarations as shared reference. More... | |
const uint16_t | end_handle |
Service end handle, inclusive. More... | |
const uint16_t | handle |
Service start handle. More... | |
const bool | primary |
std::unique_ptr< const jau::uuid_t > | type |
Service type UUID. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from direct_bt::BTObject | |
BTObject () noexcept | |
Protected Attributes inherited from direct_bt::BTObject | |
std::atomic_bool | instance_valid |
Representing a Gatt Service object from the GATTRole::Client perspective.
A list of shared BTGattService instances can be retrieved from BTDevice after successful connection and optional pairing via BTDevice::getGattServices().
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.
Definition at line 84 of file BTGattService.hpp.
|
inlinenoexcept |
Definition at line 116 of file BTGattService.hpp.
|
inlineoverridevirtualnoexcept |
Implements jau::jni::JavaUplink.
Definition at line 122 of file BTGattService.hpp.
|
inlinestaticnoexcept |
|
inlinenoexcept |
BTGattHandlerRef BTGattService::getGattHandlerChecked | ( | ) | const |
|
noexcept |
Definition at line 54 of file BTGattService.cpp.
BTDeviceRef BTGattService::getDeviceChecked | ( | ) | const |
Definition at line 62 of file BTGattService.cpp.
|
noexcept |
Find a BTGattChar by its char_uuid.
@parameter char_uuid the jau::uuid_t of the desired BTGattChar, within this BTGattService.
Definition at line 66 of file BTGattService.cpp.
|
noexcept |
Find a BTGattChar by itself, i.e.
mapping BTGattChar instance to BTGattCharRef.
@parameter characteristic the desired BTGattChar, within this BTGattService.
Definition at line 75 of file BTGattService.cpp.
|
overridevirtualnoexcept |
Reimplemented from jau::jni::JavaUplink.
Definition at line 84 of file BTGattService.cpp.
const bool direct_bt::BTGattService::primary |
Definition at line 92 of file BTGattService.hpp.
const uint16_t direct_bt::BTGattService::handle |
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 100 of file BTGattService.hpp.
const uint16_t direct_bt::BTGattService::end_handle |
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 108 of file BTGattService.hpp.
std::unique_ptr<const jau::uuid_t> direct_bt::BTGattService::type |
jau::darray<BTGattCharRef> direct_bt::BTGattService::characteristicList |
List of Characteristic Declarations as shared reference.
Definition at line 114 of file BTGattService.hpp.