You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The $SDK\Server\NodeManager\SamplingGroup class from V1.04 or above Opc.Ua.Server library spawns a sperate new thread for each monitoredItem being added to the same sampling group.
Expected Behavior
The SamplingGroup is expected to sample all MonitoredItems with same sampling interval on the same thread. It should not spawn separate thread in each call for ApplyChanges.
The $SDK\Server\NodeManager\SamplingGroup class from V1.02 had correct behavior.
Root cause of the issue:
The SamplingGroup::ApplyChanges starts the group even if the group is already running.
Description of fix:
File: $SDK\Server\NodeManager\SamplingGroup
Ad a new member variable to hold the task that is created in Startup function. Set the default value to null.
Function: Startup
Store the task returned by Task.Factory.StartNew in the member variable.
Function: ApplyChanges
Call Startup if (m_items.Count > 0 && null == m_task)
Thank you for investigating the issue and for having the fix. I appreciate it.
I viewed the code changes proposed in #2984
The code changes look fine.
I think we also need to set the m_samplingTask to null in the function 'public void Shutdown()' in $SDK\Server\NodeManager\SamplingGroup
Type of issue
Current Behavior
The $SDK\Server\NodeManager\SamplingGroup class from V1.04 or above Opc.Ua.Server library spawns a sperate new thread for each monitoredItem being added to the same sampling group.
Expected Behavior
The SamplingGroup is expected to sample all MonitoredItems with same sampling interval on the same thread. It should not spawn separate thread in each call for ApplyChanges.
The $SDK\Server\NodeManager\SamplingGroup class from V1.02 had correct behavior.
Root cause of the issue:
The SamplingGroup::ApplyChanges starts the group even if the group is already running.
Description of fix:
File: $SDK\Server\NodeManager\SamplingGroup
Ad a new member variable to hold the task that is created in Startup function. Set the default value to null.
Function: Startup
Function: ApplyChanges
Steps To Reproduce
No response
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: