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

Base interface for GATT services exposed by BLE peripheral. More...

#include <iprph.hxx>

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

Classes

struct  SPrphNotiferCb
 Context data for characteristic notification callbacks. More...
 

Public Member Functions

 IProtoNimblePrphService (const SObjectCfg::SObjectCfgItem *desc_, IProtoNimblePrphCb *cb_)
 Constructor.
 
virtual ~IProtoNimblePrphService ()
 Virtual destructor.
 
virtual int deinit ()=0
 Deinitialize service.
 
virtual int init ()=0
 Initialize service.
 
virtual int start ()=0
 Start service.
 
virtual int stop ()=0
 Stop service.
 

Public Attributes

IProtoNimblePrphCbcb
 Callback interface to peripheral.
 
const SObjectCfg::SObjectCfgItemdesc
 Configuration descriptor for this service.
 
std::vector< SObjectId::ObjectIdvio
 Vector of I/O objects exposed by this service.
 

Detailed Description

Base interface for GATT services exposed by BLE peripheral.

All BLE services (DIS, BAS, ESS, AIOS, IMDS) implement this interface.

Definition at line 466 of file iprph.hxx.

Constructor & Destructor Documentation

◆ IProtoNimblePrphService()

dawn::IProtoNimblePrphService::IProtoNimblePrphService ( const SObjectCfg::SObjectCfgItem desc_,
IProtoNimblePrphCb cb_ 
)
inline

Constructor.

Stores configuration descriptor and peripheral callback reference.

Parameters
[in]desc_Configuration descriptor item for this service.
[in]cb_Callback interface to peripheral.

Definition at line 494 of file iprph.hxx.

References cb, and desc.

◆ ~IProtoNimblePrphService()

virtual dawn::IProtoNimblePrphService::~IProtoNimblePrphService ( )
inlinevirtual

Virtual destructor.

Allows proper cleanup in derived classes.

Definition at line 509 of file iprph.hxx.

Member Function Documentation

◆ deinit()

virtual int dawn::IProtoNimblePrphService::deinit ( )
pure virtual

Deinitialize service.

Releases all allocated resources for this service.

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

Implemented in dawn::CProtoNimblePrphAios, dawn::CProtoNimblePrphBas, dawn::CProtoNimblePrphCustom, dawn::CProtoNimblePrphDis, dawn::CProtoNimblePrphEss, dawn::CProtoNimblePrphImds, and dawn::CProtoNimblePrphOts.

◆ init()

virtual int dawn::IProtoNimblePrphService::init ( )
pure virtual

Initialize service.

Allocates service resources and prepares characteristics.

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

Implemented in dawn::CProtoNimblePrphAios, dawn::CProtoNimblePrphBas, dawn::CProtoNimblePrphCustom, dawn::CProtoNimblePrphDis, dawn::CProtoNimblePrphEss, dawn::CProtoNimblePrphImds, and dawn::CProtoNimblePrphOts.

◆ start()

virtual int dawn::IProtoNimblePrphService::start ( )
pure virtual

Start service.

Registers the service with the GATT database.

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

Implemented in dawn::CProtoNimblePrphAios, dawn::CProtoNimblePrphBas, dawn::CProtoNimblePrphCustom, dawn::CProtoNimblePrphDis, dawn::CProtoNimblePrphEss, dawn::CProtoNimblePrphImds, and dawn::CProtoNimblePrphOts.

◆ stop()

virtual int dawn::IProtoNimblePrphService::stop ( )
pure virtual

Stop service.

Removes the service from the GATT database.

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

Implemented in dawn::CProtoNimblePrphAios, dawn::CProtoNimblePrphBas, dawn::CProtoNimblePrphCustom, dawn::CProtoNimblePrphDis, dawn::CProtoNimblePrphEss, dawn::CProtoNimblePrphImds, and dawn::CProtoNimblePrphOts.

Member Data Documentation

◆ cb

IProtoNimblePrphCb* dawn::IProtoNimblePrphService::cb

Callback interface to peripheral.

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

Definition at line 566 of file iprph.hxx.

◆ desc

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

Configuration descriptor for this service.

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

Definition at line 574 of file iprph.hxx.

◆ vio

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

Vector of I/O objects exposed by this service.

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

Definition at line 557 of file iprph.hxx.


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