Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Samples/Client.Net4/UA Sample Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions">
<Version>9.0.8</Version>
<Version>9.0.9</Version>
</PackageReference>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Bindings.Https">
<Version>1.5.377.21</Version>
<Version>1.5.377.37-preview</Version>
</PackageReference>
<PackageReference Include="System.Net.Http">
<Version>4.3.4</Version>
Expand Down
8 changes: 4 additions & 4 deletions Samples/ClientControls.Net4/UA Client Controls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -1017,16 +1017,16 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Core">
<Version>1.5.377.21</Version>
<Version>1.5.377.37-preview</Version>
</PackageReference>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Client">
<Version>1.5.377.21</Version>
<Version>1.5.377.37-preview</Version>
</PackageReference>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Client.ComplexTypes">
<Version>1.5.377.21</Version>
<Version>1.5.377.37-preview</Version>
</PackageReference>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Configuration">
<Version>1.5.377.21</Version>
<Version>1.5.377.37-preview</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
Expand Down
2 changes: 1 addition & 1 deletion Samples/Controls.Net4/Sessions/SessionOpenDlg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public SessionOpenDlg()
#region Private Fields
private Session m_session;
private const string m_BrowseCertificates = "<Browse...>";
private static long m_Counter = 0;
private static uint m_Counter = 0;
private IList<string> m_preferredLocales;
private bool m_checkDomain = true;
#endregion
Expand Down
4 changes: 2 additions & 2 deletions Samples/Controls.Net4/UA Sample Controls.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -700,10 +700,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Client.ComplexTypes">
<Version>1.5.377.21</Version>
<Version>1.5.377.37-preview</Version>
</PackageReference>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Server">
<Version>1.5.377.21</Version>
<Version>1.5.377.37-preview</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
Expand Down
4 changes: 2 additions & 2 deletions Samples/GDS/Client/GlobalDiscoveryClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Configuration">
<Version>1.5.377.21</Version>
<Version>1.5.377.37-preview</Version>
</PackageReference>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Gds.Client.Common">
<Version>1.5.377.21</Version>
<Version>1.5.377.37-preview</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Client">
<Version>1.5.377.21</Version>
<Version>1.5.377.37-preview</Version>
</PackageReference>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Gds.Client.Common">
<Version>1.5.377.21</Version>
<Version>1.5.377.37-preview</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Samples/GDS/ConsoleServer/NetCoreGlobalDiscoveryServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.22.1" />
<PackageReference Include="Mono.Options" Version="6.12.0.148" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Gds.Server.Common" Version="1.5.377.21" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Configuration" Version="1.5.377.21" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Gds.Server.Common" Version="1.5.377.37-preview" />
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Configuration" Version="1.5.377.37-preview" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions Samples/GDS/Server/GlobalDiscoveryServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<SchemaVersion>2.0</SchemaVersion>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<ProjectGuid>{2E23571F-9987-4EBD-A9FD-5D5DD639E071}</ProjectGuid>
<ProjectGuid>{7148B244-B5A3-8F10-C50F-41B165904823}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Opc.Ua.Gds.Server</RootNamespace>
Expand Down Expand Up @@ -235,10 +235,10 @@
<Version>6.5.1</Version>
</PackageReference>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Configuration">
<Version>1.5.377.21</Version>
<Version>1.5.377.37-preview</Version>
</PackageReference>
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Gds.Server.Common">
<Version>1.5.377.21</Version>
<Version>1.5.377.37-preview</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup>
Expand Down
10 changes: 5 additions & 5 deletions Samples/Opc.Ua.Sample/Base/CustomNodeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2205,7 +2205,7 @@ public virtual void CreateMonitoredItems(
IList<MonitoringFilterResult> filterErrors,
IList<IMonitoredItem> monitoredItems,
bool createDurable,
ref long globalIdCounter)
MonitoredItemIdFactory globalIdCounter)
{
ServerSystemContext systemContext = m_systemContext.Copy(context);
IDictionary<NodeId, NodeState> operationCache = new NodeIdDictionary<NodeState>();
Expand Down Expand Up @@ -2263,7 +2263,7 @@ public virtual void CreateMonitoredItems(
context.DiagnosticsMask,
timestampsToReturn,
itemToCreate,
ref globalIdCounter,
globalIdCounter,
out filterError,
out monitoredItem);

Expand Down Expand Up @@ -2309,7 +2309,7 @@ public virtual void CreateMonitoredItems(
context.DiagnosticsMask,
timestampsToReturn,
itemToCreate,
ref globalIdCounter,
globalIdCounter,
out filterError,
out monitoredItem);

Expand Down Expand Up @@ -2421,7 +2421,7 @@ protected virtual ServiceResult CreateMonitoredItem(
DiagnosticsMasks diagnosticsMasks,
TimestampsToReturn timestampsToReturn,
MonitoredItemCreateRequest itemToCreate,
ref long globalIdCounter,
MonitoredItemIdFactory globalIdCounter,
out MonitoringFilterResult filterError,
out IMonitoredItem monitoredItem)
{
Expand Down Expand Up @@ -2481,7 +2481,7 @@ protected virtual ServiceResult CreateMonitoredItem(
}

// create a globally unique identifier.
uint monitoredItemId = Utils.IncrementIdentifier(ref globalIdCounter);
uint monitoredItemId = globalIdCounter.GetNextId();

// determine the sampling interval.
double samplingInterval = itemToCreate.RequestedParameters.SamplingInterval;
Expand Down
15 changes: 11 additions & 4 deletions Samples/Opc.Ua.Sample/Base/DataChangeMonitoredItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2005-2019 The OPC Foundation, Inc. All rights reserved.
*
* OPC Foundation MIT License 1.00
*
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
Expand All @@ -11,7 +11,7 @@
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
Expand All @@ -30,6 +30,8 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Opc.Ua.Server;

namespace Opc.Ua.Sample
Expand Down Expand Up @@ -252,7 +254,7 @@ public ServiceResult Modify(

m_samplingInterval = samplingInterval;

// calculate the next sampling interval.
// calculate the next sampling interval.
long newSamplingInterval = (long)(m_samplingInterval * TimeSpan.TicksPerMillisecond);

if (m_samplingInterval > 0)
Expand Down Expand Up @@ -850,7 +852,12 @@ private void Publish(
diagnostics.Enqueue(diagnosticInfo);
}

public bool Publish(OperationContext context, Queue<MonitoredItemNotification> notifications, Queue<DiagnosticInfo> diagnostics, uint maxNotificationsPerPublish)
public bool Publish(
OperationContext context,
Queue<MonitoredItemNotification> notifications,
Queue<DiagnosticInfo> diagnostics,
uint maxNotificationsPerPublish,
ILogger logger)
{
return Publish(context, notifications, diagnostics);
}
Expand Down
42 changes: 21 additions & 21 deletions Samples/Opc.Ua.Sample/Base/SampleNodeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2005-2022 The OPC Foundation, Inc. All rights reserved.
*
* OPC Foundation MIT License 1.00
*
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
Expand All @@ -11,7 +11,7 @@
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
Expand Down Expand Up @@ -56,7 +56,7 @@ public SampleNodeManager(IServerInternal server)
m_systemContext.SystemHandle = null;
m_systemContext.NodeIdFactory = this;

// create the table of nodes.
// create the table of nodes.
m_predefinedNodes = new NodeIdDictionary<NodeState>();
m_rootNotifiers = new List<NodeState>();
m_sampledItems = new List<DataChangeMonitoredItem>();
Expand Down Expand Up @@ -340,7 +340,7 @@ protected set
/// <remarks>
/// The externalReferences is an out parameter that allows the node manager to link to nodes
/// in other node managers. For example, the 'Objects' node is managed by the CoreNodeManager and
/// should have a reference to the root folder node(s) exposed by this node manager.
/// should have a reference to the root folder node(s) exposed by this node manager.
/// </remarks>
public virtual void CreateAddressSpace(IDictionary<NodeId, IList<IReference>> externalReferences)
{
Expand Down Expand Up @@ -518,7 +518,7 @@ protected virtual void RemovePredefinedNode(
/// </summary>
protected virtual void OnNodeRemoved(NodeState node)
{
// overridden by the sub-class.
// overridden by the sub-class.
}

/// <summary>
Expand Down Expand Up @@ -722,7 +722,7 @@ protected void AddTypesToTypeTree(NodeId typeId)
}

/// <summary>
/// Finds the specified and checks if it is of the expected type.
/// Finds the specified and checks if it is of the expected type.
/// </summary>
/// <returns>Returns null if not found or not of the correct type.</returns>
public NodeState FindPredefinedNode(NodeId nodeId, Type expectedType)
Expand Down Expand Up @@ -766,7 +766,7 @@ public virtual void DeleteAddressSpace()
/// Returns a unique handle for the node.
/// </summary>
/// <remarks>
/// This must efficiently determine whether the node belongs to the node manager. If it does belong to
/// This must efficiently determine whether the node belongs to the node manager. If it does belong to
/// NodeManager it should return a handle that does not require the NodeId to be validated again when
/// the handle is passed into other methods such as 'Read' or 'Write'.
/// </remarks>
Expand All @@ -782,7 +782,7 @@ public virtual object GetManagerHandle(NodeId nodeId)
/// Returns a unique handle for the node.
/// </summary>
/// <remarks>
/// This must efficiently determine whether the node belongs to the node manager. If it does belong to
/// This must efficiently determine whether the node belongs to the node manager. If it does belong to
/// NodeManager it should return a handle that does not require the NodeId to be validated again when
/// the handle is passed into other methods such as 'Read' or 'Write'.
/// </remarks>
Expand Down Expand Up @@ -1031,7 +1031,7 @@ public virtual void Browse(
// apply filters to references.
for (IReference reference = browser.Next(); reference != null; reference = browser.Next())
{
// create the type definition reference.
// create the type definition reference.
ReferenceDescription description = GetReferenceDescription(context, reference, continuationPoint);

if (description == null)
Expand Down Expand Up @@ -1065,7 +1065,7 @@ private ReferenceDescription GetReferenceDescription(
IReference reference,
ContinuationPoint continuationPoint)
{
// create the type definition reference.
// create the type definition reference.
ReferenceDescription description = new ReferenceDescription();

description.NodeId = reference.TargetId;
Expand Down Expand Up @@ -1147,9 +1147,9 @@ private ReferenceDescription GetReferenceDescription(
/// Returns the target of the specified browse path fragment(s).
/// </summary>
/// <remarks>
/// If reference exists but the node manager does not know the browse name it must
/// If reference exists but the node manager does not know the browse name it must
/// return the NodeId as an unresolvedTargetIds. The caller will try to check the
/// browse name.
/// browse name.
/// </remarks>
public virtual void TranslateBrowsePath(
OperationContext context,
Expand Down Expand Up @@ -1975,8 +1975,8 @@ protected virtual ServiceResult Call(
/// Subscribes or unsubscribes to events produced by the specified source.
/// </summary>
/// <remarks>
/// This method is called when a event subscription is created or deletes. The node manager
/// must start/stop reporting events for the specified object and all objects below it in
/// This method is called when a event subscription is created or deletes. The node manager
/// must start/stop reporting events for the specified object and all objects below it in
/// the notifier hierarchy.
/// </remarks>
public virtual ServiceResult SubscribeToEvents(
Expand Down Expand Up @@ -2041,7 +2041,7 @@ public virtual ServiceResult SubscribeToEvents(
/// Subscribes or unsubscribes to events produced by all event sources.
/// </summary>
/// <remarks>
/// This method is called when a event subscription is created or deleted. The node
/// This method is called when a event subscription is created or deleted. The node
/// manager must start/stop reporting events for all objects that it manages.
/// </remarks>
public virtual ServiceResult SubscribeToAllEvents(
Expand Down Expand Up @@ -2208,7 +2208,7 @@ public virtual void CreateMonitoredItems(
IList<MonitoringFilterResult> filterErrors,
IList<IMonitoredItem> monitoredItems,
bool createDurable,
ref long globalIdCounter)
MonitoredItemIdFactory globalIdCounter)
{
ServerSystemContext systemContext = m_systemContext.Copy(context);
IDictionary<NodeId, NodeState> operationCache = new NodeIdDictionary<NodeState>();
Expand Down Expand Up @@ -2266,7 +2266,7 @@ public virtual void CreateMonitoredItems(
context.DiagnosticsMask,
timestampsToReturn,
itemToCreate,
ref globalIdCounter,
globalIdCounter,
out filterError,
out monitoredItem);

Expand Down Expand Up @@ -2312,7 +2312,7 @@ public virtual void CreateMonitoredItems(
context.DiagnosticsMask,
timestampsToReturn,
itemToCreate,
ref globalIdCounter,
globalIdCounter,
out filterError,
out monitoredItem);

Expand Down Expand Up @@ -2459,7 +2459,7 @@ protected virtual ServiceResult CreateMonitoredItem(
DiagnosticsMasks diagnosticsMasks,
TimestampsToReturn timestampsToReturn,
MonitoredItemCreateRequest itemToCreate,
ref long globalIdCounter,
MonitoredItemIdFactory globalIdCounter,
out MonitoringFilterResult filterError,
out IMonitoredItem monitoredItem)
{
Expand Down Expand Up @@ -2527,7 +2527,7 @@ protected virtual ServiceResult CreateMonitoredItem(
}

// create a globally unique identifier.
uint monitoredItemId = Utils.IncrementIdentifier(ref globalIdCounter);
uint monitoredItemId = globalIdCounter.GetNextId();

// determine the sampling interval.
double samplingInterval = itemToCreate.RequestedParameters.SamplingInterval;
Expand Down Expand Up @@ -2644,7 +2644,7 @@ private void DeleteSampledItem(DataChangeMonitoredItem monitoredItem)
}

/// <summary>
/// Polls each monitored item which requires sample.
/// Polls each monitored item which requires sample.
/// </summary>
private void DoSample(object state)
{
Expand Down
Loading
Loading