Added ValueBuffer implementation and simple recording

ValueBuffer is now the default buffer object for storing data for
recording and processing purposes, a simple recording implementation has
been done, core.py example starts recording as soon as the core has
started then on exit it saves the output as a csv file through the
ValueBuffer export_csv method
This commit is contained in:
2026-08-06 12:57:59 +01:00
parent 1690032f5b
commit ffcea13c0b
5 changed files with 80 additions and 20 deletions
+2
View File
@@ -19,6 +19,7 @@ config = CoreConfig(port=8765)
log.info("Configured manual core on %s", config.bind_str())
dl_core = Core(config)
dl_core.start()
dl_core.start_recording()
try:
while True:
@@ -27,4 +28,5 @@ try:
log.debug(f"Core values: {values}")
except KeyboardInterrupt:
log.info("Received keyboard interrupt")
dl_core.stop_recording()
dl_core.stop()
+6 -18
View File
@@ -116,24 +116,12 @@ def value_sender_thread(
next_send_time += period
value = ValueDescriptor(
signal_id=signal_id, value=2.0, timestamp=monotonic_ns()
)
message = ValueBatch(
values=[
value,
value,
value,
value,
value,
value,
value,
value,
value,
value,
]
)
message = ValueBatch(values=[])
for i in range(10):
value = ValueDescriptor(
signal_id=signal_id, value=2.0, timestamp=monotonic_ns()
)
message.values.append(value)
future = asyncio.run_coroutine_threadsafe(
send_message(