mirror of
https://github.com/OPCFoundation/UA-.NETStandard.git
synced 2026-10-22 01:26:20 +08:00
4c651d05d2
* Improve thread safety and logging in MonitoredItem Replaced Queue with ConcurrentQueue in MonitoredItemDataCache for thread-safe operations. Updated Publish method to use List<DataValue> for better handling of dequeued values. Enhanced logging to include SourceTime and added logs for dropped values. In DurableSubscriptionTest, added try-finally block to ensure proper session closure and disposal, preventing memory leaks. Introduced DurableSubscriptionTestLooper for stress testing under debug mode. Refactored test code for improved readability. * Improve logging and session management Updated logging in `Session.cs`, `ServerBase.cs`, and `UaSCBinaryClientChannel.cs` to pass exceptions directly to the logger, enhancing error handling. Added connection state checks in `Session.cs` to prevent operations when the session is closed or never connected. Updated `Subscription.cs` to reflect session disconnection in `PublishingStopped`. Enhanced test outputs and renamed `DurableSubscriptionTestLooper` to `DurableSubscriptionTestDebug` in `DurableSubscriptionTest.cs`, reducing loop count for faster debug testing. * Fix monitored item id factory producing collisions by first trying to allocate a free monitored item id in the table, then committing. * Better diffing * Enhance logging and session management Added detailed logging in `AlarmNodeManager.cs` for lifecycle events and simulation control. Introduced a `Reconnecting` property in the `ISession` interface and `Session.cs` to manage session reconnection state, replacing the `m_reconnecting` field. Enhanced logging in `Session.cs` for reconnection and publish operations. Updated `DataGenerator.cs` to use `FrozenDictionary` for performance improvements. Replaced `SyncRoot` with `m_syncRoot` in `NamespaceTable.cs` for synchronization. Improved exception message formatting in `ServiceResult.cs`. Added necessary namespaces for new data structures. Made corrections and added debugging in `DurableSubscriptionTest.cs` for better session handling. * Dispose simulation