Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
openlcb::BLEService Class Reference

OpenLCB BLE service definition. More...

#include <BLEService.hxx>

Inheritance diagram for openlcb::BLEService:
ble::Service

Public Types

enum  GATTAttributeIndexs {
  GATT_SERVICE_INDEX = 0 , GATT_DATA_IN_DECL_INDEX , GATT_DATA_IN_VALUE_INDEX , GATT_DATA_IN_CCCD_INDEX ,
  GATT_DATA_OUT_DECL_INDEX , GATT_DATA_OUT_VALUE_INDEX , GATT_DATA_OUT_CCCD_INDEX
}
 The entry indexes for the GATT_ATTRIBUTES table. More...
 

Static Public Member Functions

static constexpr size_t size ()
 Get the size in number of elements (Attributes).
 

Static Public Attributes

static const uint8_t GATT_SERVICE_UUID_OPENLCB [16]
 OpenLCB GATT service UUID.
 
static const uint8_t GATT_CHAR_UUID_DATA_IN [16]
 OpenLCB GATT data in characterisitic UUID.
 
static const uint8_t GATT_CHAR_UUID_DATA_OUT [16]
 OpenLCB GATT data out characterisitic UUID.
 
static constexpr GATTAttribute GATT_ATTRIBUTES []
 GATT Attribute table properties for this service.
 

Static Private Attributes

static uint8_t dataIn_ [200]
 data incoming to the server
 
static uint8_t dataOut_ [200]
 data outgoing from the server
 
static uint8_t dataInCCCD_ [2] = {0x00, 0x00}
 configuration descriptor for input
 
static uint8_t dataOutCCCD_ [2] = {0x00, 0x00}
 configuration descriptor for output
 

Detailed Description

OpenLCB BLE service definition.

Definition at line 40 of file BLEService.hxx.

Member Enumeration Documentation

◆ GATTAttributeIndexs

The entry indexes for the GATT_ATTRIBUTES table.

Enumerator
GATT_SERVICE_INDEX 

GATT Primary Service index.

GATT_DATA_IN_DECL_INDEX 

GATT data in declaration index.

GATT_DATA_IN_VALUE_INDEX 

GATT data in value index.

GATT_DATA_IN_CCCD_INDEX 

GATT data in CCCD index.

GATT_DATA_OUT_DECL_INDEX 

GATT data out declaration index.

GATT_DATA_OUT_VALUE_INDEX 

GATT data out value index.

GATT_DATA_OUT_CCCD_INDEX 

GATT data out CCCD index.

Definition at line 61 of file BLEService.hxx.

Member Function Documentation

◆ size()

static constexpr size_t openlcb::BLEService::size ( )
inlinestaticconstexpr

Get the size in number of elements (Attributes).

Returns
number of elements

Definition at line 135 of file BLEService.hxx.

Member Data Documentation

◆ dataIn_

uint8_t openlcb::BLEService::dataIn_
staticprivate

data incoming to the server

Definition at line 53 of file BLEService.hxx.

◆ dataInCCCD_

uint8_t openlcb::BLEService::dataInCCCD_ = {0x00, 0x00}
staticprivate

configuration descriptor for input

Definition at line 56 of file BLEService.hxx.

◆ dataOut_

uint8_t openlcb::BLEService::dataOut_
staticprivate

data outgoing from the server

Definition at line 54 of file BLEService.hxx.

◆ dataOutCCCD_

uint8_t openlcb::BLEService::dataOutCCCD_ = {0x00, 0x00}
staticprivate

configuration descriptor for output

Definition at line 57 of file BLEService.hxx.

◆ GATT_ATTRIBUTES

constexpr GATTAttribute openlcb::BLEService::GATT_ATTRIBUTES[]
staticconstexpr

GATT Attribute table properties for this service.

Definition at line 73 of file BLEService.hxx.

◆ GATT_CHAR_UUID_DATA_IN

const uint8_t openlcb::BLEService::GATT_CHAR_UUID_DATA_IN
static
Initial value:
=
{
0xCB, 0x06, 0xfC, 0x67, 0xE1, 0xFB,
0x8E, 0xA2,
0x8A, 0x4D,
0xBC, 0x47,
0xBA, 0xE1, 0x29, 0xB0,
}

OpenLCB GATT data in characterisitic UUID.

Definition at line 47 of file BLEService.hxx.

◆ GATT_CHAR_UUID_DATA_OUT

const uint8_t openlcb::BLEService::GATT_CHAR_UUID_DATA_OUT
static
Initial value:
=
{
0x0F, 0xA9, 0x95, 0xC0, 0xB3, 0x2E,
0x30, 0xBF,
0x5D, 0x48,
0xD9, 0x55,
0x17, 0xD9, 0xFE, 0xC4,
}

OpenLCB GATT data out characterisitic UUID.

Definition at line 50 of file BLEService.hxx.

◆ GATT_SERVICE_UUID_OPENLCB

const uint8_t openlcb::BLEService::GATT_SERVICE_UUID_OPENLCB
static
Initial value:
=
{
0x51, 0x18, 0x8D, 0x82, 0x4C, 0xDA,
0xE7, 0x83,
0xAF, 0x4D,
0xA9, 0x84,
0x20, 0x52, 0xF4, 0x0F,
}

OpenLCB GATT service UUID.

Definition at line 44 of file BLEService.hxx.


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