ARMmbed / ARMmbed/ble

we may want to introduce GattServer::addCharacteristic()

Open
#48 1 comment 0 reactions 0 assignees View on GitHub
enhancement mirrored
Dominant language
C++
Stars
81
Forks
71
PR merge metrics
No merged PRs in 30d

Description

We currently only have GattServer::addService(), which requires us to collect the characteristics into an array before passing it into the service constructor. This forces an ugly pattern for construction. A better method would be:

GattService s(UUID,...);
ble.gattServer().addService(s);
GattCharacteristic c1(UUID,...);
ble.gattServer().addCharacteristic(c1);

or even better:
ble.gattServer() << s << c1 << ... ;

Contributor guide

Open the contributing guide

Research direction

Start by tracing GattServer::addService(), GattService construction, and the existing characteristic collection flow. Compare the proposed addCharacteristic() and operator<< APIs, then determine the intended ownership and ordering rules; done means the chosen construction style is specified and supported without requiring a preassembled characteristic array.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.