Skip to content

Conversation

@romanett
Copy link
Contributor

@romanett romanett commented Apr 15, 2025

Proposed changes

A Variant containing a multi dimensional array needs to be encoded with a specified syntax.
The XML Encoder / Decoder of the stack did only follow this Spec for the ReadArray / WriteArray implementation but not ReadVariant/WriteVariant

https://reference.opcfoundation.org/Core/Part6/v105/docs/5.3.1.17

This PR fixes JsonEncoder & Decoder & introduces a test case.

#3045

Related Issues

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which adds functionality)
  • Test enhancement (non-breaking change to increase test coverage)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected, requires version increase of Nuget packages)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc.
  • I have signed the CLA.
  • I ran tests locally with my changes, all passed.
  • I fixed all failing tests in the CI pipelines.
  • I fixed all introduced issues with CodeQL and LGTM.
  • I have added tests that prove my fix is effective or that my feature works and increased code coverage.
  • I have added necessary documentation (if appropriate).
  • Any dependent changes have been merged and published in downstream modules.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@romanett romanett requested review from mrsuciu and salihgoncu April 15, 2025 01:00
@romanett romanett self-assigned this Apr 15, 2025
@romanett romanett added the compliance An issue was found which is not compliant with the OPC UA specification. label Apr 15, 2025
@codecov
Copy link

codecov bot commented Apr 15, 2025

Codecov Report

Attention: Patch coverage is 84.37500% with 5 lines in your changes missing coverage. Please review.

Project coverage is 57.03%. Comparing base (95d162e) to head (3f51a09).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
Stack/Opc.Ua.Core/Types/Encoders/XmlDecoder.cs 83.87% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3053      +/-   ##
==========================================
+ Coverage   57.00%   57.03%   +0.03%     
==========================================
  Files         357      357              
  Lines       68916    68951      +35     
  Branches    14154    14156       +2     
==========================================
+ Hits        39285    39328      +43     
- Misses      25385    25388       +3     
+ Partials     4246     4235      -11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mrsuciu mrsuciu merged commit 6a1b269 into OPCFoundation:master Apr 15, 2025
77 checks passed
mrsuciu added a commit that referenced this pull request Apr 15, 2025
… to spec (#3053) (#3054)

* Fix XML Encoding and decoding to conform to spec

* fix test on linux

* fix typo

* Add missing DataValue & DiagnosticInfo Array Types

Co-authored-by: romanett <[email protected]>
mregen pushed a commit to mregen/UA-.NetStandard that referenced this pull request May 16, 2025
… to spec (OPCFoundation#3053)

* Fix XML Encoding and decoding to conform to spec

* fix test on linux

* fix typo

* Add missing DataValue & DiagnosticInfo Array Types
mrsuciu added a commit that referenced this pull request Jun 23, 2025
* Update version.json (#3050)

* Fix XML Encoding and decoding of Matrix Element in Variant to conform to spec (#3053) (#3054)

* Fix XML Encoding and decoding to conform to spec

* fix test on linux

* fix typo

* Add missing DataValue & DiagnosticInfo Array Types

Co-authored-by: romanett <[email protected]>

* Return NodeSet to 1.05.04.

* Remove OptionalPlaceholders on instances.

* Fix duplicate pragas.

* Fix glitches in generated files.

---------

Co-authored-by: Suciu Mircea Adrian <[email protected]>
Co-authored-by: romanett <[email protected]>
Co-authored-by: Randy Armstrong <[email protected]>
@romanett romanett deleted the XmlMatrixFix branch August 4, 2025 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compliance An issue was found which is not compliant with the OPC UA specification.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

XML Encoding of Matrix is Incorrect

3 participants