Add defined-tags support for nested Logix UDTs#122
Open
lazydreamy wants to merge 1 commit into
Open
Conversation
Introduce a generic --defined-tags loader that accepts either a JSON file path or inline JSON text and registers controller tags, nested UDT members, and template metadata against a shared backing buffer. Expose Symbol Object and Template Object responses so clients can enumerate controller tags and expand UDT definitions through @tags and @udt/<templateId> style requests. Prefer longest symbolic tag matches during resolution so direct nested member access, including BOOL leaves and atomic arrays, works alongside root STRUCT reads and writes. Support contribution-ready schema inputs by accepting explicit CIP typeCode values, inferring atomic and template metadata when possible, and honoring explicit BOOL bit positions while retaining the compact JSON shorthand. Add focused tests for tag listing, UDT payload generation, shared-buffer nested writes, explicit typeCode schemas, UTF-8 JSON loading, inline JSON loading, and symbol/template object responses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a generic defined-tags JSON loader for EtherNet/IP Logix tag simulation, including nested UDT member access.
This lets the simulator expose structured tags from either a JSON file path or inline JSON text passed with --defined-tags. The implementation is not tied to a customer- or project-specific schema.
Changes
Testing
Note: the full focused ENIP test command also depends on the separate logging-handler test fix when run in Python 2 environments where pytest has not installed a root logger handler before test collection.