Skip to content

Commit f52ae43

Browse files
authored
Merge pull request #3638 from OPCFoundation/master378
Prepare release 1.5.378 from master378
2 parents 99044fd + 87a8ee1 commit f52ae43

267 files changed

Lines changed: 3515 additions & 3778 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.azurepipelines/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- job: buildprep${{ parameters.jobnamesuffix }}
1111
displayName: Prepare Build Jobs
1212
pool:
13-
vmImage: 'windows-2025'
13+
vmImage: 'windows-2025-vs2026'
1414
variables:
1515
DOTNET_CLI_TELEMETRY_OPTOUT: true
1616
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
@@ -51,7 +51,7 @@ jobs:
5151
arguments: '--framework ${{ parameters.framework }} --configuration Release ${{ parameters.buildoption }} /p:RCS=true'
5252
- task: DotNetCoreCLI@2
5353
displayName: Release Pack
54-
condition: eq(variables['poolImage'], 'windows-2025')
54+
condition: eq(variables['poolImage'], 'windows-2025-vs2026')
5555
inputs:
5656
command: pack
5757
packagesToPack: '**/Opc.Ua.*.csproj'
@@ -65,7 +65,7 @@ jobs:
6565
arguments: '--framework ${{ parameters.framework }} --configuration Debug ${{ parameters.buildoption }} /p:RCS=true'
6666
- task: DotNetCoreCLI@2
6767
displayName: Debug Pack
68-
condition: eq(variables['poolImage'], 'windows-2025')
68+
condition: eq(variables['poolImage'], 'windows-2025-vs2026')
6969
inputs:
7070
command: pack
7171
packagesToPack: '**/Opc.Ua.*.csproj'

