Skip to content

MonitoredItem2.OnReportEvent Ignores Session in ISystemContext During Notification Process #2777

@Filippo-Oliva-ABB

Description

@Filippo-Oliva-ABB

Type of issue

  • Bug
  • Enhancement
  • Compliance
  • Question
  • Help wanted

Current Behavior

The MonitoredNode2.OnReportEvent method does not take into account the Session included in the passed ISystemContext during the notification process. Currently, when a Session is included, the notification occurs on each connected session without checking the specific session passed through the ISystemContext.

Expected Behavior

The MonitoredNode2.OnReportEvent method should only notify the Session specified in the ISystemContext, if any, otherwise all the connected session.

Steps To Reproduce

  1. Single OPC UA server providing a single “NodeManager” that Creates and exposes the whole address space.
  2. Two clients (Client1 and Client2) connected to the server, both subscribed to events of the same node
  3. Override the ConditionRefresh method of the NodeManager trying to notify some event to the subscribed node by calling the ReportEvent method exposed by that node passing as the first parameter a copy of the SystemContext that includes the OperationContext got by the ConditionRefresh method.

Environment

- OS: Windows 10
- Environment: Visual Studio 2019 16.11.33
- Runtime: .NET Framework 4.8
- Nuget Version: 1.5.364.36
- Component: Opc.Ua.Server
- Server: Quickstarts.ConsoleReferenceServer
- Client: UA Expert

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug was identified and should be fixed.server

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions