From 05a9422e67e0cda4f2a6ecd875e6aa9f77fd683f Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 8 Dec 2023 18:56:10 +0800 Subject: [PATCH] aqctl_coreanalyzer_proxy: cleanup --- artiq/frontend/aqctl_coreanalyzer_proxy.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/artiq/frontend/aqctl_coreanalyzer_proxy.py b/artiq/frontend/aqctl_coreanalyzer_proxy.py index fa92bca1d..75de2da8c 100644 --- a/artiq/frontend/aqctl_coreanalyzer_proxy.py +++ b/artiq/frontend/aqctl_coreanalyzer_proxy.py @@ -2,13 +2,14 @@ import argparse import asyncio import atexit import logging -import struct + from sipyco.asyncio_tools import AsyncioServer, SignalHandler, atexit_register_coroutine from sipyco.pc_rpc import Server from sipyco import common_args from artiq.coredevice.comm_analyzer import get_analyzer_dump + logger = logging.getLogger(__name__) @@ -38,9 +39,8 @@ class ProxyServer(AsyncioServer): writer.close() def request_dump_cb(self, dump): - encoded_dump = struct.pack(">L", len(dump)) + dump for recipient in self._recipients: - recipient.put_nowait(encoded_dump) + recipient.put_nowait(dump) class ProxyControl: @@ -99,8 +99,6 @@ def main(): loop.run_until_complete(server.start(bind_address, args.port_control)) atexit_register_coroutine(server.stop, loop=loop) - logger.info("ARTIQ core analyzer proxy is ready.") - _, pending = loop.run_until_complete(asyncio.wait( [loop.create_task(signal_handler.wait_terminate()), loop.create_task(server.wait_terminate())],