runtimepy 5.11.2__tar.gz → 5.11.4__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.11.2/runtimepy.egg-info → runtimepy-5.11.4}/PKG-INFO +5 -5
- {runtimepy-5.11.2 → runtimepy-5.11.4}/README.md +2 -2
- {runtimepy-5.11.2 → runtimepy-5.11.4}/pyproject.toml +1 -1
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/__init__.py +2 -2
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/channel/environment/base.py +1 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/channel/environment/sample.py +8 -4
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/codec/protocol/base.py +36 -20
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/codec/protocol/json.py +3 -1
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/codec/system/__init__.py +33 -10
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/enum/registry.py +1 -10
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/__init__.py +10 -0
- runtimepy-5.11.4/runtimepy/primitives/byte_order.py +65 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/field/fields.py +9 -4
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/field/manager/base.py +6 -1
- {runtimepy-5.11.2 → runtimepy-5.11.4/runtimepy.egg-info}/PKG-INFO +5 -5
- runtimepy-5.11.2/runtimepy/primitives/byte_order.py +0 -34
- {runtimepy-5.11.2 → runtimepy-5.11.4}/LICENSE +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/__main__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/app.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/channel/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/channel/environment/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/channel/environment/array.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/channel/environment/command/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/channel/environment/command/parser.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/channel/environment/command/processor.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/channel/environment/command/result.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/channel/environment/create.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/channel/environment/file.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/channel/environment/telemetry.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/channel/event/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/channel/event/header.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/channel/registry.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/codec/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/codec/protocol/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/commands/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/commands/all.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/commands/arbiter.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/commands/common.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/commands/mtu.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/commands/server.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/commands/task.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/commands/tftp.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/commands/tui.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/control/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/control/env/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/control/source.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/control/step.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/404.html +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/browser.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/css/bootstrap_extra.css +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/css/font.css +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/css/main.css +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/dummy_load.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/factories.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/favicon.ico +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/DataConnection.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/JsonConnection.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/audio.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/classes/App.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/classes/ChannelTable.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/classes/DataConnection.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/classes/JsonConnection.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/classes/OverlayManager.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/classes/Plot.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/classes/PlotDrawer.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/classes/PlotManager.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/classes/PlotModalManager.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/classes/PointBuffer.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/classes/PointManager.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/classes/TabFilter.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/classes/TabInterface.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/classes/UnitSystem.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/classes/WindowHashManager.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/classes/WorkerInterface.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/events.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/init.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/main.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/markdown_page.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/tab/env.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/tab/sound.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/third-party/webgl-debug.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/unused/pyodide.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/util.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/js/worker.js +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/md/Connection.md +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/md/PeriodicTask.md +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/md/RuntimeStruct.md +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/md/RuntimepyPeer.md +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/md/SinusoidTask.md +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/sample_telemetry.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/BitFields.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/Channel.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/ChannelCommand.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/ChannelRegistry.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/ClientConnectionConfig.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/ConnectionArbiterConfig.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/EnumRegistry.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/FindFile.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/PeerProcessConfig.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/RuntimeEnum.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/ServerConnectionConfig.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/StructConfig.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/TaskConfig.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/channel_controls.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/has_config.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/has_factory.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/has_markdown.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/has_name.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/schemas/has_request_flag.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/server.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/server_base.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/server_dev.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/static/svg/chip-circle-bootstrap.svg +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/static/woff2/CascadiaCode-Bold.woff2 +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/static/woff2/CascadiaCode-BoldItalic.woff2 +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/static/woff2/CascadiaCode-Italic.woff2 +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/static/woff2/CascadiaCode-Regular.woff2 +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/static/woff2/CascadiaMono-Bold.woff2 +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/static/woff2/CascadiaMono-BoldItalic.woff2 +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/static/woff2/CascadiaMono-Italic.woff2 +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/static/woff2/CascadiaMono-Regular.woff2 +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/static/woff2/README.md +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/data/tftp_server.yaml +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/dev_requirements.txt +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/entry.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/enum/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/enum/types.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/mapping.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/message/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/message/handlers.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/message/interface.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/message/types.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/metrics/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/metrics/channel.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/metrics/connection.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/metrics/task.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/mixins/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/mixins/async_command.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/mixins/enum.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/mixins/environment.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/mixins/finalize.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/mixins/logging.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/mixins/psutil.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/mixins/regex.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/mixins/trig.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/apps/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/base.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/config/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/config/codec.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/config/util.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/factory/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/factory/connection.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/factory/task.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/housekeeping/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/imports/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/imports/util.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/info.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/result.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/struct/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/task.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/tcp/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/tcp/json.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/udp.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/arbiter/websocket.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/backoff.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/connection.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/factories/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/html/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/html/arbiter.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/html/bootstrap/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/html/bootstrap/elements.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/html/bootstrap/tabs.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/http/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/http/common.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/http/header.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/http/request_target.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/http/response.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/http/state.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/http/version.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/manager.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/mixin.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/mtu.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/base.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/create.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/elements.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/env/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/env/modal.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/env/settings.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/env/tab/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/env/tab/base.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/env/tab/controls.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/env/tab/html.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/env/tab/message.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/env/widgets.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/files.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/landing_page.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/placeholder.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/pyodide.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/sound.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/app/tab.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/html.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/json.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/markdown.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/struct/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/websocket/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/server/websocket/state.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/ssl.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/stream/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/stream/base.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/stream/json/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/stream/string.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/tcp/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/tcp/connection.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/tcp/create.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/tcp/http/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/tcp/protocol.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/tcp/scpi/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/tcp/telnet/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/tcp/telnet/codes.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/tcp/telnet/np_05b.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/udp/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/udp/connection.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/udp/create.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/udp/protocol.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/udp/queue.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/udp/tftp/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/udp/tftp/base.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/udp/tftp/endpoint.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/udp/tftp/enums.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/udp/tftp/io.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/util.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/websocket/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/net/websocket/connection.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/noise/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/array/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/base.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/bool.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/evaluation.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/field/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/field/manager/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/float.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/int.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/scaling.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/serializable/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/serializable/base.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/serializable/fixed.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/serializable/framer.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/serializable/prefixed.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/string.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/types/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/types/base.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/types/bool.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/types/bounds.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/types/float.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/primitives/types/int.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/py.typed +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/registry/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/registry/bool.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/registry/item.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/registry/name.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/requirements.txt +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/sample/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/sample/peer.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/sample/program.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/schemas.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/struct/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/subprocess/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/subprocess/interface.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/subprocess/peer.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/subprocess/program.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/subprocess/protocol.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/task/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/task/asynchronous.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/task/basic/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/task/basic/manager.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/task/basic/periodic.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/task/sample.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/task/trig/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/telemetry/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/telemetry/sample.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/tui/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/tui/channels/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/tui/cursor.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/tui/mixin.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/tui/mock.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/tui/task.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/ui/__init__.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/ui/controls.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy/util.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy.egg-info/SOURCES.txt +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy.egg-info/dependency_links.txt +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy.egg-info/entry_points.txt +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy.egg-info/requires.txt +2 -2
- {runtimepy-5.11.2 → runtimepy-5.11.4}/runtimepy.egg-info/top_level.txt +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/setup.cfg +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/setup.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/tests/test_entry.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/tests/test_mapping.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/tests/test_resources.py +0 -0
- {runtimepy-5.11.2 → runtimepy-5.11.4}/tests/test_util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: runtimepy
|
|
3
|
-
Version: 5.11.
|
|
3
|
+
Version: 5.11.4
|
|
4
4
|
Summary: A framework for implementing Python services.
|
|
5
5
|
Home-page: https://github.com/vkottler/runtimepy
|
|
6
6
|
Author: Vaughn Kottler
|
|
@@ -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.1
|
|
21
22
|
Requires-Dist: psutil
|
|
22
|
-
Requires-Dist: svgen>=0.7.4
|
|
23
23
|
Requires-Dist: websockets
|
|
24
|
-
Requires-Dist:
|
|
24
|
+
Requires-Dist: svgen>=0.7.4
|
|
25
25
|
Provides-Extra: test
|
|
26
26
|
Requires-Dist: pylint; extra == "test"
|
|
27
27
|
Requires-Dist: flake8; extra == "test"
|
|
@@ -50,11 +50,11 @@ Dynamic: requires-python
|
|
|
50
50
|
=====================================
|
|
51
51
|
generator=datazen
|
|
52
52
|
version=3.1.4
|
|
53
|
-
hash=
|
|
53
|
+
hash=0a7881b3e47a699bb3a235518a84f5ab
|
|
54
54
|
=====================================
|
|
55
55
|
-->
|
|
56
56
|
|
|
57
|
-
# runtimepy ([5.11.
|
|
57
|
+
# runtimepy ([5.11.4](https://pypi.org/project/runtimepy/))
|
|
58
58
|
|
|
59
59
|
[](https://pypi.org/project/runtimepy/)
|
|
60
60
|

|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
=====================================
|
|
3
3
|
generator=datazen
|
|
4
4
|
version=3.1.4
|
|
5
|
-
hash=
|
|
5
|
+
hash=0a7881b3e47a699bb3a235518a84f5ab
|
|
6
6
|
=====================================
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
|
-
# runtimepy ([5.11.
|
|
9
|
+
# runtimepy ([5.11.4](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.1.4
|
|
4
|
-
# hash=
|
|
4
|
+
# hash=e4bd25a4e8683a203d0244d24322fe41
|
|
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.11.
|
|
13
|
+
VERSION = "5.11.4"
|
|
14
14
|
|
|
15
15
|
# runtimepy-specific content.
|
|
16
16
|
METRICS_NAME = "metrics"
|
|
@@ -91,10 +91,10 @@ def sample_fields(env: ChannelEnvironment, enum: str = "SampleEnum") -> None:
|
|
|
91
91
|
env.int_channel("raw", prim)
|
|
92
92
|
|
|
93
93
|
# Add a bit field and flag.
|
|
94
|
-
env.add_field(BitFlag("flag1", prim, 0))
|
|
94
|
+
env.add_field(BitFlag(env.namespace(name="flag1"), prim, 0))
|
|
95
95
|
env.add_field(
|
|
96
96
|
BitFlag(
|
|
97
|
-
"flag2",
|
|
97
|
+
env.namespace(name="flag2"),
|
|
98
98
|
prim,
|
|
99
99
|
1,
|
|
100
100
|
commandable=True,
|
|
@@ -103,7 +103,7 @@ def sample_fields(env: ChannelEnvironment, enum: str = "SampleEnum") -> None:
|
|
|
103
103
|
)
|
|
104
104
|
env.add_field(
|
|
105
105
|
BitField(
|
|
106
|
-
"field1",
|
|
106
|
+
env.namespace(name="field1"),
|
|
107
107
|
prim,
|
|
108
108
|
2,
|
|
109
109
|
2,
|
|
@@ -112,7 +112,11 @@ def sample_fields(env: ChannelEnvironment, enum: str = "SampleEnum") -> None:
|
|
|
112
112
|
description="Sample bit field.",
|
|
113
113
|
)
|
|
114
114
|
)
|
|
115
|
-
env.add_field(
|
|
115
|
+
env.add_field(
|
|
116
|
+
BitField(
|
|
117
|
+
env.namespace(name="field2"), prim, 4, 4, commandable=True
|
|
118
|
+
)
|
|
119
|
+
)
|
|
116
120
|
|
|
117
121
|
|
|
118
122
|
def sample_float(
|
|
@@ -21,7 +21,7 @@ from runtimepy.enum import RuntimeEnum as _RuntimeEnum
|
|
|
21
21
|
from runtimepy.enum.registry import EnumRegistry as _EnumRegistry
|
|
22
22
|
from runtimepy.primitives import AnyPrimitive as _AnyPrimitive
|
|
23
23
|
from runtimepy.primitives import Primitivelike as _Primitivelike
|
|
24
|
-
from runtimepy.primitives import
|
|
24
|
+
from runtimepy.primitives import normalize_instance as _normalize_instance
|
|
25
25
|
from runtimepy.primitives.array import PrimitiveArray
|
|
26
26
|
from runtimepy.primitives.byte_order import (
|
|
27
27
|
DEFAULT_BYTE_ORDER as _DEFAULT_BYTE_ORDER,
|
|
@@ -40,7 +40,7 @@ class FieldSpec(NamedTuple):
|
|
|
40
40
|
"""Information specifying a protocol field."""
|
|
41
41
|
|
|
42
42
|
name: str
|
|
43
|
-
kind:
|
|
43
|
+
kind: str
|
|
44
44
|
enum: _Optional[_RegistryKey] = None
|
|
45
45
|
array_length: _Optional[int] = None
|
|
46
46
|
|
|
@@ -49,7 +49,7 @@ class FieldSpec(NamedTuple):
|
|
|
49
49
|
|
|
50
50
|
result: _JsonObject = {
|
|
51
51
|
"name": self.name,
|
|
52
|
-
"kind":
|
|
52
|
+
"kind": self.kind,
|
|
53
53
|
"array_length": self.array_length,
|
|
54
54
|
}
|
|
55
55
|
if self.enum is not None:
|
|
@@ -58,7 +58,7 @@ class FieldSpec(NamedTuple):
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
T = _TypeVar("T", bound="ProtocolBase")
|
|
61
|
-
ProtocolBuild = list[_Union[int, FieldSpec, tuple[str, int]]]
|
|
61
|
+
ProtocolBuild = list[_Union[tuple[int, str], FieldSpec, tuple[str, int]]]
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
class ProtocolBase(PrimitiveArray):
|
|
@@ -114,16 +114,15 @@ class ProtocolBase(PrimitiveArray):
|
|
|
114
114
|
if build is None:
|
|
115
115
|
build = []
|
|
116
116
|
for item in build:
|
|
117
|
-
if isinstance(item,
|
|
118
|
-
self._add_bit_fields(self._fields.fields[item])
|
|
119
|
-
elif isinstance(item, FieldSpec):
|
|
117
|
+
if isinstance(item, FieldSpec):
|
|
120
118
|
self.add_field(
|
|
121
119
|
item.name,
|
|
122
120
|
item.kind,
|
|
123
121
|
enum=item.enum,
|
|
124
122
|
array_length=item.array_length,
|
|
125
123
|
)
|
|
126
|
-
|
|
124
|
+
|
|
125
|
+
elif isinstance(item[0], str):
|
|
127
126
|
assert serializables, (item, serializables)
|
|
128
127
|
name = item[0]
|
|
129
128
|
self.add_serializable(
|
|
@@ -133,6 +132,11 @@ class ProtocolBase(PrimitiveArray):
|
|
|
133
132
|
)
|
|
134
133
|
del serializables[name]
|
|
135
134
|
|
|
135
|
+
elif isinstance(item[0], int):
|
|
136
|
+
self._add_bit_fields(
|
|
137
|
+
item[1], self._fields.fields[item[0]], index=item[0]
|
|
138
|
+
)
|
|
139
|
+
|
|
136
140
|
# Ensure all serializables were handled via build.
|
|
137
141
|
assert not serializables, serializables
|
|
138
142
|
|
|
@@ -169,15 +173,18 @@ class ProtocolBase(PrimitiveArray):
|
|
|
169
173
|
|
|
170
174
|
instances = self.add_to_end(serializable, array_length=array_length)
|
|
171
175
|
self._build.append((name, len(instances)))
|
|
176
|
+
|
|
177
|
+
assert name not in self.serializables, name
|
|
172
178
|
self.serializables[name] = instances
|
|
173
179
|
|
|
174
180
|
def add_field(
|
|
175
181
|
self,
|
|
176
182
|
name: str,
|
|
177
|
-
kind: _Primitivelike = None,
|
|
183
|
+
kind: _Primitivelike | _Optional[_AnyPrimitive] = None,
|
|
178
184
|
enum: _RegistryKey = None,
|
|
179
185
|
serializable: Serializable = None,
|
|
180
186
|
array_length: int = None,
|
|
187
|
+
track: bool = True,
|
|
181
188
|
) -> None:
|
|
182
189
|
"""Add a new field to the protocol."""
|
|
183
190
|
|
|
@@ -201,30 +208,39 @@ class ProtocolBase(PrimitiveArray):
|
|
|
201
208
|
kind = runtime_enum.primitive
|
|
202
209
|
|
|
203
210
|
assert kind is not None
|
|
211
|
+
inst = _normalize_instance(kind)
|
|
204
212
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
)
|
|
213
|
+
assert name not in self._regular_fields, name
|
|
214
|
+
self._regular_fields[name] = self.add(inst, array_length=array_length)
|
|
208
215
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
216
|
+
if track:
|
|
217
|
+
self._build.append(
|
|
218
|
+
FieldSpec(
|
|
219
|
+
name, inst.kind.name, enum, array_length=array_length
|
|
220
|
+
)
|
|
221
|
+
)
|
|
212
222
|
|
|
213
|
-
def _add_bit_fields(
|
|
223
|
+
def _add_bit_fields(
|
|
224
|
+
self, name: str, fields: _BitFields, index: int = None
|
|
225
|
+
) -> None:
|
|
214
226
|
"""Add a bit-fields instance."""
|
|
215
227
|
|
|
216
|
-
|
|
217
|
-
|
|
228
|
+
# If the index is known, these fields are already registered.
|
|
229
|
+
if index is None:
|
|
230
|
+
index = self._fields.add(fields)
|
|
231
|
+
|
|
232
|
+
self._build.append((index, name))
|
|
233
|
+
self.add_field(name, kind=fields.raw, track=False)
|
|
218
234
|
|
|
219
235
|
@contextmanager
|
|
220
236
|
def add_bit_fields(
|
|
221
|
-
self, kind: _Primitivelike = "uint8"
|
|
237
|
+
self, name: str, kind: _Primitivelike | _AnyPrimitive = "uint8"
|
|
222
238
|
) -> _Iterator[_BitFields]:
|
|
223
239
|
"""Add a bit-fields primitive to the protocol."""
|
|
224
240
|
|
|
225
241
|
new = _BitFields.new(value=kind)
|
|
226
242
|
yield new
|
|
227
|
-
self._add_bit_fields(new)
|
|
243
|
+
self._add_bit_fields(name, new)
|
|
228
244
|
|
|
229
245
|
def value(
|
|
230
246
|
self, name: str, resolve_enum: bool = True, index: int = 0
|
|
@@ -79,7 +79,9 @@ class JsonProtocol(ProtocolBase):
|
|
|
79
79
|
)
|
|
80
80
|
|
|
81
81
|
# Export the build specification.
|
|
82
|
-
build: list[
|
|
82
|
+
build: list[
|
|
83
|
+
_Union[tuple[int, str], _JsonObject, str, tuple[str, int]]
|
|
84
|
+
] = []
|
|
83
85
|
for item in self._build:
|
|
84
86
|
if isinstance(item, FieldSpec):
|
|
85
87
|
build.append(item.asdict())
|
|
@@ -3,6 +3,7 @@ A basic type-system implementation.
|
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
# built-in
|
|
6
|
+
from contextlib import suppress
|
|
6
7
|
from typing import Iterable, Optional, Union
|
|
7
8
|
|
|
8
9
|
# third-party
|
|
@@ -10,15 +11,14 @@ from vcorelib.logging import LoggerMixin
|
|
|
10
11
|
from vcorelib.namespace import CPP_DELIM, Namespace
|
|
11
12
|
|
|
12
13
|
# internal
|
|
13
|
-
from runtimepy import PKG_NAME
|
|
14
14
|
from runtimepy.codec.protocol import Protocol
|
|
15
15
|
from runtimepy.enum import RuntimeEnum
|
|
16
|
-
from runtimepy.enum.registry import
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
from runtimepy.enum.registry import DEFAULT_ENUM_PRIMITIVE, RuntimeIntEnum
|
|
17
|
+
from runtimepy.primitives.byte_order import (
|
|
18
|
+
DEFAULT_BYTE_ORDER,
|
|
19
|
+
ByteOrder,
|
|
20
|
+
enum_registry,
|
|
20
21
|
)
|
|
21
|
-
from runtimepy.primitives.byte_order import DEFAULT_BYTE_ORDER, ByteOrder
|
|
22
22
|
from runtimepy.primitives.types import AnyPrimitiveType, PrimitiveTypes
|
|
23
23
|
from runtimepy.registry.name import RegistryKey
|
|
24
24
|
from runtimepy.util import Identifier
|
|
@@ -54,7 +54,7 @@ class TypeSystem(LoggerMixin):
|
|
|
54
54
|
self.custom: dict[str, Protocol] = {}
|
|
55
55
|
self.custom_ids = Identifier(scale=1)
|
|
56
56
|
|
|
57
|
-
self._enums =
|
|
57
|
+
self._enums = enum_registry(register_byte_order=False)
|
|
58
58
|
|
|
59
59
|
global_namespace = Namespace(delim=CPP_DELIM)
|
|
60
60
|
|
|
@@ -65,12 +65,22 @@ class TypeSystem(LoggerMixin):
|
|
|
65
65
|
self.root_namespace = global_namespace
|
|
66
66
|
|
|
67
67
|
# Register enums.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
self.runtime_int_enum(enum)
|
|
68
|
+
for enum in [ByteOrder]:
|
|
69
|
+
self.runtime_int_enum(enum)
|
|
71
70
|
|
|
72
71
|
self.root_namespace = global_namespace.child(*namespace)
|
|
73
72
|
|
|
73
|
+
def is_enum(self, name: str, *namespace: str, exact: bool = True) -> bool:
|
|
74
|
+
"""Determine if the arguments identify a registered enumeration."""
|
|
75
|
+
|
|
76
|
+
result = False
|
|
77
|
+
|
|
78
|
+
with suppress(KeyError, AssertionError):
|
|
79
|
+
self.get_enum(name, *namespace, exact=exact)
|
|
80
|
+
result = True
|
|
81
|
+
|
|
82
|
+
return result
|
|
83
|
+
|
|
74
84
|
def get_enum(
|
|
75
85
|
self, name: str, *namespace: str, exact: bool = True
|
|
76
86
|
) -> RuntimeEnum:
|
|
@@ -120,6 +130,19 @@ class TypeSystem(LoggerMixin):
|
|
|
120
130
|
self.custom[resolved] = new_type
|
|
121
131
|
return new_type
|
|
122
132
|
|
|
133
|
+
def is_custom(
|
|
134
|
+
self, name: str, *namespace: str, exact: bool = True
|
|
135
|
+
) -> bool:
|
|
136
|
+
"""Determine if the parameters identify a custom type."""
|
|
137
|
+
|
|
138
|
+
result = False
|
|
139
|
+
|
|
140
|
+
with suppress(KeyError, AssertionError):
|
|
141
|
+
self.get_protocol(name, *namespace, exact=exact)
|
|
142
|
+
result = True
|
|
143
|
+
|
|
144
|
+
return result
|
|
145
|
+
|
|
123
146
|
def get_protocol(
|
|
124
147
|
self, name: str, *namespace: str, exact: bool = True
|
|
125
148
|
) -> Protocol:
|
|
@@ -100,14 +100,5 @@ class RuntimeIntEnum(_IntEnum):
|
|
|
100
100
|
data["id"] = ident
|
|
101
101
|
|
|
102
102
|
result = registry.register_dict(name, data)
|
|
103
|
-
assert result is not None
|
|
103
|
+
assert result is not None, (name, data)
|
|
104
104
|
return result
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
def enum_registry(*kinds: type[RuntimeIntEnum]) -> EnumRegistry:
|
|
108
|
-
"""Create an enum registry with the provided custom types registered."""
|
|
109
|
-
|
|
110
|
-
result = EnumRegistry()
|
|
111
|
-
for kind in kinds:
|
|
112
|
-
kind.register_enum(result)
|
|
113
|
-
return result
|
|
@@ -119,3 +119,13 @@ def normalize(value: Primitivelike) -> type[AnyPrimitive]:
|
|
|
119
119
|
def create(value: Primitivelike, **kwargs) -> AnyPrimitive:
|
|
120
120
|
"""Create an instance of a primitive."""
|
|
121
121
|
return normalize(value)(**kwargs)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def normalize_instance(
|
|
125
|
+
value: Primitivelike | AnyPrimitive, **kwargs
|
|
126
|
+
) -> AnyPrimitive:
|
|
127
|
+
"""Creates a new instance only if necessary."""
|
|
128
|
+
|
|
129
|
+
if not isinstance(value, Primitive):
|
|
130
|
+
value = create(value, **kwargs)
|
|
131
|
+
return value
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"""
|
|
2
|
+
A module implementing an enumeration for byte ordering options.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
# built-in
|
|
6
|
+
from typing import Optional
|
|
7
|
+
|
|
8
|
+
# internal
|
|
9
|
+
from runtimepy.enum.registry import EnumRegistry, RuntimeIntEnum
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ByteOrder(RuntimeIntEnum):
|
|
13
|
+
"""An enumeration for viable byte orders."""
|
|
14
|
+
|
|
15
|
+
NATIVE = 1
|
|
16
|
+
LITTLE_ENDIAN = 2
|
|
17
|
+
BIG_ENDIAN = 3
|
|
18
|
+
NETWORK = 4
|
|
19
|
+
|
|
20
|
+
@property
|
|
21
|
+
def fmt(self) -> str:
|
|
22
|
+
"""Get the struct formatter for this byte order."""
|
|
23
|
+
|
|
24
|
+
if self is ByteOrder.NATIVE:
|
|
25
|
+
return "@"
|
|
26
|
+
if self is ByteOrder.LITTLE_ENDIAN:
|
|
27
|
+
return "<"
|
|
28
|
+
if self is ByteOrder.BIG_ENDIAN:
|
|
29
|
+
return ">"
|
|
30
|
+
return "!"
|
|
31
|
+
|
|
32
|
+
def __str__(self) -> str:
|
|
33
|
+
"""Get this byte order as a string."""
|
|
34
|
+
return self.fmt
|
|
35
|
+
|
|
36
|
+
@classmethod
|
|
37
|
+
def id(cls) -> Optional[int]:
|
|
38
|
+
"""Override in sub-class to coerce enum id."""
|
|
39
|
+
return 1
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# https://en.cppreference.com/w/cpp/types/endian
|
|
43
|
+
STD_ENDIAN = {
|
|
44
|
+
"little": ByteOrder.LITTLE_ENDIAN,
|
|
45
|
+
"big": ByteOrder.BIG_ENDIAN,
|
|
46
|
+
"native": ByteOrder.NATIVE,
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
DEFAULT_BYTE_ORDER = ByteOrder.NETWORK
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def enum_registry(
|
|
54
|
+
*kinds: type[RuntimeIntEnum], register_byte_order: bool = True
|
|
55
|
+
) -> EnumRegistry:
|
|
56
|
+
"""Create an enum registry with the provided custom types registered."""
|
|
57
|
+
|
|
58
|
+
result = EnumRegistry()
|
|
59
|
+
|
|
60
|
+
if register_byte_order:
|
|
61
|
+
ByteOrder.register_enum(result)
|
|
62
|
+
|
|
63
|
+
for kind in kinds:
|
|
64
|
+
kind.register_enum(result)
|
|
65
|
+
return result
|
|
@@ -14,8 +14,9 @@ from vcorelib.io.types import JsonObject as _JsonObject
|
|
|
14
14
|
from vcorelib.io.types import JsonValue as _JsonValue
|
|
15
15
|
|
|
16
16
|
# internal
|
|
17
|
+
from runtimepy.primitives import AnyPrimitive as _AnyPrimitive
|
|
17
18
|
from runtimepy.primitives import Primitivelike as _Primitivelike
|
|
18
|
-
from runtimepy.primitives import
|
|
19
|
+
from runtimepy.primitives import normalize_instance as _normalize_instance
|
|
19
20
|
from runtimepy.primitives.field import BitField as _BitField
|
|
20
21
|
from runtimepy.primitives.field import BitFieldBase as _BitFieldBase
|
|
21
22
|
from runtimepy.primitives.field import BitFlag as _BitFlag
|
|
@@ -37,7 +38,7 @@ class BitFields(_RuntimepyDictCodec):
|
|
|
37
38
|
|
|
38
39
|
# Create the underlying storage element.
|
|
39
40
|
self.raw: _UnsignedInt = _cast(
|
|
40
|
-
_UnsignedInt,
|
|
41
|
+
_UnsignedInt, _normalize_instance(_cast(str, data["type"]))
|
|
41
42
|
)
|
|
42
43
|
|
|
43
44
|
self.curr_index = 0
|
|
@@ -194,6 +195,8 @@ class BitFields(_RuntimepyDictCodec):
|
|
|
194
195
|
def claim_field(self, field: _BitField) -> _BitField:
|
|
195
196
|
"""Claim a bit field."""
|
|
196
197
|
|
|
198
|
+
self._claim_bits(field.width, index=field.index)
|
|
199
|
+
|
|
197
200
|
assert field.name not in self.fields, field.name
|
|
198
201
|
self.fields[field.name] = field
|
|
199
202
|
self.by_index[field.index] = field
|
|
@@ -216,7 +219,7 @@ class BitFields(_RuntimepyDictCodec):
|
|
|
216
219
|
_BitField(
|
|
217
220
|
name,
|
|
218
221
|
self.raw,
|
|
219
|
-
self.
|
|
222
|
+
index if index is not None else self.curr_index,
|
|
220
223
|
width,
|
|
221
224
|
enum=enum,
|
|
222
225
|
description=description,
|
|
@@ -225,7 +228,9 @@ class BitFields(_RuntimepyDictCodec):
|
|
|
225
228
|
)
|
|
226
229
|
|
|
227
230
|
@classmethod
|
|
228
|
-
def new(
|
|
231
|
+
def new(
|
|
232
|
+
cls: type[T], value: _Primitivelike | _AnyPrimitive = "uint8"
|
|
233
|
+
) -> T:
|
|
229
234
|
"""Create a new bit-field storage entity."""
|
|
230
235
|
|
|
231
236
|
return cls.create(
|
|
@@ -100,6 +100,7 @@ class BitFieldsManagerBase:
|
|
|
100
100
|
for name, field in fields.fields.items():
|
|
101
101
|
ident = self.registry.register_name(name)
|
|
102
102
|
assert ident is not None, "Couldn't register bit-field '{name}'!"
|
|
103
|
+
assert name not in self.lookup, name
|
|
103
104
|
self.lookup[name] = index
|
|
104
105
|
|
|
105
106
|
# Also store the enum mapping.
|
|
@@ -220,7 +221,11 @@ class BitFieldsManagerBase:
|
|
|
220
221
|
new_fields.raw = prim
|
|
221
222
|
self.by_primitive[prim] = new_fields
|
|
222
223
|
|
|
223
|
-
self.by_primitive[prim]
|
|
224
|
+
fields = self.by_primitive[prim]
|
|
225
|
+
fields.claim_field(field)
|
|
226
|
+
|
|
227
|
+
if not fields.bits_available:
|
|
228
|
+
del self.by_primitive[prim]
|
|
224
229
|
|
|
225
230
|
# self.add(new_fields, finalize=False)
|
|
226
231
|
return new_fields
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: runtimepy
|
|
3
|
-
Version: 5.11.
|
|
3
|
+
Version: 5.11.4
|
|
4
4
|
Summary: A framework for implementing Python services.
|
|
5
5
|
Home-page: https://github.com/vkottler/runtimepy
|
|
6
6
|
Author: Vaughn Kottler
|
|
@@ -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.1
|
|
21
22
|
Requires-Dist: psutil
|
|
22
|
-
Requires-Dist: svgen>=0.7.4
|
|
23
23
|
Requires-Dist: websockets
|
|
24
|
-
Requires-Dist:
|
|
24
|
+
Requires-Dist: svgen>=0.7.4
|
|
25
25
|
Provides-Extra: test
|
|
26
26
|
Requires-Dist: pylint; extra == "test"
|
|
27
27
|
Requires-Dist: flake8; extra == "test"
|
|
@@ -50,11 +50,11 @@ Dynamic: requires-python
|
|
|
50
50
|
=====================================
|
|
51
51
|
generator=datazen
|
|
52
52
|
version=3.1.4
|
|
53
|
-
hash=
|
|
53
|
+
hash=0a7881b3e47a699bb3a235518a84f5ab
|
|
54
54
|
=====================================
|
|
55
55
|
-->
|
|
56
56
|
|
|
57
|
-
# runtimepy ([5.11.
|
|
57
|
+
# runtimepy ([5.11.4](https://pypi.org/project/runtimepy/))
|
|
58
58
|
|
|
59
59
|
[](https://pypi.org/project/runtimepy/)
|
|
60
60
|

|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
A module implementing an enumeration for byte ordering options.
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
# internal
|
|
6
|
-
from runtimepy.enum.registry import RuntimeIntEnum as _RuntimeIntEnum
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class ByteOrder(_RuntimeIntEnum):
|
|
10
|
-
"""An enumeration for viable byte orders."""
|
|
11
|
-
|
|
12
|
-
NATIVE = 1
|
|
13
|
-
LITTLE_ENDIAN = 2
|
|
14
|
-
BIG_ENDIAN = 3
|
|
15
|
-
NETWORK = 4
|
|
16
|
-
|
|
17
|
-
@property
|
|
18
|
-
def fmt(self) -> str:
|
|
19
|
-
"""Get the struct formatter for this byte order."""
|
|
20
|
-
|
|
21
|
-
if self is ByteOrder.NATIVE:
|
|
22
|
-
return "@"
|
|
23
|
-
if self is ByteOrder.LITTLE_ENDIAN:
|
|
24
|
-
return "<"
|
|
25
|
-
if self is ByteOrder.BIG_ENDIAN:
|
|
26
|
-
return ">"
|
|
27
|
-
return "!"
|
|
28
|
-
|
|
29
|
-
def __str__(self) -> str:
|
|
30
|
-
"""Get this byte order as a string."""
|
|
31
|
-
return self.fmt
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
DEFAULT_BYTE_ORDER = ByteOrder.NETWORK
|
|
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
|