Commit 80889b0
PumpDeviceIntegrationServer - Register DeviceHealth node, use HasAddIn for SoftwareUpdate (#4008)
This pull request makes important improvements to how the
`SoftwareUpdate` object is modeled and registered in the OPC UA Device
Integration (DI) server, ensuring better compliance with the OPC
10000-100 specification and improved compatibility with companion-spec
checkers. The main changes involve updating the reference type for
`SoftwareUpdate` to use `HasAddIn`, explicitly registering the
`DeviceHealth` node, and enhancing related tests.
**Device Model Compliance and Registration:**
* The `SoftwareUpdate` object is now attached to its host device using
the `HasAddIn` reference type instead of `HasComponent`, aligning with
the OPC 10000-100 specification and reducing validation noise from
companion-spec checkers.
* The `DeviceHealth` child node is now explicitly registered with the
node manager after device registration to ensure its attributes resolve
correctly and it can be mapped by companion-spec checkers.
**Testing Improvements:**
* Added a test assertion to verify that the `SoftwareUpdate` child is
attached via the `HasAddIn` reference, ensuring the implementation
matches the OPC UA specification.Explicitly register DeviceHealth child
node after creation to ensure attributes resolve and DI checker
compatibility. Reference SoftwareUpdate facet via HasAddIn per OPC
10000-100 spec, not HasComponent, to avoid validation issues. Update
tests to assert correct reference type.
# Description
_Describe the changes here to communicate to the maintainers why they
should accept this pull request. By default - this will become the
Commit message after merging and thus define history._
## Related Issues
_Reference all GitHub issues this PR addresses. If there is no issue
yet, open one and link it here._
_If this is a relatively large or complex change, a design must have
been discussed in the related tracking issue and signed off (which
becomes the Architectural Decision Record (ADR))._
- Fixes #github-issue-number, ...
## Checklist
_Put an `x` in the boxes that apply. You can complete these step by step
after opening the PR._
- [ ] I have signed the
[CLA](https://opcfoundation.org/license/cla/ContributorLicenseAgreementv1.0.pdf)
and read the
[CONTRIBUTING](https://github.com/OPCFoundation/UA-.NETStandard/blob/master/CONTRIBUTING.md)
doc.
- [ ] I have added tests that prove my fix is effective or that my
feature works and increased code coverage.
- [ ] I have added all necessary documentation.
- [ ] I have verified that my changes do not introduce (new) build or
analyzer warnings.
- [ ] I ran **all** tests locally using the **UA.slnx** solution against
at least .net **framework** and .net **10**, and all passed.
- [ ] I fixed **all** failing and flaky tests in the CI pipelines and
**all** CodeQL warnings.
- [ ] I have addressed **all** PR feedback received.
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>1 parent 7d0e587 commit 80889b0
3 files changed
Lines changed: 24 additions & 1 deletion
File tree
- Applications/PumpDeviceIntegrationServer
- Libraries/Opc.Ua.Di.Server/Builders
- Tests/Opc.Ua.Di.Tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
97 | 107 | | |
98 | 108 | | |
99 | 109 | | |
| |||
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
106 | 112 | | |
107 | 113 | | |
108 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
88 | 95 | | |
89 | 96 | | |
90 | 97 | | |
| |||
0 commit comments