Skip to content

Comments

Add Data access profile for AnalogItemType#1623

Merged
kevinherron merged 15 commits intoeclipse-milo:1.0from
johannwesely:DataAccessProfile
Oct 27, 2025
Merged

Add Data access profile for AnalogItemType#1623
kevinherron merged 15 commits intoeclipse-milo:1.0from
johannwesely:DataAccessProfile

Conversation

@johannwesely
Copy link
Contributor

Changed: DataChangeMonitoringFilter,MonitoredDataItem,SubscriptionManager.
Added: AnalogItemMonitoredDataItem is an extension for MonitoredDataItem, AnalogItemUtil is a util to check that a node is AnalogItemType and get the EuRange from that Node.

Before you submit a pull request please acknowledge the following:

  • You have signed an Eclipse Contributor Agreement and are committing using the same email address
  • Your code contains any tests relevant to the problem you are solving (see comment below)
  • All new and existing tests passed
  • Code follows the style guidelines and Checkstyle passes

The test was made with the OpcuaFoundation Ctt tool

DataAccess percentdeadband

changed: DataChangeMonitoringFilter,MonitoredDataItem,SubscriptionManager.
Added: AnalogItemMonitoredDataItem is an extension for MonitoredDataItem, AnalogItemUtil is a util to check that a node is AnalogItemType and get the EuRange from that Node.
changed: DataChangeMonitoringFilter,MonitoredDataItem,SubscriptionManager.
Added: AnalogItemMonitoredDataItem is an extension for MonitoredDataItem, AnalogItemUtil is a util to check that a node is AnalogItemType and get the EuRange from that Node.
@eclipse-milo-bot
Copy link
Contributor

Can one of the admins verify this patch?

@kevinherron
Copy link
Contributor

kevinherron commented Oct 16, 2025

It will take me some time to get a proper review done on this, but I can tell you now the line endings and formatting need to be fixed and the suppression annotations all removed.

You'll have to run google-java-format on the code: https://github.com/google/google-java-format/releases

@johannwesely
Copy link
Contributor Author

Sorry for the inconvenience i formatted it with google-java-format now.

- Fixed NaN comparison using Double.isNaN() instead of equality checks
- Replaced wildcard import with explicit imports in SubscriptionManager
- Renamed deadBandPercent to deadbandPercent for consistency
- Fixed typo in comments: "inital" → "initial"
- Added comprehensive unit tests for DataChangeMonitoringFilter covering
  percent/absolute deadband, NaN handling, trigger types, and edge cases
@kevinherron
Copy link
Contributor

I've got more changes coming, some of which need to be a separate PR I will create, and then merged into this branch.

- New PercentDeadbandTest class with test coverage for percent deadband behavior in data change filters
- Extended AbstractClientServerTest with configureTestNamespace hook for test-specific node setup
- Enhanced TestNamespace with SubscriptionModel integration and read/write operation logging
@kevinherron
Copy link
Contributor

I've got kind of a big refactoring/cleanup commit coming. It passes the tests I've added, but I need to run a CTT against the demo server with these changes before I push it.

I've got a lot of airplane time tomorrow, hoping to play with it then.

Relocates PercentDeadbandTest to server.subscriptions package and adds
tests for attribute filtering and filter modification. Verifies that
percent deadband filters return Bad_FilterNotAllowed on non-Value
attributes and that filters can be added to existing MonitoredItems.

Updates comment clarity in DataChangeMonitoringFilterTest.
Removes AnalogItemMonitoredDataItem and AnalogItemUtil classes, moving
percent deadband functionality into the base MonitoredDataItem class.
MonitoredDataItem now includes euRange field and validation for percent
deadband filters.

SubscriptionManager refactored to split monitored item creation by filter
type, reading AnalogItem attributes only when needed for percent deadband
requests. Extracted separate methods for creating data items and event items.
@kevinherron
Copy link
Contributor

Latest commit passes "Data Access AnalogItemType" and "Data Access PercentDeadBand" CTT conformance units.

Still need to add tests for Percent Deadband on array values and verify CTT still passes once they are configured.

Add test cases for AnalogItemType nodes with array values:

- Single and multiple elements exceeding deadband threshold
- All elements within deadband
- Element at exact threshold boundary
- Array length changes (increase and decrease)
- Int32 array type handling
- NaN and Infinity transitions to valid values

Create createAnalogItemArrayNode() helper to instantiate array-valued
AnalogItemType nodes with ValueRank set to 1. Update test infrastructure
to initialize and reset array node values between tests.
@kevinherron
Copy link
Contributor

@johannwesely this passes CTT:

  • "MonitoredItem Services" (all relevant)
  • "Data Access AnalogItemType"
  • "Data Access PercentDeadBand"

Can you verify it still works for your application?

Replaced custom subtypeOf() and getSuperTypeId() methods with
server.getDataTypeTree().isSubtypeOf().
@johannwesely
Copy link
Contributor Author

Hello,
i verified that our application still works with your changes.
Thank you for your fast and professional response.

Greetings Johann

…ring

- Handle primitive arrays (double[], float[], int[]) using java.lang.reflect.Array API
- Add Matrix value support for both absolute and percent deadband filtering
- Optimize early-exit logic in array comparison methods
- Extend test coverage for primitive arrays (double[], float[], int[]) and Matrix values
Deadband filtering now detects transitions between scalar, array, and
matrix value types and always triggers notifications for these changes,
regardless of deadband settings. This ensures clients are notified when
the structure of monitored values changes.

- Added ValueType enum to classify values as SCALAR, ARRAY, or MATRIX
- Type transitions bypass deadband checks and always trigger notifications
- Added comprehensive test coverage for all type transition combinations
@kevinherron kevinherron added this to the 1.0.7 milestone Oct 23, 2025
@kevinherron kevinherron merged commit b924559 into eclipse-milo:1.0 Oct 27, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants