Comments (4)
Do you mean device<->host
uses Pyee but host<->transport
uses sink method, and the inconsistency is somehow weird?
from bumble.
Yes exactly.
Is there a reason not to be consistent throughout the stack?
It makes it harder to trace through the code.
Also that the flow goes via Device to the Gatt server and not directly through the layers confused me a bit.
So flow from usb to gatt server seems complex to decypher, so I presumed there must be a reason to use different techniques.
The pdf is my attempt to follow the flow through the stack:
https://github.com/paulhamsh/PicoWBLEMidiTest/blob/331bc01f89aaa8e90e6cb288c27a4b7a2d7f2a0a/Bumble%20Overview.pdf
I am thinking using coroutines throughout might be cool.
from bumble.
The reason there are different ways layers call each other is because initially the code base didn't use pyee, that came later. Not everything has been updated to use pyee, so there are still direct calls to on_xxx
methods, or sink functions (very lightweight for cases where the emitter holds directly a reference to a function, rather than an object on which it calls one or more methods by name).
For the transport library, it will likely remain this way, as the source/sink model is close to the way asyncio works in general with transports and protocols (ex: data_receveived
methods being called), and is quite a bit lighter than the generic multi-listener model of pyee. For other layers, like gatt, it is possible that we'll end up updating to pyee events at some point.
from bumble.
Ah - thank you for explaining. That really helps
from bumble.
Related Issues (20)
- -packet-streamer-endpoint not recognized by emulator HOT 3
- Possibility of connecting bumble tcp-server controller with Zephyr application? HOT 16
- Cannot bridge tcp-server to android-netsim HOT 5
- Connection between android-netsim and Zephyr BT Stack work arounds HOT 5
- GATT Properties test failures and mypy errors in Python 3.11 HOT 3
- Bumble inside a docker container without using bluetooth from host?
- Add support for Enhanced L2CAP mode to support GOEB HOT 3
- Implement basic support for the AVRCP profile
- LeConnectionOrientedChannel enters invalid state in race condition HOT 1
- grpcio 1.51.1 fails to build on aarch64 MacOS with Apple Silicon
- optonal
- Cleanup hfp.py
- Loading in Pyodide fails due to missing `cryptography` package HOT 3
- Auto restart advertising doesn't set cached own_address_type
- Android Studio Emulator Bluetooth not working HOT 9
- [Feature Request] LE Audio Support HOT 3
- virtual printer HOT 10
- [Feature Request] Extended Advertising HOT 1
- GATT unsubscribe doesn't write CCCD unless all subscribers have been deleted
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bumble.