runtimepy 5.13.3__tar.gz → 5.14.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {runtimepy-5.13.3/runtimepy.egg-info → runtimepy-5.14.1}/PKG-INFO +4 -4
- {runtimepy-5.13.3 → runtimepy-5.14.1}/README.md +2 -2
- {runtimepy-5.13.3 → runtimepy-5.14.1}/pyproject.toml +1 -1
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/__init__.py +2 -2
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/codec/protocol/__init__.py +5 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/codec/protocol/base.py +18 -2
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/codec/protocol/json.py +2 -0
- runtimepy-5.14.1/runtimepy/codec/protocol/receiver.py +117 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/commands/all.py +2 -6
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/entry.py +2 -3
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/__init__.py +4 -3
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/base.py +6 -1
- {runtimepy-5.13.3 → runtimepy-5.14.1/runtimepy.egg-info}/PKG-INFO +4 -4
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy.egg-info/SOURCES.txt +1 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/LICENSE +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/__main__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/app.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/channel/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/channel/environment/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/channel/environment/array.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/channel/environment/base.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/channel/environment/command/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/channel/environment/command/parser.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/channel/environment/command/processor.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/channel/environment/command/result.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/channel/environment/create.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/channel/environment/file.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/channel/environment/sample.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/channel/environment/telemetry.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/channel/event/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/channel/event/header.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/channel/registry.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/codec/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/codec/system/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/commands/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/commands/arbiter.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/commands/common.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/commands/mtu.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/commands/server.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/commands/task.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/commands/tftp.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/commands/tui.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/control/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/control/env/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/control/source.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/control/step.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/404.html +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/base.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/browser.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/css/bootstrap_extra.css +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/css/font.css +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/css/main.css +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/dummy_load.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/factories.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/favicon.ico +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/DataConnection.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/JsonConnection.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/audio.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/classes/App.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/classes/ChannelTable.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/classes/DataConnection.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/classes/JsonConnection.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/classes/OverlayManager.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/classes/Plot.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/classes/PlotDrawer.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/classes/PlotManager.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/classes/PlotModalManager.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/classes/PointBuffer.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/classes/PointManager.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/classes/TabFilter.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/classes/TabInterface.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/classes/UnitSystem.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/classes/WindowHashManager.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/classes/WorkerInterface.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/events.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/init.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/main.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/markdown_page.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/tab/env.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/tab/sound.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/third-party/webgl-debug.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/unused/pyodide.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/util.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/js/worker.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/md/Connection.md +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/md/PeriodicTask.md +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/md/RuntimeStruct.md +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/md/RuntimepyPeer.md +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/md/SinusoidTask.md +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/sample_telemetry.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/BitFields.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/Channel.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/ChannelCommand.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/ChannelRegistry.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/ClientConnectionConfig.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/ConnectionArbiterConfig.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/EnumRegistry.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/FindFile.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/PeerProcessConfig.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/RuntimeEnum.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/ServerConnectionConfig.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/StructConfig.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/TaskConfig.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/channel_controls.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/has_config.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/has_factory.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/has_markdown.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/has_name.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/schemas/has_request_flag.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/server.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/server_base.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/server_dev.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/css/bootstrap-icons.min.css +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/css/bootstrap.min.css +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/css/fonts/bootstrap-icons.woff +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/css/fonts/bootstrap-icons.woff2 +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/js/bootstrap.bundle.min.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/js/webglplot.umd.min.js +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/png/chip-circle-bootstrap/1024x1024.png +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/png/chip-circle-bootstrap/128x128.png +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/png/chip-circle-bootstrap/16x16.png +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/png/chip-circle-bootstrap/1920x1920.png +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/png/chip-circle-bootstrap/24x24.png +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/png/chip-circle-bootstrap/256x256.png +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/png/chip-circle-bootstrap/32x32.png +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/png/chip-circle-bootstrap/512x512.png +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/png/chip-circle-bootstrap/64x64.png +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/svg/chip-circle-bootstrap.svg +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/woff2/CascadiaCode-Bold.woff2 +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/woff2/CascadiaCode-BoldItalic.woff2 +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/woff2/CascadiaCode-Italic.woff2 +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/woff2/CascadiaCode-Regular.woff2 +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/woff2/CascadiaMono-Bold.woff2 +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/woff2/CascadiaMono-BoldItalic.woff2 +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/woff2/CascadiaMono-Italic.woff2 +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/woff2/CascadiaMono-Regular.woff2 +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/static/woff2/README.md +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/data/tftp_server.yaml +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/dev_requirements.txt +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/enum/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/enum/registry.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/enum/types.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/mapping.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/message/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/message/handlers.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/message/interface.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/message/types.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/metrics/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/metrics/channel.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/metrics/connection.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/metrics/task.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/mixins/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/mixins/async_command.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/mixins/enum.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/mixins/environment.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/mixins/finalize.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/mixins/logging.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/mixins/psutil.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/mixins/regex.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/mixins/trig.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/apps/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/base.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/config/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/config/codec.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/config/util.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/factory/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/factory/connection.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/factory/task.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/housekeeping/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/imports/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/imports/util.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/info.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/result.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/struct/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/task.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/tcp/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/tcp/json.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/udp.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/arbiter/websocket.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/backoff.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/connection.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/factories/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/html/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/html/arbiter.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/html/bootstrap/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/html/bootstrap/elements.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/html/bootstrap/tabs.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/http/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/http/common.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/http/header.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/http/request_target.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/http/response.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/http/state.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/http/version.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/manager.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/mixin.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/mtu.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/base.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/create.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/elements.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/env/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/env/modal.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/env/settings.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/env/tab/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/env/tab/base.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/env/tab/controls.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/env/tab/html.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/env/tab/message.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/env/widgets.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/files.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/landing_page.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/placeholder.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/pyodide.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/sound.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/app/tab.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/html.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/json.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/markdown.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/struct/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/websocket/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/server/websocket/state.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/ssl.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/stream/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/stream/base.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/stream/json/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/stream/string.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/tcp/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/tcp/connection.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/tcp/create.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/tcp/http/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/tcp/protocol.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/tcp/scpi/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/tcp/telnet/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/tcp/telnet/codes.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/tcp/telnet/np_05b.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/udp/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/udp/connection.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/udp/create.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/udp/protocol.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/udp/queue.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/udp/tftp/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/udp/tftp/base.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/udp/tftp/endpoint.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/udp/tftp/enums.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/udp/tftp/io.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/util.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/websocket/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/net/websocket/connection.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/noise/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/array/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/bool.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/byte_order.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/evaluation.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/field/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/field/fields.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/field/manager/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/field/manager/base.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/float.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/int.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/scaling.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/serializable/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/serializable/base.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/serializable/fixed.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/serializable/framer.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/serializable/prefixed.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/string.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/types/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/types/base.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/types/bool.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/types/bounds.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/types/float.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/primitives/types/int.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/py.typed +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/registry/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/registry/bool.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/registry/item.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/registry/name.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/requirements.txt +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/sample/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/sample/peer.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/sample/program.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/schemas.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/struct/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/subprocess/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/subprocess/interface.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/subprocess/peer.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/subprocess/program.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/subprocess/protocol.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/task/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/task/asynchronous.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/task/basic/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/task/basic/manager.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/task/basic/periodic.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/task/sample.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/task/trig/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/telemetry/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/telemetry/sample.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/tui/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/tui/channels/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/tui/cursor.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/tui/mixin.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/tui/mock.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/tui/task.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/ui/__init__.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/ui/controls.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy/util.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy.egg-info/dependency_links.txt +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy.egg-info/entry_points.txt +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy.egg-info/requires.txt +1 -1
- {runtimepy-5.13.3 → runtimepy-5.14.1}/runtimepy.egg-info/top_level.txt +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/setup.cfg +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/setup.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/tests/test_entry.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/tests/test_mapping.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/tests/test_resources.py +0 -0
- {runtimepy-5.13.3 → runtimepy-5.14.1}/tests/test_util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: runtimepy
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.14.1
|
|
4
4
|
Summary: A framework for implementing Python services.
|
|
5
5
|
Home-page: https://github.com/libre-embedded/runtimepy
|
|
6
6
|
Author: Libre Embedded
|
|
@@ -18,10 +18,10 @@ Requires-Python: >=3.12
|
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
Requires-Dist: aiofiles
|
|
21
|
+
Requires-Dist: vcorelib>=3.5.8
|
|
21
22
|
Requires-Dist: psutil
|
|
22
23
|
Requires-Dist: websockets
|
|
23
24
|
Requires-Dist: svgen>=0.7.12
|
|
24
|
-
Requires-Dist: vcorelib>=3.5.8
|
|
25
25
|
Provides-Extra: test
|
|
26
26
|
Requires-Dist: pylint; extra == "test"
|
|
27
27
|
Requires-Dist: flake8; extra == "test"
|
|
@@ -51,11 +51,11 @@ Dynamic: requires-python
|
|
|
51
51
|
=====================================
|
|
52
52
|
generator=datazen
|
|
53
53
|
version=3.2.3
|
|
54
|
-
hash=
|
|
54
|
+
hash=06a038e989fda153238ee650b2f26604
|
|
55
55
|
=====================================
|
|
56
56
|
-->
|
|
57
57
|
|
|
58
|
-
# runtimepy ([5.
|
|
58
|
+
# runtimepy ([5.14.1](https://pypi.org/project/runtimepy/))
|
|
59
59
|
|
|
60
60
|
[](https://pypi.org/project/runtimepy/)
|
|
61
61
|

|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
=====================================
|
|
3
3
|
generator=datazen
|
|
4
4
|
version=3.2.3
|
|
5
|
-
hash=
|
|
5
|
+
hash=06a038e989fda153238ee650b2f26604
|
|
6
6
|
=====================================
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
|
-
# runtimepy ([5.
|
|
9
|
+
# runtimepy ([5.14.1](https://pypi.org/project/runtimepy/))
|
|
10
10
|
|
|
11
11
|
[](https://pypi.org/project/runtimepy/)
|
|
12
12
|

|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# =====================================
|
|
2
2
|
# generator=datazen
|
|
3
3
|
# version=3.2.3
|
|
4
|
-
# hash=
|
|
4
|
+
# hash=49d1cdab220096c364c12f39a37de0aa
|
|
5
5
|
# =====================================
|
|
6
6
|
|
|
7
7
|
"""
|
|
@@ -10,7 +10,7 @@ Useful defaults and other package metadata.
|
|
|
10
10
|
|
|
11
11
|
DESCRIPTION = "A framework for implementing Python services."
|
|
12
12
|
PKG_NAME = "runtimepy"
|
|
13
|
-
VERSION = "5.
|
|
13
|
+
VERSION = "5.14.1"
|
|
14
14
|
|
|
15
15
|
# runtimepy-specific content.
|
|
16
16
|
METRICS_NAME = "metrics"
|
|
@@ -6,6 +6,7 @@ A module implementing an interface to build communication protocols.
|
|
|
6
6
|
from contextlib import contextmanager, suppress
|
|
7
7
|
from copy import copy as _copy
|
|
8
8
|
from io import StringIO
|
|
9
|
+
from typing import BinaryIO as _BinaryIO
|
|
9
10
|
from typing import Iterator as _Iterator
|
|
10
11
|
from typing import NamedTuple
|
|
11
12
|
from typing import Optional as _Optional
|
|
@@ -18,8 +19,9 @@ from vcorelib.logging import LoggerType
|
|
|
18
19
|
|
|
19
20
|
# internal
|
|
20
21
|
from runtimepy.enum import RuntimeEnum as _RuntimeEnum
|
|
21
|
-
from runtimepy.enum.registry import EnumRegistry
|
|
22
|
+
from runtimepy.enum.registry import DEFAULT_ENUM_PRIMITIVE, EnumRegistry
|
|
22
23
|
from runtimepy.primitives import AnyPrimitive as _AnyPrimitive
|
|
24
|
+
from runtimepy.primitives import PrimitiveInstancelike
|
|
23
25
|
from runtimepy.primitives import Primitivelike as _Primitivelike
|
|
24
26
|
from runtimepy.primitives import normalize_instance as _normalize_instance
|
|
25
27
|
from runtimepy.primitives.array import PrimitiveArray
|
|
@@ -29,6 +31,7 @@ from runtimepy.primitives.byte_order import (
|
|
|
29
31
|
from runtimepy.primitives.byte_order import ByteOrder as _ByteOrder
|
|
30
32
|
from runtimepy.primitives.field.fields import BitFields as _BitFields
|
|
31
33
|
from runtimepy.primitives.field.manager import BitFieldsManager
|
|
34
|
+
from runtimepy.primitives.int import UnsignedInt
|
|
32
35
|
from runtimepy.primitives.serializable import Serializable, SerializableMap
|
|
33
36
|
from runtimepy.registry.name import NameRegistry as _NameRegistry
|
|
34
37
|
from runtimepy.registry.name import RegistryKey as _RegistryKey
|
|
@@ -66,11 +69,12 @@ class ProtocolBase(PrimitiveArray):
|
|
|
66
69
|
|
|
67
70
|
def __init__(
|
|
68
71
|
self,
|
|
69
|
-
enum_registry:
|
|
72
|
+
enum_registry: EnumRegistry,
|
|
70
73
|
names: _NameRegistry = None,
|
|
71
74
|
fields: BitFieldsManager = None,
|
|
72
75
|
build: ProtocolBuild = None,
|
|
73
76
|
identifier: int = 1,
|
|
77
|
+
identifier_primitive: PrimitiveInstancelike = DEFAULT_ENUM_PRIMITIVE,
|
|
74
78
|
byte_order: _Union[_ByteOrder, _RegistryKey] = _DEFAULT_BYTE_ORDER,
|
|
75
79
|
serializables: SerializableMap = None,
|
|
76
80
|
alias: str = None,
|
|
@@ -78,6 +82,12 @@ class ProtocolBase(PrimitiveArray):
|
|
|
78
82
|
"""Initialize this protocol."""
|
|
79
83
|
|
|
80
84
|
self.id = identifier
|
|
85
|
+
self.id_primitive: UnsignedInt = _normalize_instance( # type: ignore
|
|
86
|
+
identifier_primitive
|
|
87
|
+
)
|
|
88
|
+
assert self.id_primitive.kind.is_integer
|
|
89
|
+
self.id_primitive.value = self.id
|
|
90
|
+
|
|
81
91
|
self.alias = alias
|
|
82
92
|
|
|
83
93
|
# Register the byte-order enumeration if it's not present.
|
|
@@ -150,6 +160,7 @@ class ProtocolBase(PrimitiveArray):
|
|
|
150
160
|
build=self._build,
|
|
151
161
|
byte_order=self.byte_order,
|
|
152
162
|
identifier=self.id,
|
|
163
|
+
identifier_primitive=self.id_primitive.kind.name,
|
|
153
164
|
serializables={
|
|
154
165
|
key: [val[0].copy_without_chain()]
|
|
155
166
|
for key, val in self.serializables.items()
|
|
@@ -331,3 +342,8 @@ class ProtocolBase(PrimitiveArray):
|
|
|
331
342
|
def __setitem__(self, name: str, val: ProtocolPrimitive) -> None:
|
|
332
343
|
"""Set a value of a field belonging to the protocol."""
|
|
333
344
|
self.set(name, val)
|
|
345
|
+
|
|
346
|
+
def write_with_id(self, stream: _BinaryIO) -> None:
|
|
347
|
+
"""Write this instance to a stream with its identifier as a prefix."""
|
|
348
|
+
self.id_primitive.to_stream(stream, byte_order=self.byte_order)
|
|
349
|
+
self.to_stream(stream)
|
|
@@ -54,6 +54,7 @@ class JsonProtocol(ProtocolBase):
|
|
|
54
54
|
|
|
55
55
|
data[META_KEY] = {
|
|
56
56
|
"id": self.id,
|
|
57
|
+
"id_primitive": self.id_primitive.kind.name,
|
|
57
58
|
"byte_order": self.byte_order.name.lower(),
|
|
58
59
|
"alias": self.alias,
|
|
59
60
|
}
|
|
@@ -131,6 +132,7 @@ class JsonProtocol(ProtocolBase):
|
|
|
131
132
|
fields=fields,
|
|
132
133
|
build=build,
|
|
133
134
|
identifier=_cast(int, data[META_KEY]["id"]),
|
|
135
|
+
identifier_primitive=_cast(str, data[META_KEY]["id_primitive"]),
|
|
134
136
|
byte_order=_cast(str, data[META_KEY]["byte_order"]),
|
|
135
137
|
alias=data[META_KEY]["alias"], # type: ignore
|
|
136
138
|
serializables=serializables,
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"""
|
|
2
|
+
A module implementing an interface for receiving struct messages.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
# built-in
|
|
6
|
+
from io import BytesIO
|
|
7
|
+
import os
|
|
8
|
+
from typing import Callable, Optional
|
|
9
|
+
|
|
10
|
+
# third-party
|
|
11
|
+
from vcorelib.logging import LoggerMixin
|
|
12
|
+
|
|
13
|
+
# internal
|
|
14
|
+
from runtimepy.codec.protocol import Protocol, ProtocolFactory
|
|
15
|
+
from runtimepy.primitives.byte_order import ByteOrder
|
|
16
|
+
from runtimepy.primitives.int import UnsignedInt
|
|
17
|
+
|
|
18
|
+
StructHandler = Callable[[Protocol], None]
|
|
19
|
+
NonStructHandler = Callable[[BytesIO], bool]
|
|
20
|
+
|
|
21
|
+
NON_STRUCT_ID = 0
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class StructReceiver(LoggerMixin):
|
|
25
|
+
"""A class for sending and receiving struct messages."""
|
|
26
|
+
|
|
27
|
+
non_struct_message_prefix: bytes
|
|
28
|
+
id_primitive: UnsignedInt
|
|
29
|
+
byte_order: ByteOrder
|
|
30
|
+
|
|
31
|
+
def __init__(self, *factories: type[ProtocolFactory]) -> None:
|
|
32
|
+
"""Initialize this instance."""
|
|
33
|
+
|
|
34
|
+
super().__init__()
|
|
35
|
+
|
|
36
|
+
self.non_struct_handler: Optional[NonStructHandler] = None
|
|
37
|
+
self.handlers: dict[int, StructHandler] = {}
|
|
38
|
+
self.instances: dict[int, Protocol] = {}
|
|
39
|
+
for factory in factories:
|
|
40
|
+
self.register(factory)
|
|
41
|
+
|
|
42
|
+
def add_non_struct_handler(self, handler: NonStructHandler) -> None:
|
|
43
|
+
"""Set the non-struct handler for this instance."""
|
|
44
|
+
assert self.non_struct_handler is None
|
|
45
|
+
self.non_struct_handler = handler
|
|
46
|
+
|
|
47
|
+
def add_handler(self, identifier: int, handler: StructHandler) -> None:
|
|
48
|
+
"""Add a struct message handler."""
|
|
49
|
+
|
|
50
|
+
assert identifier not in self.handlers
|
|
51
|
+
assert identifier != NON_STRUCT_ID
|
|
52
|
+
self.handlers[identifier] = handler
|
|
53
|
+
|
|
54
|
+
def register(self, factory: type[ProtocolFactory]) -> None:
|
|
55
|
+
"""Track a protocol factory's structure by identifier."""
|
|
56
|
+
|
|
57
|
+
inst = factory.singleton()
|
|
58
|
+
|
|
59
|
+
assert inst.id != NON_STRUCT_ID
|
|
60
|
+
|
|
61
|
+
if not hasattr(self, "id_primitive"):
|
|
62
|
+
self.id_primitive = inst.id_primitive.copy() # type: ignore
|
|
63
|
+
self.byte_order = inst.byte_order
|
|
64
|
+
self.non_struct_message_prefix = self.id_primitive.kind.encode(
|
|
65
|
+
NON_STRUCT_ID, byte_order=self.byte_order
|
|
66
|
+
)
|
|
67
|
+
else:
|
|
68
|
+
assert self.id_primitive.kind == inst.id_primitive.kind
|
|
69
|
+
assert self.byte_order == inst.byte_order
|
|
70
|
+
|
|
71
|
+
assert inst.id not in self.instances
|
|
72
|
+
self.instances[inst.id] = inst
|
|
73
|
+
|
|
74
|
+
def process(self, data: bytes) -> None:
|
|
75
|
+
"""Attempt to process a struct message."""
|
|
76
|
+
|
|
77
|
+
with BytesIO(data) as stream:
|
|
78
|
+
stream.seek(0, os.SEEK_END)
|
|
79
|
+
end_pos = stream.tell()
|
|
80
|
+
stream.seek(0, os.SEEK_SET)
|
|
81
|
+
|
|
82
|
+
while stream.tell() < end_pos:
|
|
83
|
+
ident = self.id_primitive.from_stream(
|
|
84
|
+
stream, byte_order=self.byte_order
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
# Handle non-struct messages.
|
|
88
|
+
if ident == NON_STRUCT_ID:
|
|
89
|
+
if self.non_struct_handler is not None:
|
|
90
|
+
if not self.non_struct_handler(stream):
|
|
91
|
+
self.logger.error(
|
|
92
|
+
"Parsing non-struct message failed."
|
|
93
|
+
)
|
|
94
|
+
stream.seek(0, os.SEEK_END)
|
|
95
|
+
else:
|
|
96
|
+
self.logger.error(
|
|
97
|
+
"No handler for non-struct messages."
|
|
98
|
+
)
|
|
99
|
+
stream.seek(0, os.SEEK_END)
|
|
100
|
+
|
|
101
|
+
# Handle struct messages.
|
|
102
|
+
elif ident in self.instances:
|
|
103
|
+
inst = self.instances[ident]
|
|
104
|
+
inst.from_stream(stream)
|
|
105
|
+
if ident in self.handlers:
|
|
106
|
+
self.handlers[ident](inst)
|
|
107
|
+
else:
|
|
108
|
+
self.logger.warning(
|
|
109
|
+
"No message handler for struct '%d' (%s).",
|
|
110
|
+
ident,
|
|
111
|
+
inst,
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
# Can't continue reading if we don't know this identifier.
|
|
115
|
+
else:
|
|
116
|
+
self.logger.error("Unknown struct identifier '%d'.", ident)
|
|
117
|
+
stream.seek(0, os.SEEK_END)
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
# =====================================
|
|
2
2
|
# generator=datazen
|
|
3
3
|
# version=3.2.3
|
|
4
|
-
# hash=
|
|
4
|
+
# hash=f4667fb34b5066e16f0621961f11efd8
|
|
5
5
|
# =====================================
|
|
6
6
|
|
|
7
7
|
"""
|
|
8
8
|
A module aggregating package commands.
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
-
# built-in
|
|
12
|
-
from typing import List as _List
|
|
13
|
-
from typing import Tuple as _Tuple
|
|
14
|
-
|
|
15
11
|
# third-party
|
|
16
12
|
from vcorelib.args import CommandRegister as _CommandRegister
|
|
17
13
|
|
|
@@ -24,7 +20,7 @@ from runtimepy.commands.tftp import add_tftp_cmd
|
|
|
24
20
|
from runtimepy.commands.tui import add_tui_cmd
|
|
25
21
|
|
|
26
22
|
|
|
27
|
-
def commands() ->
|
|
23
|
+
def commands() -> list[tuple[str, str, _CommandRegister]]:
|
|
28
24
|
"""Get this package's commands."""
|
|
29
25
|
|
|
30
26
|
return [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# =====================================
|
|
2
2
|
# generator=datazen
|
|
3
3
|
# version=3.2.3
|
|
4
|
-
# hash=
|
|
4
|
+
# hash=17cbf063ff27b9146abd2014891778a2
|
|
5
5
|
# =====================================
|
|
6
6
|
|
|
7
7
|
"""
|
|
@@ -14,7 +14,6 @@ from logging import getLogger
|
|
|
14
14
|
import os
|
|
15
15
|
from pathlib import Path
|
|
16
16
|
import sys
|
|
17
|
-
from typing import List
|
|
18
17
|
|
|
19
18
|
# third-party
|
|
20
19
|
from vcorelib.logging import init_logging, log_time, logging_args
|
|
@@ -24,7 +23,7 @@ from runtimepy import DESCRIPTION, VERSION
|
|
|
24
23
|
from runtimepy.app import add_app_args, entry
|
|
25
24
|
|
|
26
25
|
|
|
27
|
-
def main(argv:
|
|
26
|
+
def main(argv: list[str] = None) -> int:
|
|
28
27
|
"""Program entry-point."""
|
|
29
28
|
|
|
30
29
|
result = 0
|
|
@@ -121,9 +121,10 @@ def create(value: Primitivelike, **kwargs) -> AnyPrimitive:
|
|
|
121
121
|
return normalize(value)(**kwargs)
|
|
122
122
|
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
PrimitiveInstancelike = _Union[Primitivelike, AnyPrimitive]
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def normalize_instance(value: PrimitiveInstancelike, **kwargs) -> AnyPrimitive:
|
|
127
128
|
"""Creates a new instance only if necessary."""
|
|
128
129
|
|
|
129
130
|
if not isinstance(value, Primitive):
|
|
@@ -93,7 +93,12 @@ class Primitive(_Generic[T]):
|
|
|
93
93
|
|
|
94
94
|
def __copy__(self) -> "Primitive[T]":
|
|
95
95
|
"""Make a copy of this primitive."""
|
|
96
|
-
|
|
96
|
+
|
|
97
|
+
return type(self)(
|
|
98
|
+
value=self.value,
|
|
99
|
+
scaling=self.scaling,
|
|
100
|
+
time_source=self.time_source,
|
|
101
|
+
)
|
|
97
102
|
|
|
98
103
|
def copy(self) -> "Primitive[T]":
|
|
99
104
|
"""A simple wrapper for copy."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: runtimepy
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.14.1
|
|
4
4
|
Summary: A framework for implementing Python services.
|
|
5
5
|
Home-page: https://github.com/libre-embedded/runtimepy
|
|
6
6
|
Author: Libre Embedded
|
|
@@ -18,10 +18,10 @@ Requires-Python: >=3.12
|
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
Requires-Dist: aiofiles
|
|
21
|
+
Requires-Dist: vcorelib>=3.5.8
|
|
21
22
|
Requires-Dist: psutil
|
|
22
23
|
Requires-Dist: websockets
|
|
23
24
|
Requires-Dist: svgen>=0.7.12
|
|
24
|
-
Requires-Dist: vcorelib>=3.5.8
|
|
25
25
|
Provides-Extra: test
|
|
26
26
|
Requires-Dist: pylint; extra == "test"
|
|
27
27
|
Requires-Dist: flake8; extra == "test"
|
|
@@ -51,11 +51,11 @@ Dynamic: requires-python
|
|
|
51
51
|
=====================================
|
|
52
52
|
generator=datazen
|
|
53
53
|
version=3.2.3
|
|
54
|
-
hash=
|
|
54
|
+
hash=06a038e989fda153238ee650b2f26604
|
|
55
55
|
=====================================
|
|
56
56
|
-->
|
|
57
57
|
|
|
58
|
-
# runtimepy ([5.
|
|
58
|
+
# runtimepy ([5.14.1](https://pypi.org/project/runtimepy/))
|
|
59
59
|
|
|
60
60
|
[](https://pypi.org/project/runtimepy/)
|
|
61
61
|

|
|
@@ -37,6 +37,7 @@ runtimepy/codec/__init__.py
|
|
|
37
37
|
runtimepy/codec/protocol/__init__.py
|
|
38
38
|
runtimepy/codec/protocol/base.py
|
|
39
39
|
runtimepy/codec/protocol/json.py
|
|
40
|
+
runtimepy/codec/protocol/receiver.py
|
|
40
41
|
runtimepy/codec/system/__init__.py
|
|
41
42
|
runtimepy/commands/__init__.py
|
|
42
43
|
runtimepy/commands/all.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|