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

Environmental Sensing Service (ESS) for BLE Peripheral. More...

#include <prph_ess.hxx>

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

Public Types

enum  {
  ESS_EXT_USER_DESCRIPTION = 1 , ESS_EXT_VALID_RANGE , ESS_EXT_MEASUREMENT , ESS_EXT_CONFIGURATION ,
  ESS_EXT_TRIGGER_SETTING
}
 
enum  {
  PRPH_ESS_TYPE_TEMP , PRPH_ESS_TYPE_HUM , PRPH_ESS_TYPE_PRESS , PRPH_ESS_TYPE_UVIDX ,
  PRPH_ESS_TYPE_TWINDSPEED , PRPH_ESS_TYPE_TWINDDIR , PRPH_ESS_TYPE_GAS , PRPH_ESS_TYPE_LIGHT
}
 

Public Member Functions

int deinit ()
 Deinitialize service.
 
int init ()
 Initialize service.
 
int start ()
 Start service.
 
int stop ()
 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

Environmental Sensing Service (ESS) for BLE Peripheral.

This class implements the Bluetooth SIG Environmental Sensing Service (0x181A).

Definition at line 27 of file prph_ess.hxx.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ESS_EXT_USER_DESCRIPTION 

Characteristic User Description descriptor.

ESS_EXT_VALID_RANGE 

Valid Range descriptor.

ESS_EXT_MEASUREMENT 

Environmental Sensing Measurement descriptor.

ESS_EXT_CONFIGURATION 

Environmental Sensing Configuration descriptor.

ESS_EXT_TRIGGER_SETTING 

Environmental Sensing Trigger Setting descriptor.

Definition at line 52 of file prph_ess.hxx.

◆ anonymous enum

anonymous enum
Enumerator
PRPH_ESS_TYPE_TEMP 

Temperature sensor.

PRPH_ESS_TYPE_HUM 

Humidity sensor.

PRPH_ESS_TYPE_PRESS 

Pressure (barometric) sensor.

PRPH_ESS_TYPE_UVIDX 

UV index sensor.

PRPH_ESS_TYPE_TWINDSPEED 

Wind speed sensor.

PRPH_ESS_TYPE_TWINDDIR 

Wind direction sensor.

PRPH_ESS_TYPE_GAS 

Gas resistance sensor (non-standard UUID).

PRPH_ESS_TYPE_LIGHT 

Illuminance / light sensor.

Definition at line 61 of file prph_ess.hxx.

Member Function Documentation

◆ deinit()

int CProtoNimblePrphEss::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 1063 of file prph_ess.cxx.

◆ init()

int CProtoNimblePrphEss::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 1035 of file prph_ess.cxx.

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

Here is the call graph for this function:

◆ start()

int CProtoNimblePrphEss::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 1069 of file prph_ess.cxx.

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

Here is the call graph for this function:

◆ stop()

int CProtoNimblePrphEss::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 1095 of file prph_ess.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 566 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 574 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 557 of file iprph.hxx.


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