Dawn Framework 1.0
Universal data acquisition framework for embedded systems
Public Member Functions | Public Attributes | List of all members
dawn::CProtoNimblePrphBas Class Reference

Battery Service (BAS) for BLE Peripheral. More...

#include <prph_bas.hxx>

Inheritance diagram for dawn::CProtoNimblePrphBas:
[legend]
Collaboration diagram for dawn::CProtoNimblePrphBas:
[legend]

Public Member Functions

int deinit ()
 Deinitialize service.
 
int init ()
 Initialize service.
 
int start ()
 Start service.
 
int stop ()
 Stop service.
 

Public Attributes

IProtoNimblePrphCb * cb
 Callback interface to peripheral.
 
const SObjectCfg::SObjectCfgItem * desc
 Configuration descriptor for this service.
 
std::vector< SObjectId::ObjectId > vio
 Vector of I/O objects exposed by this service.
 

Detailed Description

Battery Service (BAS) for BLE Peripheral.

This class implements the Bluetooth SIG Battery Service (0x180F).

Definition at line 24 of file prph_bas.hxx.

Member Function Documentation

◆ deinit()

int CProtoNimblePrphBas::deinit ( )
virtual

Deinitialize service.

Releases all allocated resources for this service.

Returns
int 0 on success, negative error code on failure.

Implements dawn::IProtoNimblePrphService.

Definition at line 115 of file prph_bas.cxx.

◆ init()

int CProtoNimblePrphBas::init ( )
virtual

Initialize service.

Allocates service resources and prepares characteristics.

Returns
int 0 on success, negative error code on failure.

Implements dawn::IProtoNimblePrphService.

Definition at line 93 of file prph_bas.cxx.

References dawn::IProtoNimblePrphService::cb, dawn::IProtoNimblePrphService::desc, and dawn::IProtoNimblePrphCb::serviceRegister().

Here is the call graph for this function:

◆ start()

int CProtoNimblePrphBas::start ( )
virtual

Start service.

Registers the service with the GATT database.

Returns
int 0 on success, negative error code on failure.

Implements dawn::IProtoNimblePrphService.

Definition at line 226 of file prph_bas.cxx.

References dawn::IProtoNimblePrphService::cb, and dawn::IProtoNimblePrphCb::startService().

Here is the call graph for this function:

◆ stop()

int CProtoNimblePrphBas::stop ( )
virtual

Stop service.

Removes the service from the GATT database.

Returns
int 0 on success, negative error code on failure.

Implements dawn::IProtoNimblePrphService.

Definition at line 247 of file prph_bas.cxx.

References dawn::IProtoNimblePrphService::cb, and dawn::IProtoNimblePrphCb::stopService().

Here is the call graph for this function:

Member Data Documentation

◆ cb

IProtoNimblePrphCb* dawn::IProtoNimblePrphService::cb
inherited

Callback interface to peripheral.

Services use this to register GATT services, start/stop services, and access I/O objects.

Definition at line 594 of file iprph.hxx.

◆ desc

const SObjectCfg::SObjectCfgItem* dawn::IProtoNimblePrphService::desc
inherited

Configuration descriptor for this service.

Points to the configuration item that specified this service's setup.

Definition at line 602 of file iprph.hxx.

◆ vio

std::vector<SObjectId::ObjectId> dawn::IProtoNimblePrphService::vio
inherited

Vector of I/O objects exposed by this service.

Each entry is an I/O object ID that this service manages.

Definition at line 585 of file iprph.hxx.


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