runtimepy 5.4.3__tar.gz → 5.5.0__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.4.3/runtimepy.egg-info → runtimepy-5.5.0}/PKG-INFO +29 -7
- {runtimepy-5.4.3 → runtimepy-5.5.0}/README.md +26 -4
- {runtimepy-5.4.3 → runtimepy-5.5.0}/pyproject.toml +1 -1
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/__init__.py +2 -2
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/channel/environment/__init__.py +0 -5
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/channel/environment/array.py +15 -4
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/channel/environment/base.py +0 -2
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/channel/environment/sample.py +107 -43
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/commands/all.py +7 -1
- runtimepy-5.5.0/runtimepy/commands/mtu.py +57 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/commands/tftp.py +4 -2
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/classes/TabInterface.js +37 -4
- runtimepy-5.5.0/runtimepy/data/sample_telemetry.yaml +29 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/info.py +13 -3
- runtimepy-5.5.0/runtimepy/net/arbiter/struct/__init__.py +202 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/mixin.py +26 -1
- runtimepy-5.5.0/runtimepy/net/mtu.py +141 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/env/tab/message.py +17 -5
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/websocket/state.py +4 -2
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/udp/connection.py +2 -4
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/udp/tftp/__init__.py +19 -7
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/udp/tftp/base.py +25 -24
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/util.py +69 -10
- runtimepy-5.5.0/runtimepy/primitives/serializable/framer.py +73 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/struct/__init__.py +4 -1
- runtimepy-5.5.0/runtimepy/telemetry/sample.py +113 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0/runtimepy.egg-info}/PKG-INFO +29 -7
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy.egg-info/SOURCES.txt +6 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/LICENSE +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/__main__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/app.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/channel/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/channel/environment/command/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/channel/environment/command/parser.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/channel/environment/command/processor.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/channel/environment/command/result.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/channel/environment/create.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/channel/environment/file.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/channel/environment/telemetry.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/channel/event/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/channel/event/header.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/channel/registry.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/codec/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/codec/protocol/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/codec/protocol/base.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/codec/protocol/json.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/codec/system/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/commands/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/commands/arbiter.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/commands/common.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/commands/server.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/commands/task.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/commands/tui.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/control/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/control/env/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/control/source.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/control/step.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/browser.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/css/bootstrap_extra.css +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/css/main.css +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/dummy_load.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/factories.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/favicon.ico +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/DataConnection.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/JsonConnection.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/audio.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/classes/App.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/classes/ChannelTable.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/classes/DataConnection.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/classes/JsonConnection.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/classes/OverlayManager.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/classes/Plot.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/classes/PlotDrawer.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/classes/PlotManager.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/classes/PlotModalManager.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/classes/PointBuffer.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/classes/PointManager.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/classes/TabFilter.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/classes/UnitSystem.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/classes/WindowHashManager.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/classes/WorkerInterface.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/events.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/init.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/main.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/tab/env.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/tab/sound.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/third-party/webgl-debug.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/unused/pyodide.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/util.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/js/worker.js +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/BitFields.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/Channel.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/ChannelCommand.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/ChannelRegistry.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/ClientConnectionConfig.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/ConnectionArbiterConfig.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/EnumRegistry.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/FindFile.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/PeerProcessConfig.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/RuntimeEnum.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/ServerConnectionConfig.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/StructConfig.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/TaskConfig.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/channel_controls.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/has_config.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/has_factory.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/has_name.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/schemas/has_request_flag.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/server.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/server_base.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/server_dev.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/data/tftp_server.yaml +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/dev_requirements.txt +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/entry.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/enum/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/enum/registry.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/enum/types.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/mapping.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/message/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/message/handlers.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/message/interface.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/message/types.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/metrics/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/metrics/channel.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/metrics/connection.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/metrics/task.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/mixins/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/mixins/async_command.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/mixins/enum.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/mixins/environment.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/mixins/finalize.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/mixins/logging.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/mixins/psutil.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/mixins/regex.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/mixins/trig.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/apps/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/base.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/config/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/config/codec.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/config/util.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/factory/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/factory/connection.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/factory/task.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/housekeeping/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/imports/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/imports/util.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/result.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/task.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/tcp/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/tcp/json.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/udp.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/arbiter/websocket.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/backoff.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/connection.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/factories/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/http/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/http/common.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/http/header.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/http/request_target.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/http/response.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/http/state.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/http/version.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/manager.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/base.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/bootstrap/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/bootstrap/elements.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/bootstrap/tabs.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/create.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/elements.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/env/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/env/modal.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/env/tab/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/env/tab/base.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/env/tab/controls.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/env/tab/html.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/env/widgets.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/files.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/landing_page.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/placeholder.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/pyodide.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/sound.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/app/tab.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/html.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/json.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/struct/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/server/websocket/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/stream/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/stream/base.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/stream/json/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/stream/string.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/tcp/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/tcp/connection.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/tcp/create.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/tcp/http/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/tcp/protocol.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/tcp/scpi/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/tcp/telnet/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/tcp/telnet/codes.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/tcp/telnet/np_05b.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/udp/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/udp/create.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/udp/protocol.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/udp/queue.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/udp/tftp/endpoint.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/udp/tftp/enums.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/udp/tftp/io.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/websocket/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/net/websocket/connection.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/noise/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/array/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/base.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/bool.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/byte_order.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/evaluation.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/field/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/field/fields.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/field/manager/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/field/manager/base.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/float.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/int.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/scaling.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/serializable/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/serializable/base.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/serializable/fixed.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/serializable/prefixed.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/string.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/types/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/types/base.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/types/bool.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/types/bounds.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/types/float.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/primitives/types/int.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/py.typed +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/registry/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/registry/bool.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/registry/item.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/registry/name.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/requirements.txt +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/sample/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/sample/peer.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/sample/program.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/schemas.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/subprocess/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/subprocess/interface.py +1 -1
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/subprocess/peer.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/subprocess/program.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/subprocess/protocol.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/task/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/task/asynchronous.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/task/basic/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/task/basic/manager.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/task/basic/periodic.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/task/sample.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/task/trig/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/telemetry/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/tui/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/tui/channels/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/tui/cursor.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/tui/mixin.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/tui/mock.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/tui/task.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/ui/__init__.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/ui/controls.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy/util.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy.egg-info/dependency_links.txt +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy.egg-info/entry_points.txt +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy.egg-info/requires.txt +2 -2
- {runtimepy-5.4.3 → runtimepy-5.5.0}/runtimepy.egg-info/top_level.txt +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/setup.cfg +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/setup.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/tests/test_entry.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/tests/test_mapping.py +0 -0
- {runtimepy-5.4.3 → runtimepy-5.5.0}/tests/test_resources.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: runtimepy
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.5.0
|
|
4
4
|
Summary: A framework for implementing Python services.
|
|
5
5
|
Home-page: https://github.com/vkottler/runtimepy
|
|
6
6
|
Author: Vaughn Kottler
|
|
@@ -17,10 +17,10 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
17
17
|
Requires-Python: >=3.11
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
|
+
Requires-Dist: websockets
|
|
20
21
|
Requires-Dist: svgen>=0.6.8
|
|
21
|
-
Requires-Dist: vcorelib>=3.3.1
|
|
22
22
|
Requires-Dist: psutil
|
|
23
|
-
Requires-Dist:
|
|
23
|
+
Requires-Dist: vcorelib>=3.3.1
|
|
24
24
|
Provides-Extra: test
|
|
25
25
|
Requires-Dist: pylint; extra == "test"
|
|
26
26
|
Requires-Dist: flake8; extra == "test"
|
|
@@ -44,11 +44,11 @@ Requires-Dist: uvloop; (sys_platform != "win32" and sys_platform != "cygwin") an
|
|
|
44
44
|
=====================================
|
|
45
45
|
generator=datazen
|
|
46
46
|
version=3.1.4
|
|
47
|
-
hash=
|
|
47
|
+
hash=5c5edaf1332d842e9ca04a018455beba
|
|
48
48
|
=====================================
|
|
49
49
|
-->
|
|
50
50
|
|
|
51
|
-
# runtimepy ([5.
|
|
51
|
+
# runtimepy ([5.5.0](https://pypi.org/project/runtimepy/))
|
|
52
52
|
|
|
53
53
|
[](https://pypi.org/project/runtimepy/)
|
|
54
54
|

|
|
@@ -90,7 +90,7 @@ This package is tested on the following platforms:
|
|
|
90
90
|
$ ./venv3.12/bin/runtimepy -h
|
|
91
91
|
|
|
92
92
|
usage: runtimepy [-h] [--version] [-v] [-q] [--curses] [--no-uvloop] [-C DIR]
|
|
93
|
-
{arbiter,server,task,tftp,tui,noop} ...
|
|
93
|
+
{arbiter,mtu,server,task,tftp,tui,noop} ...
|
|
94
94
|
|
|
95
95
|
A framework for implementing Python services.
|
|
96
96
|
|
|
@@ -104,9 +104,10 @@ options:
|
|
|
104
104
|
-C DIR, --dir DIR execute from a specific directory
|
|
105
105
|
|
|
106
106
|
commands:
|
|
107
|
-
{arbiter,server,task,tftp,tui,noop}
|
|
107
|
+
{arbiter,mtu,server,task,tftp,tui,noop}
|
|
108
108
|
set of available commands
|
|
109
109
|
arbiter run a connection-arbiter application from a config
|
|
110
|
+
mtu probe for MTU size to some endpoint
|
|
110
111
|
server run a server for a specific connection factory
|
|
111
112
|
task run a task from a specific task factory
|
|
112
113
|
tftp perform a tftp interaction
|
|
@@ -138,6 +139,27 @@ options:
|
|
|
138
139
|
|
|
139
140
|
```
|
|
140
141
|
|
|
142
|
+
### `mtu`
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
$ ./venv3.12/bin/runtimepy mtu -h
|
|
146
|
+
|
|
147
|
+
usage: runtimepy mtu [-h] [--probe-size PROBE_SIZE] [--fallback FALLBACK] [-t]
|
|
148
|
+
destination [destination ...]
|
|
149
|
+
|
|
150
|
+
positional arguments:
|
|
151
|
+
destination endpoint parameters (host, port[, flowinfo, scope_id])
|
|
152
|
+
|
|
153
|
+
options:
|
|
154
|
+
-h, --help show this help message and exit
|
|
155
|
+
--probe-size PROBE_SIZE
|
|
156
|
+
data payload size to use for probe (default: 1432)
|
|
157
|
+
--fallback FALLBACK fallback MTU value if probing doesn't succeed (i.e.
|
|
158
|
+
not on Linux, default: 1500)
|
|
159
|
+
-t, --tcp use TCP instead of UDP
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
|
|
141
163
|
### `server`
|
|
142
164
|
|
|
143
165
|
```
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
=====================================
|
|
3
3
|
generator=datazen
|
|
4
4
|
version=3.1.4
|
|
5
|
-
hash=
|
|
5
|
+
hash=5c5edaf1332d842e9ca04a018455beba
|
|
6
6
|
=====================================
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
|
-
# runtimepy ([5.
|
|
9
|
+
# runtimepy ([5.5.0](https://pypi.org/project/runtimepy/))
|
|
10
10
|
|
|
11
11
|
[](https://pypi.org/project/runtimepy/)
|
|
12
12
|

|
|
@@ -48,7 +48,7 @@ This package is tested on the following platforms:
|
|
|
48
48
|
$ ./venv3.12/bin/runtimepy -h
|
|
49
49
|
|
|
50
50
|
usage: runtimepy [-h] [--version] [-v] [-q] [--curses] [--no-uvloop] [-C DIR]
|
|
51
|
-
{arbiter,server,task,tftp,tui,noop} ...
|
|
51
|
+
{arbiter,mtu,server,task,tftp,tui,noop} ...
|
|
52
52
|
|
|
53
53
|
A framework for implementing Python services.
|
|
54
54
|
|
|
@@ -62,9 +62,10 @@ options:
|
|
|
62
62
|
-C DIR, --dir DIR execute from a specific directory
|
|
63
63
|
|
|
64
64
|
commands:
|
|
65
|
-
{arbiter,server,task,tftp,tui,noop}
|
|
65
|
+
{arbiter,mtu,server,task,tftp,tui,noop}
|
|
66
66
|
set of available commands
|
|
67
67
|
arbiter run a connection-arbiter application from a config
|
|
68
|
+
mtu probe for MTU size to some endpoint
|
|
68
69
|
server run a server for a specific connection factory
|
|
69
70
|
task run a task from a specific task factory
|
|
70
71
|
tftp perform a tftp interaction
|
|
@@ -96,6 +97,27 @@ options:
|
|
|
96
97
|
|
|
97
98
|
```
|
|
98
99
|
|
|
100
|
+
### `mtu`
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
$ ./venv3.12/bin/runtimepy mtu -h
|
|
104
|
+
|
|
105
|
+
usage: runtimepy mtu [-h] [--probe-size PROBE_SIZE] [--fallback FALLBACK] [-t]
|
|
106
|
+
destination [destination ...]
|
|
107
|
+
|
|
108
|
+
positional arguments:
|
|
109
|
+
destination endpoint parameters (host, port[, flowinfo, scope_id])
|
|
110
|
+
|
|
111
|
+
options:
|
|
112
|
+
-h, --help show this help message and exit
|
|
113
|
+
--probe-size PROBE_SIZE
|
|
114
|
+
data payload size to use for probe (default: 1432)
|
|
115
|
+
--fallback FALLBACK fallback MTU value if probing doesn't succeed (i.e.
|
|
116
|
+
not on Linux, default: 1500)
|
|
117
|
+
-t, --tcp use TCP instead of UDP
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
|
|
99
121
|
### `server`
|
|
100
122
|
|
|
101
123
|
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# =====================================
|
|
2
2
|
# generator=datazen
|
|
3
3
|
# version=3.1.4
|
|
4
|
-
# hash=
|
|
4
|
+
# hash=e8348ec684fac751916510d1d8c7dafb
|
|
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.5.0"
|
|
14
14
|
|
|
15
15
|
# runtimepy-specific content.
|
|
16
16
|
METRICS_NAME = "metrics"
|
|
@@ -29,11 +29,6 @@ class ChannelEnvironment(
|
|
|
29
29
|
):
|
|
30
30
|
"""A class integrating channel and enumeration registries."""
|
|
31
31
|
|
|
32
|
-
@property
|
|
33
|
-
def names(self) -> _Iterator[str]:
|
|
34
|
-
"""Iterate over registered names in the environment."""
|
|
35
|
-
yield from self.channels.names.names
|
|
36
|
-
|
|
37
32
|
def search_names(
|
|
38
33
|
self, pattern: str, exact: bool = False
|
|
39
34
|
) -> _Iterator[str]:
|
|
@@ -4,6 +4,7 @@ A channel-environment extension for creating arrays of primitives.
|
|
|
4
4
|
|
|
5
5
|
# built-in
|
|
6
6
|
from typing import Iterable as _Iterable
|
|
7
|
+
from typing import Iterator as _Iterator
|
|
7
8
|
from typing import NamedTuple
|
|
8
9
|
from typing import Optional as _Optional
|
|
9
10
|
|
|
@@ -23,9 +24,9 @@ class ChannelArray(NamedTuple):
|
|
|
23
24
|
array: _PrimitiveArray
|
|
24
25
|
|
|
25
26
|
@staticmethod
|
|
26
|
-
def create() -> "ChannelArray":
|
|
27
|
+
def create(**kwargs) -> "ChannelArray":
|
|
27
28
|
"""Create a new, empty channel array."""
|
|
28
|
-
return ChannelArray([], _PrimitiveArray())
|
|
29
|
+
return ChannelArray([], _PrimitiveArray(**kwargs))
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
class ArrayChannelEnvironment(_BaseChannelEnvironment):
|
|
@@ -33,12 +34,19 @@ class ArrayChannelEnvironment(_BaseChannelEnvironment):
|
|
|
33
34
|
A channel-environment extension for working with arrays of primitives.
|
|
34
35
|
"""
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
@property
|
|
38
|
+
def names(self) -> _Iterator[str]:
|
|
39
|
+
"""Iterate over registered names in the environment."""
|
|
40
|
+
yield from self.channels.names.names
|
|
41
|
+
|
|
42
|
+
def array(
|
|
43
|
+
self, keys: _Iterable[_RegistryKey] = None, **kwargs
|
|
44
|
+
) -> ChannelArray:
|
|
37
45
|
"""
|
|
38
46
|
Create a primitive array from an in-order iterable of registry keys.
|
|
39
47
|
"""
|
|
40
48
|
|
|
41
|
-
result = ChannelArray.create()
|
|
49
|
+
result = ChannelArray.create(**kwargs)
|
|
42
50
|
|
|
43
51
|
curr_fields: _Optional[_BitFields] = None
|
|
44
52
|
invalid_field_names: set[str] = set()
|
|
@@ -46,6 +54,9 @@ class ArrayChannelEnvironment(_BaseChannelEnvironment):
|
|
|
46
54
|
|
|
47
55
|
names: set[str] = set()
|
|
48
56
|
|
|
57
|
+
if keys is None:
|
|
58
|
+
keys = self.names
|
|
59
|
+
|
|
49
60
|
for key in keys:
|
|
50
61
|
# All keys must be registered names.
|
|
51
62
|
name = self.channels.names.name(key)
|
|
@@ -24,8 +24,6 @@ from runtimepy.enum import RuntimeEnum as _RuntimeEnum
|
|
|
24
24
|
from runtimepy.enum.registry import EnumRegistry as _EnumRegistry
|
|
25
25
|
from runtimepy.mixins.finalize import FinalizeMixin
|
|
26
26
|
from runtimepy.primitives import BaseIntPrimitive, StrToBool
|
|
27
|
-
|
|
28
|
-
# third-party
|
|
29
27
|
from runtimepy.primitives.evaluation import EvalResult, Operator, sample_for
|
|
30
28
|
from runtimepy.primitives.field import BitField as _BitField
|
|
31
29
|
from runtimepy.primitives.field.fields import BitFields as _BitFields
|
|
@@ -7,19 +7,18 @@ from random import randint, random
|
|
|
7
7
|
|
|
8
8
|
# internal
|
|
9
9
|
from runtimepy.channel.environment import ChannelEnvironment
|
|
10
|
+
from runtimepy.enum import RuntimeEnum
|
|
10
11
|
from runtimepy.primitives import Uint8
|
|
11
12
|
from runtimepy.primitives.field import BitField, BitFlag
|
|
12
13
|
|
|
13
14
|
|
|
14
|
-
def
|
|
15
|
-
|
|
15
|
+
def sample_int_enum(
|
|
16
|
+
env: ChannelEnvironment, name: str = "SampleEnum"
|
|
17
|
+
) -> RuntimeEnum:
|
|
18
|
+
"""A sample integer enumeration."""
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
# Register an enum.
|
|
21
|
-
sample_enum = env.enum(
|
|
22
|
-
"SampleEnum",
|
|
20
|
+
return env.enum(
|
|
21
|
+
name,
|
|
23
22
|
"int",
|
|
24
23
|
items={
|
|
25
24
|
"zero": 0,
|
|
@@ -36,12 +35,16 @@ def sample_env(env: ChannelEnvironment = None) -> ChannelEnvironment:
|
|
|
36
35
|
},
|
|
37
36
|
)
|
|
38
37
|
|
|
39
|
-
# Boolean enumeration.
|
|
40
|
-
env.enum("OnOff", "bool", {"On": True, "Off": False})
|
|
41
|
-
env.bool_channel("sample_state", commandable=True, enum="OnOff")
|
|
42
38
|
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
def long_name_int_enum(
|
|
40
|
+
env: ChannelEnvironment,
|
|
41
|
+
name: str = "InsanelyLongEnumNameForTesting",
|
|
42
|
+
channel: str = "sample_enum",
|
|
43
|
+
) -> RuntimeEnum:
|
|
44
|
+
"""Add an integer enumeration with a long name."""
|
|
45
|
+
|
|
46
|
+
result = env.enum(
|
|
47
|
+
name,
|
|
45
48
|
"int",
|
|
46
49
|
{
|
|
47
50
|
"very_long_member_name_0": 0,
|
|
@@ -50,40 +53,101 @@ def sample_env(env: ChannelEnvironment = None) -> ChannelEnvironment:
|
|
|
50
53
|
"very_long_member_name_3": 3,
|
|
51
54
|
},
|
|
52
55
|
)
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
|
|
57
|
+
if channel:
|
|
58
|
+
env.int_channel(
|
|
59
|
+
channel,
|
|
60
|
+
commandable=True,
|
|
61
|
+
enum="InsanelyLongEnumNameForTesting",
|
|
62
|
+
description="A sample long-enum-name channel.",
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
return result
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def sample_bool_enum(
|
|
69
|
+
env: ChannelEnvironment, name: str = "OnOff", channel: str = "sample_state"
|
|
70
|
+
) -> RuntimeEnum:
|
|
71
|
+
"""A sample boolean enumeration."""
|
|
72
|
+
|
|
73
|
+
result = env.enum(name, "bool", {"On": True, "Off": False})
|
|
74
|
+
|
|
75
|
+
if channel:
|
|
76
|
+
env.bool_channel(
|
|
77
|
+
channel,
|
|
78
|
+
commandable=True,
|
|
79
|
+
enum="OnOff",
|
|
80
|
+
description="A sample on-off state channel.",
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
return result
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def sample_fields(env: ChannelEnvironment, enum: str = "SampleEnum") -> None:
|
|
87
|
+
"""Add sample bit-fields to an environment."""
|
|
88
|
+
|
|
89
|
+
with env.names_pushed("fields"):
|
|
90
|
+
prim = Uint8()
|
|
91
|
+
env.int_channel("raw", prim)
|
|
92
|
+
|
|
93
|
+
# Add a bit field and flag.
|
|
94
|
+
env.add_field(BitFlag("flag1", prim, 0))
|
|
95
|
+
env.add_field(
|
|
96
|
+
BitFlag(
|
|
97
|
+
"flag2",
|
|
98
|
+
prim,
|
|
99
|
+
1,
|
|
100
|
+
commandable=True,
|
|
101
|
+
description="Sample bit flag.",
|
|
102
|
+
)
|
|
103
|
+
)
|
|
104
|
+
env.add_field(
|
|
105
|
+
BitField(
|
|
106
|
+
"field1",
|
|
107
|
+
prim,
|
|
108
|
+
2,
|
|
109
|
+
2,
|
|
110
|
+
enum=enum if enum else None,
|
|
111
|
+
commandable=True,
|
|
112
|
+
description="Sample bit field.",
|
|
113
|
+
)
|
|
114
|
+
)
|
|
115
|
+
env.add_field(BitField("field2", prim, 4, 4, commandable=True))
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def sample_float(
|
|
119
|
+
env: ChannelEnvironment,
|
|
120
|
+
channel: str = "sample_float",
|
|
121
|
+
kind: str = "double",
|
|
122
|
+
) -> None:
|
|
123
|
+
"""Add a sample floating-point channel."""
|
|
124
|
+
|
|
125
|
+
env.float_channel(
|
|
126
|
+
channel,
|
|
127
|
+
kind,
|
|
128
|
+
commandable=True,
|
|
129
|
+
description="A sample floating-point member.",
|
|
55
130
|
)
|
|
56
|
-
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def sample_env(env: ChannelEnvironment = None) -> ChannelEnvironment:
|
|
134
|
+
"""Register sample enumerations and channels to an environment."""
|
|
135
|
+
|
|
136
|
+
if env is None:
|
|
137
|
+
env = ChannelEnvironment()
|
|
138
|
+
|
|
139
|
+
# Register an enum.
|
|
140
|
+
sample_int_enum(env)
|
|
141
|
+
|
|
142
|
+
# Boolean enumeration.
|
|
143
|
+
sample_bool_enum(env)
|
|
144
|
+
|
|
145
|
+
long_name_int_enum(env)
|
|
146
|
+
sample_float(env)
|
|
57
147
|
|
|
58
148
|
for name in ["a", "b", "c"]:
|
|
59
149
|
with env.names_pushed(name):
|
|
60
|
-
|
|
61
|
-
prim = Uint8()
|
|
62
|
-
env.int_channel("raw", prim)
|
|
63
|
-
|
|
64
|
-
# Add a bit field and flag.
|
|
65
|
-
env.add_field(BitFlag("flag1", prim, 0))
|
|
66
|
-
env.add_field(
|
|
67
|
-
BitFlag(
|
|
68
|
-
"flag2",
|
|
69
|
-
prim,
|
|
70
|
-
1,
|
|
71
|
-
commandable=True,
|
|
72
|
-
description="Sample bit flag.",
|
|
73
|
-
)
|
|
74
|
-
)
|
|
75
|
-
env.add_field(
|
|
76
|
-
BitField(
|
|
77
|
-
"field1",
|
|
78
|
-
prim,
|
|
79
|
-
2,
|
|
80
|
-
2,
|
|
81
|
-
enum=sample_enum.id,
|
|
82
|
-
commandable=True,
|
|
83
|
-
description="Sample bit field.",
|
|
84
|
-
)
|
|
85
|
-
)
|
|
86
|
-
env.add_field(BitField("field2", prim, 4, 4, commandable=True))
|
|
150
|
+
sample_fields(env)
|
|
87
151
|
|
|
88
152
|
for i in range(10):
|
|
89
153
|
with env.names_pushed(str(i)):
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# =====================================
|
|
2
2
|
# generator=datazen
|
|
3
3
|
# version=3.1.4
|
|
4
|
-
# hash=
|
|
4
|
+
# hash=1814b7f7fae3556a0dbeec37141e4182
|
|
5
5
|
# =====================================
|
|
6
6
|
|
|
7
7
|
"""
|
|
@@ -17,6 +17,7 @@ from vcorelib.args import CommandRegister as _CommandRegister
|
|
|
17
17
|
|
|
18
18
|
# internal
|
|
19
19
|
from runtimepy.commands.arbiter import add_arbiter_cmd
|
|
20
|
+
from runtimepy.commands.mtu import add_mtu_cmd
|
|
20
21
|
from runtimepy.commands.server import add_server_cmd
|
|
21
22
|
from runtimepy.commands.task import add_task_cmd
|
|
22
23
|
from runtimepy.commands.tftp import add_tftp_cmd
|
|
@@ -32,6 +33,11 @@ def commands() -> _List[_Tuple[str, str, _CommandRegister]]:
|
|
|
32
33
|
"run a connection-arbiter application from a config",
|
|
33
34
|
add_arbiter_cmd,
|
|
34
35
|
),
|
|
36
|
+
(
|
|
37
|
+
"mtu",
|
|
38
|
+
"probe for MTU size to some endpoint",
|
|
39
|
+
add_mtu_cmd,
|
|
40
|
+
),
|
|
35
41
|
(
|
|
36
42
|
"server",
|
|
37
43
|
"run a server for a specific connection factory",
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"""
|
|
2
|
+
An entry-point for the 'mtu' command.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
# built-in
|
|
6
|
+
import argparse
|
|
7
|
+
import socket
|
|
8
|
+
|
|
9
|
+
# third-party
|
|
10
|
+
from vcorelib.args import CommandFunction
|
|
11
|
+
|
|
12
|
+
# internal
|
|
13
|
+
from runtimepy.net.mtu import ETHERNET_MTU, UDP_DEFAULT_MTU, discover_mtu
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def mtu_cmd(args: argparse.Namespace) -> int:
|
|
17
|
+
"""Execute the mtu command."""
|
|
18
|
+
|
|
19
|
+
discover_mtu(
|
|
20
|
+
args.destination[0],
|
|
21
|
+
*(int(x) for x in args.destination[1:]),
|
|
22
|
+
probe_size=args.probe_size,
|
|
23
|
+
fallback=args.fallback,
|
|
24
|
+
kind=socket.SOCK_STREAM if args.tcp else socket.SOCK_DGRAM,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
return 0
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def add_mtu_cmd(parser: argparse.ArgumentParser) -> CommandFunction:
|
|
31
|
+
"""Add mtu-command arguments to its parser."""
|
|
32
|
+
|
|
33
|
+
parser.add_argument(
|
|
34
|
+
"--probe-size",
|
|
35
|
+
type=int,
|
|
36
|
+
default=UDP_DEFAULT_MTU,
|
|
37
|
+
help="data payload size to use for probe (default: %(default)d)",
|
|
38
|
+
)
|
|
39
|
+
parser.add_argument(
|
|
40
|
+
"--fallback",
|
|
41
|
+
type=int,
|
|
42
|
+
default=ETHERNET_MTU,
|
|
43
|
+
help="fallback MTU value if probing doesn't succeed "
|
|
44
|
+
"(i.e. not on Linux, default: %(default)d)",
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
parser.add_argument(
|
|
48
|
+
"-t", "--tcp", action="store_true", help="use TCP instead of UDP"
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
parser.add_argument(
|
|
52
|
+
"destination",
|
|
53
|
+
nargs="+",
|
|
54
|
+
help="endpoint parameters (host, port[, flowinfo, scope_id])",
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
return mtu_cmd
|
|
@@ -6,7 +6,6 @@ An entry-point for the 'tftp' command.
|
|
|
6
6
|
import argparse
|
|
7
7
|
import asyncio
|
|
8
8
|
from pathlib import Path
|
|
9
|
-
from socket import getaddrinfo
|
|
10
9
|
|
|
11
10
|
# third-party
|
|
12
11
|
from vcorelib.args import CommandFunction
|
|
@@ -16,13 +15,16 @@ from vcorelib.asyncio import run_handle_stop
|
|
|
16
15
|
from runtimepy.net.udp.tftp import TFTP_PORT, tftp_read, tftp_write
|
|
17
16
|
from runtimepy.net.udp.tftp.base import DEFAULT_TIMEOUT_S, REEMIT_PERIOD_S
|
|
18
17
|
from runtimepy.net.udp.tftp.enums import DEFAULT_MODE
|
|
18
|
+
from runtimepy.net.util import normalize_host
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
def tftp_cmd(args: argparse.Namespace) -> int:
|
|
22
22
|
"""Execute the tftp command."""
|
|
23
23
|
|
|
24
|
+
host = normalize_host(args.host, args.port)
|
|
25
|
+
|
|
24
26
|
# Resolve hostname as early as possible.
|
|
25
|
-
addr =
|
|
27
|
+
addr = host.address_str_tuple
|
|
26
28
|
|
|
27
29
|
stop_sig = asyncio.Event()
|
|
28
30
|
kwargs = {
|
|
@@ -43,6 +43,9 @@ class TabInterface {
|
|
|
43
43
|
/* Update global reference. */
|
|
44
44
|
shown_tab = this.name;
|
|
45
45
|
hash.setTab(shown_tab);
|
|
46
|
+
|
|
47
|
+
/* Audit vertical bar position. */
|
|
48
|
+
this.correctVerticalBarPosition();
|
|
46
49
|
}
|
|
47
50
|
this.worker.send({kind : msg});
|
|
48
51
|
} ];
|
|
@@ -51,6 +54,11 @@ class TabInterface {
|
|
|
51
54
|
this.initCommand();
|
|
52
55
|
this.initControls();
|
|
53
56
|
this.initButton();
|
|
57
|
+
|
|
58
|
+
/* Ensure vertical divider is always visible. */
|
|
59
|
+
window.addEventListener(
|
|
60
|
+
"resize",
|
|
61
|
+
((event) => { this.correctVerticalBarPosition(); }).bind(this));
|
|
54
62
|
}
|
|
55
63
|
|
|
56
64
|
initCommand() {
|
|
@@ -131,9 +139,9 @@ class TabInterface {
|
|
|
131
139
|
}
|
|
132
140
|
|
|
133
141
|
/* Initialize channel table and plot divider. */
|
|
134
|
-
|
|
135
|
-
if (divider) {
|
|
136
|
-
this.setupVerticalDivider(divider);
|
|
142
|
+
this.divider = this.query(".vertical-divider");
|
|
143
|
+
if (this.divider) {
|
|
144
|
+
this.setupVerticalDivider(this.divider);
|
|
137
145
|
}
|
|
138
146
|
|
|
139
147
|
/* Initialize sliders. */
|
|
@@ -185,12 +193,22 @@ class TabInterface {
|
|
|
185
193
|
|
|
186
194
|
let origX = event.clientX || event.touches[0].clientX;
|
|
187
195
|
|
|
196
|
+
let barWidth = 0;
|
|
197
|
+
if (this.divider) {
|
|
198
|
+
barWidth = this.divider.clientWidth;
|
|
199
|
+
}
|
|
200
|
+
|
|
188
201
|
/* Track mouse movement while the mouse is held down. */
|
|
189
202
|
let handleMouse = (event) => {
|
|
190
203
|
let eventX = event.clientX || event.touches[0].clientX;
|
|
191
204
|
|
|
192
205
|
let deltaX = origX - eventX;
|
|
193
|
-
|
|
206
|
+
|
|
207
|
+
let rect = elem.getBoundingClientRect();
|
|
208
|
+
|
|
209
|
+
/* No use in allowing dragging out of view. */
|
|
210
|
+
let minWidth = window.innerWidth - (rect.left + barWidth);
|
|
211
|
+
elem.style.width = Math.min(minWidth, rect.width - deltaX) + "px";
|
|
194
212
|
origX = eventX;
|
|
195
213
|
};
|
|
196
214
|
document.addEventListener(move, handleMouse);
|
|
@@ -206,6 +224,21 @@ class TabInterface {
|
|
|
206
224
|
setupCursorContext(elem, this.setupVerticalDividerEvents.bind(this));
|
|
207
225
|
}
|
|
208
226
|
|
|
227
|
+
correctVerticalBarPosition(elem) {
|
|
228
|
+
if (shown_tab == this.name && this.divider) {
|
|
229
|
+
let margin =
|
|
230
|
+
window.innerWidth - this.divider.getBoundingClientRect().right;
|
|
231
|
+
|
|
232
|
+
if (margin < 0) {
|
|
233
|
+
let column = this.query(".channel-column");
|
|
234
|
+
if (column) {
|
|
235
|
+
column.style.width =
|
|
236
|
+
column.getBoundingClientRect().width + margin + "px";
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
209
242
|
initPlot() {
|
|
210
243
|
let plot = this.query(`#${this.queryName}-plot`);
|
|
211
244
|
if (plot) {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
factories:
|
|
3
|
+
- {name: runtimepy.telemetry.sample.SampleTelemetry}
|
|
4
|
+
- {name: runtimepy.telemetry.sample.SampleTelemetryStruct}
|
|
5
|
+
- {name: runtimepy.telemetry.sample.SampleTelemetryPeriodic}
|
|
6
|
+
|
|
7
|
+
structs:
|
|
8
|
+
- name: tx
|
|
9
|
+
factory: SampleTelemetryStruct
|
|
10
|
+
- name: rx
|
|
11
|
+
factory: SampleTelemetryStruct
|
|
12
|
+
|
|
13
|
+
tasks:
|
|
14
|
+
- {name: tlm_periodic, factory: sample_telemetry_periodic, period_s: 0.01}
|
|
15
|
+
|
|
16
|
+
ports:
|
|
17
|
+
- {name: udp_sample_telemetry, type: udp}
|
|
18
|
+
|
|
19
|
+
clients:
|
|
20
|
+
- factory: SampleTelemetry
|
|
21
|
+
name: rx_conn
|
|
22
|
+
kwargs:
|
|
23
|
+
local_addr: ["0.0.0.0", "$udp_sample_telemetry"]
|
|
24
|
+
|
|
25
|
+
- factory: SampleTelemetry
|
|
26
|
+
name: tx_conn
|
|
27
|
+
defer: true
|
|
28
|
+
kwargs:
|
|
29
|
+
remote_addr: ["127.0.0.1", "$udp_sample_telemetry"]
|