Repository navigation
Feature/optimize 02 datatypes getvalue maxstringlength - #12
Merged
jogibear9988 merged 3 commits intoOct 7, 2026
Conversation
…r lists (GML-1187)
Port net functional changes from fork package 01 (DataTypes extension / string array fix, commits 6aef271/519cdeb/ffe8daa): - PlcTag: add virtual GetValue()/SetValue(object) reflecting the concrete tag's public Value property, for generic tag value access. - POffsetInfoType: add virtual MaxStringLength(), returning 0 by default, UnspecifiedOffsetinfo1 for Array1Dim (string array max length), and Min(UnspecifiedOffsetinfo1, UnspecifiedOffsetinfo2) for String (fixes cases where firmware swaps both fields). All other changes from this fork package are already superseded by the target repo's own PlcTag/PlcTags implementation and are documented as excluded in package 16.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Native TLS operations remain concurrently accessible, and multidimensional string arrays report an incorrect maximum length.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds generic PLC tag value access, string-length metadata, and synchronization around OpenSSL pending queues.
Changes:
- Adds boxed
GetValue/SetValuetag accessors. - Exposes maximum string lengths from offset metadata.
- Locks pending OpenSSL buffer queues.
| File | Description |
|---|---|
OpenSSLConnector.cs |
Synchronizes pending read/write queues. |
POffsetInfoType.cs |
Adds maximum string-length lookup. |
PlcTag.cs |
Adds generic boxed value accessors. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+36
to
+37
| private readonly object m_readListLock = new object(); | ||
| private readonly object m_writeListLock = new object(); |
Comment on lines
+551
to
+552
| // For a string array, UnspecifiedOffsetinfo1 carries the maximum string length of the array elements. | ||
| public override int MaxStringLength() { return UnspecifiedOffsetinfo1; } |
The string length is identical across all dimensions and is stored once in `UnspecifiedOffsetinfo1`.
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.


Contains the sources from branch feature/optimize-01