Skip to content

Commit b9eef70

Browse files
committed
2 parents 85a7513 + 7bbe801 commit b9eef70

File tree

43 files changed

+254
-2835
lines changed

Some content is hidden

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

43 files changed

+254
-2835
lines changed

Applications/ConsoleReferenceClient/ClientSamples.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,18 @@ public async Task ReadNodesAsync(ISession session, CancellationToken ct = defaul
115115
[
116116
// Value of ServerStatus
117117
new ReadValueId {
118-
NodeId = Variables.Server_ServerStatus,
118+
NodeId = VariableIds.Server_ServerStatus,
119119
AttributeId = Attributes.Value },
120120
// BrowseName of ServerStatus_StartTime
121121
new ReadValueId
122122
{
123-
NodeId = Variables.Server_ServerStatus_StartTime,
123+
NodeId = VariableIds.Server_ServerStatus_StartTime,
124124
AttributeId = Attributes.BrowseName
125125
},
126126
// Value of ServerStatus_StartTime
127127
new ReadValueId
128128
{
129-
NodeId = Variables.Server_ServerStatus_StartTime,
129+
NodeId = VariableIds.Server_ServerStatus_StartTime,
130130
AttributeId = Attributes.Value
131131
}
132132
];
@@ -156,7 +156,7 @@ public async Task ReadNodesAsync(ISession session, CancellationToken ct = defaul
156156

157157
// Read Server NamespaceArray
158158
Console.WriteLine("Reading Value of NamespaceArray node...");
159-
DataValue namespaceArray = await session.ReadValueAsync(Variables.Server_NamespaceArray, ct)
159+
DataValue namespaceArray = await session.ReadValueAsync(VariableIds.Server_NamespaceArray, ct)
160160
.ConfigureAwait(false);
161161
// Display the result
162162
Console.WriteLine($"NamespaceArray Value = {namespaceArray}");

Applications/ConsoleReferenceClient/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ Opc.Ua.Client.ComplexTypes.ComplexTypeSystem complexTypeSystem
503503
{
504504
Console.WriteLine("Browse the full address space.");
505505
referenceDescriptions = await samples
506-
.BrowseFullAddressSpaceAsync(uaClient, Objects.RootFolder, ct: ct)
506+
.BrowseFullAddressSpaceAsync(uaClient, ObjectIds.RootFolder, ct: ct)
507507
.ConfigureAwait(false);
508508
variableIds =
509509
[
@@ -524,7 +524,7 @@ .. referenceDescriptions
524524
referenceDescriptionsFromManagedBrowse = await samples
525525
.ManagedBrowseFullAddressSpaceAsync(
526526
uaClient,
527-
Objects.RootFolder,
527+
ObjectIds.RootFolder,
528528
ct: ct)
529529
.ConfigureAwait(false);
530530
variableIdsManagedBrowse =
@@ -553,7 +553,7 @@ .. referenceDescriptionsFromManagedBrowse
553553
allNodes = await samples
554554
.FetchAllNodesNodeCacheAsync(
555555
uaClient,
556-
Objects.RootFolder,
556+
ObjectIds.RootFolder,
557557
true,
558558
true,
559559
false,

Applications/Quickstarts.Servers/Alarms/AlarmHelpers.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public static FolderState CreateFolder(
5050
var folder = new FolderState(parent)
5151
{
5252
SymbolicName = name,
53-
ReferenceTypeId = ReferenceTypes.Organizes,
53+
ReferenceTypeId = ReferenceTypeIds.Organizes,
5454
TypeDefinitionId = ObjectTypeIds.FolderType,
5555
NodeId = new NodeId(path, nameSpaceIndex),
5656
BrowseName = new QualifiedName(path, nameSpaceIndex),
@@ -96,7 +96,7 @@ public static BaseDataVariableState CreateVariable(
9696
var variable = new BaseDataVariableState(parent)
9797
{
9898
SymbolicName = name,
99-
ReferenceTypeId = ReferenceTypes.Organizes,
99+
ReferenceTypeId = ReferenceTypeIds.Organizes,
100100
TypeDefinitionId = VariableTypeIds.BaseDataVariableType,
101101
NodeId = new NodeId(path, nameSpaceIndex),
102102
BrowseName = new QualifiedName(name, nameSpaceIndex),

Applications/Quickstarts.Servers/Alarms/AlarmHolders/AlarmConditionTypeHolder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void Initialize(
112112
oneShot: false,
113113
shelvingTime: double.MaxValue);
114114
alarm.ShelvingState.LastTransition.Value = new LocalizedText(string.Empty);
115-
alarm.ShelvingState.LastTransition.Id.Value = 0;
115+
alarm.ShelvingState.LastTransition.Id.Value = default;
116116

117117
alarm.OnShelve = OnShelve;
118118
alarm.OnTimedUnshelve = OnTimedUnshelve;

Applications/Quickstarts.Servers/Alarms/AlarmHolders/AlarmHolder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private void InitializeInternal(BaseEventState alarm, NodeId branchId = default)
137137

138138
if (!isBranch)
139139
{
140-
m_trigger.AddReference(ReferenceTypes.HasCondition, false, m_alarm.NodeId);
140+
m_trigger.AddReference(ReferenceTypeIds.HasCondition, false, m_alarm.NodeId);
141141
m_parent.AddChild(alarm);
142142
}
143143
}

Applications/Quickstarts.Servers/Alarms/AlarmNodeManager.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,12 @@ public override void CreateAddressSpace(
145145

146146
FolderState alarmsFolder = CreateFolder(null, alarmsNodeName, alarmsName);
147147
alarmsFolder.AddReference(
148-
ReferenceTypes.Organizes,
148+
ReferenceTypeIds.Organizes,
149149
true,
150150
ObjectIds.ObjectsFolder);
151151
references.Add(
152152
new NodeStateReference(
153-
ReferenceTypes.Organizes,
153+
ReferenceTypeIds.Organizes,
154154
false,
155155
alarmsFolder.NodeId));
156156
alarmsFolder.EventNotifier = EventNotifiers.SubscribeToEvents;
@@ -284,7 +284,7 @@ private FolderState CreateFolder(NodeState parent, string path, string name)
284284
var folder = new FolderState(parent)
285285
{
286286
SymbolicName = name,
287-
ReferenceTypeId = ReferenceTypes.Organizes,
287+
ReferenceTypeId = ReferenceTypeIds.Organizes,
288288
TypeDefinitionId = ObjectTypeIds.FolderType,
289289
NodeId = new NodeId(path, NamespaceIndex),
290290
BrowseName = new QualifiedName(path, NamespaceIndex),
@@ -318,7 +318,7 @@ private void DoSimulation(object state)
318318
controller.Source.GetReferences(
319319
SystemContext,
320320
references,
321-
ReferenceTypes.HasCondition,
321+
ReferenceTypeIds.HasCondition,
322322
false);
323323
foreach (IReference reference in references)
324324
{
@@ -347,8 +347,8 @@ private void DoSimulation(object state)
347347
public ServiceResult OnStart(
348348
ISystemContext context,
349349
NodeState node,
350-
VariantCollection inputArguments,
351-
VariantCollection outputArguments)
350+
ArrayOf<Variant> inputArguments,
351+
List<Variant> outputArguments)
352352
{
353353
// all arguments must be provided.
354354
uint seconds;
@@ -386,7 +386,7 @@ public ServiceResult OnStart(
386386
sourceController.Source.GetReferences(
387387
SystemContext,
388388
references,
389-
ReferenceTypes.HasCondition,
389+
ReferenceTypeIds.HasCondition,
390390
false);
391391
foreach (IReference reference in references)
392392
{
@@ -409,8 +409,8 @@ public ServiceResult OnStart(
409409
public ServiceResult OnStartBranch(
410410
ISystemContext context,
411411
NodeState node,
412-
VariantCollection inputArguments,
413-
VariantCollection outputArguments)
412+
ArrayOf<Variant> inputArguments,
413+
List<Variant> outputArguments)
414414
{
415415
// all arguments must be provided.
416416
uint seconds;
@@ -450,7 +450,7 @@ public ServiceResult OnStartBranch(
450450
sourceController.Source.GetReferences(
451451
SystemContext,
452452
references,
453-
ReferenceTypes.HasCondition,
453+
ReferenceTypeIds.HasCondition,
454454
false);
455455
foreach (IReference reference in references)
456456
{
@@ -473,8 +473,8 @@ public ServiceResult OnStartBranch(
473473
public ServiceResult OnEnd(
474474
ISystemContext context,
475475
NodeState node,
476-
VariantCollection inputArguments,
477-
VariantCollection outputArguments)
476+
ArrayOf<Variant> inputArguments,
477+
List<Variant> outputArguments)
478478
{
479479
ServiceResult result = ServiceResult.Good;
480480

@@ -496,7 +496,7 @@ public ServiceResult OnEnd(
496496
sourceController.Source.GetReferences(
497497
SystemContext,
498498
references,
499-
ReferenceTypes.HasCondition,
499+
ReferenceTypeIds.HasCondition,
500500
false);
501501
foreach (IReference reference in references)
502502
{
@@ -549,7 +549,7 @@ public ServiceResult OnWriteAlarmTrigger(
549549
sourceController.Source.GetReferences(
550550
SystemContext,
551551
references,
552-
ReferenceTypes.HasCondition,
552+
ReferenceTypeIds.HasCondition,
553553
false);
554554
foreach (IReference reference in references)
555555
{

Applications/Quickstarts.Servers/Boiler/BoilerNodeManager.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ private void CreateBoiler(ISystemContext context, int unitNumber)
142142

143143
// Autostart boiler simulation state machine
144144
MethodState start = boiler.Simulation.Start;
145-
VariantCollection inputArguments = [];
146-
VariantCollection outputArguments = [];
145+
ArrayOf<Variant> inputArguments = [];
146+
List<Variant> outputArguments = [];
147147
var errors = new List<ServiceResult>();
148148
start.Call(context, boiler.NodeId, inputArguments, errors, outputArguments);
149149
}
@@ -214,8 +214,8 @@ protected override NodeState AddBehaviourToPredefinedNode(
214214

215215
// Autostart boiler simulation state machine
216216
MethodState start = activeNode.Simulation.Start;
217-
VariantCollection inputArguments = [];
218-
VariantCollection outputArguments = [];
217+
ArrayOf<Variant> inputArguments = [];
218+
List<Variant> outputArguments = [];
219219
var errors = new List<ServiceResult>();
220220
start.Call(context, activeNode.NodeId, inputArguments, errors, outputArguments);
221221

Applications/Quickstarts.Servers/Boiler/BoilerState.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* ======================================================================*/
2929

3030
using System;
31+
using System.Collections.Generic;
3132
using System.Threading;
3233
using Microsoft.Extensions.Logging;
3334
using Opc.Ua;
@@ -73,8 +74,8 @@ private ServiceResult OnControlSimulation(
7374
StateMachineState machine,
7475
uint transitionId,
7576
uint causeId,
76-
VariantCollection inputArguments,
77-
VariantCollection outputArguments)
77+
ArrayOf<Variant> inputArguments,
78+
List<Variant> outputArguments)
7879
{
7980
switch (causeId)
8081
{

0 commit comments

Comments
 (0)