.azurepipelines/get-matrix.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if (![string]::IsNullOrEmpty($JobPrefix)) {
4343
if ($AgentTable -eq $null -or $AgentTable.Count -eq 0)
4444
{
4545
$agents = @{
46-
windows = "windows-2025"
46+
windows = "windows-2025-vs2026"
4747
linux = "ubuntu-22.04"
4848
mac = "macOS-15"
4949
}

.azurepipelines/preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- job: nuget${{parameters.config}}
2020
displayName: Pack Nugets ${{parameters.config}}
2121
pool:
22-
vmImage: 'windows-2025'
22+
vmImage: 'windows-2025-vs2026'
2323
variables:
2424
- group: codesign
2525
- name: msbuildversion

.azurepipelines/sln.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Build all solutions on windows
33
#
44
parameters:
5-
poolImage: 'windows-2025'
5+
poolImage: 'windows-2025-vs2026'
66
jobnamesuffix: ''
77

88
jobs:

.azurepipelines/test.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- job: testprep${{ parameters.jobnamesuffix }}
1212
displayName: Prepare Test Jobs ${{ parameters.configuration }} (${{ parameters.framework }})
1313
pool:
14-
vmImage: 'windows-2025'
14+
vmImage: 'windows-2025-vs2026'
1515
variables:
1616
DOTNET_CLI_TELEMETRY_OPTOUT: true
1717
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
@@ -92,3 +92,8 @@ jobs:
9292
command: test
9393
projects: $(file)
9494
arguments: '--no-restore ${{ variables.DotCliCommandline }} --configuration ${{ parameters.configuration }}'
95+
- task: PublishBuildArtifacts@1
96+
displayName: 'Publish Fuzzing artifacts on failure'
97+
condition: and(failed(), ne(variables['fuzzingartifacts.secureFilePath'], ''))
98+
inputs:
99+
PathtoPublish: '$(Agent.TempDirectory)/FuzzingArtifacts.zip'

.azurepipelines/testcc.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,8 @@ jobs:
106106
COMMIT_UUID: '$(Build.SourceVersion)'
107107
continueOnError: true
108108
displayName: 'Upload to Codacy'
109+
- task: PublishBuildArtifacts@1
110+
displayName: 'Publish Fuzzing artifacts on failure'
111+
condition: and(failed(), ne(variables['fuzzingartifacts.secureFilePath'], ''))
112+
inputs:
113+
PathtoPublish: '$(Agent.TempDirectory)/FuzzingArtifacts.zip'

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,4 +267,5 @@ testEnvironments.json
267267
# UA Fuzzing findings folders
268268
/Fuzzing/**/findings/
269269
/Fuzzing/**/Testcases/
270-
!/Fuzzing/**/Testcases/*.bin
270+
!/Fuzzing/**/Testcases/*.bin
271+
**/Properties/launchSettings.json

Applications/ConsoleReferenceClient/ClientSamples.cs

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ public ClientSamples(
7474
{
7575
m_telemetry = telemetry;
7676
m_logger = telemetry.CreateLogger<ClientSamples>();
77-
m_validateResponse = validateResponse ?? ClientBase.ValidateResponse;
77+
m_validate = validateResponse;
78+
7879
m_quitEvent = quitEvent;
7980
m_verbose = verbose;
8081
m_desiredEventFields = [];
@@ -146,7 +147,7 @@ public async Task ReadNodesAsync(ISession session, CancellationToken ct = defaul
146147
DiagnosticInfoCollection diagnosticInfos = response.DiagnosticInfos;
147148

148149
// Validate the results
149-
m_validateResponse(resultsValues, nodesToRead);
150+
ValidateResponse(resultsValues, nodesToRead);
150151

151152
// Display the results.
152153
foreach (DataValue result in resultsValues)
@@ -187,7 +188,7 @@ public async Task WriteNodesAsync(ISession session, CancellationToken ct = defau
187188
// Int32 Node - Objects\CTT\Scalar\Scalar_Static\Int32
188189
var intWriteVal = new WriteValue
189190
{
190-
NodeId = new NodeId("ns=2;s=Scalar_Static_Int32"),
191+
NodeId = NodeId.Parse("ns=2;s=Scalar_Static_Int32"),
191192
AttributeId = Attributes.Value,
192193
Value = new DataValue { Value = 100 }
193194
};
@@ -196,7 +197,7 @@ public async Task WriteNodesAsync(ISession session, CancellationToken ct = defau
196197
// Float Node - Objects\CTT\Scalar\Scalar_Static\Float
197198
var floatWriteVal = new WriteValue
198199
{
199-
NodeId = new NodeId("ns=2;s=Scalar_Static_Float"),
200+
NodeId = NodeId.Parse("ns=2;s=Scalar_Static_Float"),
200201
AttributeId = Attributes.Value,
201202
Value = new DataValue { Value = (float)100.5 }
202203
};
@@ -205,7 +206,7 @@ public async Task WriteNodesAsync(ISession session, CancellationToken ct = defau
205206
// String Node - Objects\CTT\Scalar\Scalar_Static\String
206207
var stringWriteVal = new WriteValue
207208
{
208-
NodeId = new NodeId("ns=2;s=Scalar_Static_String"),
209+
NodeId = NodeId.Parse("ns=2;s=Scalar_Static_String"),
209210
AttributeId = Attributes.Value,
210211
Value = new DataValue { Value = "String Test" }
211212
};
@@ -224,7 +225,7 @@ public async Task WriteNodesAsync(ISession session, CancellationToken ct = defau
224225
DiagnosticInfoCollection diagnosticInfos = response.DiagnosticInfos;
225226

226227
// Validate the response
227-
m_validateResponse(results, nodesToWrite);
228+
ValidateResponse(results, nodesToWrite);
228229

229230
// Display the results.
230231
Console.WriteLine("Write Results :");
@@ -302,8 +303,8 @@ public async Task CallMethodAsync(ISession session, CancellationToken ct = defau
302303
// Define the UA Method to call
303304
// Parent node - Objects\CTT\Methods
304305
// Method node - Objects\CTT\Methods\Add
305-
var objectId = new NodeId("ns=2;s=Methods");
306-
var methodId = new NodeId("ns=2;s=Methods_Add");
306+
var objectId = NodeId.Parse("ns=2;s=Methods");
307+
var methodId = NodeId.Parse("ns=2;s=Methods_Add");
307308

308309
// Define the method parameters
309310
// Input argument requires a Float and an UInt32 value
@@ -351,8 +352,8 @@ public async Task EnableEventsAsync(
351352
// Define the UA Method to call
352353
// Parent node - Objects\CTT\Alarms
353354
// Method node - Objects\CTT\Alarms\Start
354-
var objectId = new NodeId("ns=7;s=Alarms");
355-
var methodId = new NodeId("ns=7;s=Alarms.Start");
355+
var objectId = NodeId.Parse("ns=7;s=Alarms");
356+
var methodId = NodeId.Parse("ns=7;s=Alarms.Start");
356357

357358
// Define the method parameters
358359
// Input argument requires a Float and an UInt32 value
@@ -457,7 +458,7 @@ public async Task<bool> SubscribeToDataChangesAsync(
457458
var intMonitoredItem = new MonitoredItem(subscription.DefaultItem)
458459
{
459460
// Int32 Node - Objects\CTT\Scalar\Simulation\Int32
460-
StartNodeId = new NodeId("ns=2;s=Scalar_Simulation_Int32"),
461+
StartNodeId = NodeId.Parse("ns=2;s=Scalar_Simulation_Int32"),
461462
AttributeId = Attributes.Value,
462463
DisplayName = "Int32 Variable",
463464
SamplingInterval = itemSamplingInterval,
@@ -471,7 +472,7 @@ public async Task<bool> SubscribeToDataChangesAsync(
471472
var floatMonitoredItem = new MonitoredItem(subscription.DefaultItem)
472473
{
473474
// Float Node - Objects\CTT\Scalar\Simulation\Float
474-
StartNodeId = new NodeId("ns=2;s=Scalar_Simulation_Float"),
475+
StartNodeId = NodeId.Parse("ns=2;s=Scalar_Simulation_Float"),
475476
AttributeId = Attributes.Value,
476477
DisplayName = "Float Variable",
477478
SamplingInterval = itemSamplingInterval,
@@ -484,7 +485,7 @@ public async Task<bool> SubscribeToDataChangesAsync(
484485
var stringMonitoredItem = new MonitoredItem(subscription.DefaultItem)
485486
{
486487
// String Node - Objects\CTT\Scalar\Simulation\String
487-
StartNodeId = new NodeId("ns=2;s=Scalar_Simulation_String"),
488+
StartNodeId = NodeId.Parse("ns=2;s=Scalar_Simulation_String"),
488489
AttributeId = Attributes.Value,
489490
DisplayName = "String Variable",
490491
SamplingInterval = itemSamplingInterval,
@@ -496,7 +497,7 @@ public async Task<bool> SubscribeToDataChangesAsync(
496497

497498
var eventMonitoredItem = new MonitoredItem(subscription.DefaultItem)
498499
{
499-
StartNodeId = new NodeId(ObjectIds.Server),
500+
StartNodeId = ObjectIds.Server,
500501
AttributeId = Attributes.EventNotifier,
501502
DisplayName = "Event Variable",
502503
SamplingInterval = itemSamplingInterval,
@@ -529,7 +530,7 @@ public async Task<bool> SubscribeToDataChangesAsync(
529530
};
530531
var desiredEventType = new LiteralOperand
531532
{
532-
Value = new Variant(new NodeId(ObjectTypeIds.ExclusiveLevelAlarmType))
533+
Value = new Variant(ObjectTypeIds.ExclusiveLevelAlarmType)
533534
};
534535

535536
whereClause.Push(FilterOperator.Equals, [existingEventType, desiredEventType]);
@@ -715,7 +716,7 @@ public async Task<IList<INode>> FetchAllNodesNodeCacheAsync(
715716
/// <param name="browseDescription">An optional BrowseDescription to use.</param>
716717
public async Task<ReferenceDescriptionCollection> ManagedBrowseFullAddressSpaceAsync(
717718
IUAClient uaClient,
718-
NodeId startingNode = null,
719+
NodeId startingNode = default,
719720
BrowseDescription browseDescription = null,
720721
CancellationToken ct = default)
721722
{
@@ -891,7 +892,7 @@ await uaClient
891892
/// <param name="browseDescription">An optional BrowseDescription to use.</param>
892893
public async Task<ReferenceDescriptionCollection> BrowseFullAddressSpaceAsync(
893894
IUAClient uaClient,
894-
NodeId startingNode = null,
895+
NodeId startingNode = default,
895896
BrowseDescription browseDescription = null,
896897
CancellationToken ct = default)
897898
{
@@ -990,8 +991,8 @@ BrowseDescriptionCollection browseDescriptionCollection
990991
}
991992
catch (ServiceResultException sre)
992993
{
993-
if (sre.StatusCode is StatusCodes.BadEncodingLimitsExceeded or StatusCodes
994-
.BadResponseTooLarge)
994+
if (sre.StatusCode == StatusCodes.BadEncodingLimitsExceeded ||
995+
sre.StatusCode == StatusCodes.BadResponseTooLarge)
995996
{
996997
// try to address by overriding operation limit
997998
maxNodesPerBrowse =
@@ -1119,7 +1120,7 @@ public async Task<ComplexTypeSystem> LoadTypeSystemAsync(
11191120
stopWatch.Start();
11201121

11211122
var complexTypeSystem = new ComplexTypeSystem(session, m_telemetry);
1122-
await complexTypeSystem.LoadAsync(ct: ct).ConfigureAwait(false);
1123+
await complexTypeSystem.LoadAsync(throwOnError: true, ct: ct).ConfigureAwait(false);
11231124

11241125
stopWatch.Stop();
11251126

@@ -1775,7 +1776,21 @@ private static ByteStringCollection PrepareBrowseNext(
17751776
return continuationPoints;
17761777
}
17771778

1778-
private readonly Action<IList, IList> m_validateResponse;
1779+
private void ValidateResponse<TRequest, TResponse>(
1780+
IReadOnlyList<TRequest> requests,
1781+
IReadOnlyList<TResponse> responses)
1782+
{
1783+
if (m_validate != null)
1784+
{
1785+
m_validate(requests?.ToList(), responses?.ToList());
1786+
}
1787+
else
1788+
{
1789+
ClientBase.ValidateResponse(responses, requests);
1790+
}
1791+
}
1792+
1793+
private readonly Action<IList, IList> m_validate;
17791794
private readonly ITelemetryContext m_telemetry;
17801795
private readonly ILogger m_logger;
17811796
private readonly ManualResetEvent m_quitEvent;

Applications/ConsoleReferenceClient/Program.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
using System.Text;
3737
using System.Threading;
3838
using System.Threading.Tasks;
39-
using System.Xml.Linq;
4039
using Microsoft.Extensions.Logging;
4140
using Opc.Ua;
4241
using Opc.Ua.Client;
@@ -455,7 +454,7 @@ CertificateIdentifier userCertificateIdentifier
455454
application.ApplicationConfiguration,
456455
reverseConnectManager,
457456
telemetry,
458-
ClientBase.ValidateResponse
457+
null
459458
)
460459
{
461460
AutoAccept = autoAccept,
@@ -482,7 +481,7 @@ CertificateIdentifier userCertificateIdentifier
482481
uaClient.Session.TransferSubscriptionsOnReconnect = true;
483482
var samples = new ClientSamples(
484483
telemetry,
485-
ClientBase.ValidateResponse,
484+
null,
486485
quitEvent,
487486
verbose);
488487
if (loadTypes)
@@ -733,14 +732,14 @@ await samples.SubscribeToDataChangesAsync(
733732
if (waitCounters == closeSessionTime &&
734733
uaClient.Session.SubscriptionCount == 1)
735734
{
736-
Console.WriteLine($"Closing Session (CurrentTime: {DateTime.Now.ToLongTimeString()})");
735+
Console.WriteLine($"Closing Session (CurrentTime: {DateTime.Now:T})");
737736
await uaClient.Session.CloseAsync(closeChannel: false, ct: ct)
738737
.ConfigureAwait(false);
739738
}
740739

741740
if (waitCounters == restartSessionTime)
742741
{
743-
Console.WriteLine($"Restarting Session (CurrentTime: {DateTime.Now.ToLongTimeString()})");
742+
Console.WriteLine($"Restarting Session (CurrentTime: {DateTime.Now:T})");
744743
await uaClient
745744
.DurableSubscriptionTransferAsync(
746745
serverUrl.ToString(),

Applications/ConsoleReferenceClient/UAClient.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,7 @@ public async Task<bool> ConnectAsync(
220220
{
221221
throw new ServiceResultException(
222222
StatusCodes.BadTimeout,
223-
"Waiting for a reverse connection timed out."
224-
);
223+
"Waiting for a reverse connection timed out.");
225224
}
226225
if (endpointDescription == null)
227226
{

0 commit comments

Comments
 (0)