we may want to introduce GattServer::addCharacteristic()
- 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
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