mirror of
https://github.com/OMGeeky/flucto-heisskleber.git
synced 2025-12-28 15:28:11 +01:00
* WIP: Added async file reader. * Async resampling and synchronization refactored. * Add async mqtt publisher. Remove queue from joint. * Add async zmq publisher and subscriber. * Modify integration tests for streaming. * Name refactoring resampler. * Added async source/sink to factory. * Refactor joint and add integration tests. * Add termcolor dev dependency * Add conosole source and sink * Add cli interface for different protocols * Removed files unfit for merge. * Fix review requests. * Restore use of $MSB_CONFIG_DIR for now. It seems that the default behaviour is not looking for .config/heisskleber * Remove version test, causing unnecessary failures.
20 lines
451 B
Python
20 lines
451 B
Python
import asyncio
|
|
|
|
from heisskleber.mqtt import AsyncMqttSubscriber, MqttConf
|
|
from heisskleber.stream import Resampler, ResamplerConf
|
|
|
|
|
|
async def main():
|
|
conf = MqttConf(broker="localhost", port=1883, user="", password="")
|
|
sub = AsyncMqttSubscriber(conf, topic="#")
|
|
|
|
resampler = Resampler(ResamplerConf(), sub)
|
|
|
|
while True:
|
|
data = await resampler.receive()
|
|
print(data)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(main())
|