Skip to content

Commit

Permalink
Apply SQ
Browse files Browse the repository at this point in the history
  • Loading branch information
luiscantero committed Sep 20, 2023
1 parent 8d25826 commit e757203
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
7 changes: 4 additions & 3 deletions src/AlarmCondition/AlarmConditionNodeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace AlarmCondition
/// A node manager for a simple server that exposes several Areas, Sources and Conditions.
/// </summary>
/// <remarks>
/// This node manager presumes that the information model consists of a hierachy of predefined
/// This node manager presumes that the information model consists of a hierarchy of predefined
/// Areas with a number of Sources contained within them. Each individual Source is
/// identified by a fully qualified path. The underlying system knows how to access the source
/// configuration when it is provided the fully qualified path.
Expand Down Expand Up @@ -67,7 +67,7 @@ public AlarmConditionServerNodeManager(IServerInternal server, ApplicationConfig

#region IDisposable Members
/// <summary>
/// An overrideable version of the Dispose.
/// An overridable version of the Dispose.
/// </summary>
protected override void Dispose(bool disposing)
{
Expand Down Expand Up @@ -410,7 +410,7 @@ protected override NodeState ValidateNode(
root = area;
}

// validate soucre.
// validate source.
else if (handle.ParsedNodeId.RootType == ModelUtils.Source)
{

Expand Down Expand Up @@ -463,6 +463,7 @@ protected override NodeState ValidateNode(
// private AlarmConditionServerConfiguration m_configuration;
private readonly Dictionary<string, AreaState> m_areas;
private readonly Dictionary<string, SourceState> m_sources;
private Timer m_simulationTimer;
#endregion
}
}
4 changes: 2 additions & 2 deletions src/AlarmCondition/Model/SourceState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ private AlarmConditionState CreateAlarm(UnderlyingSystemAlarm alarm, NodeId bran
node.ReferenceTypeId = ReferenceTypeIds.HasComponent;

// This call initializes the condition from the type model (i.e. creates all of the objects
// and variables requried to store its state). The information about the type model was
// and variables required to store its state). The information about the type model was
// incorporated into the class when the class was created.
//
// This method also assigns new NodeIds to all of the components by calling the INodeIdFactory.New
Expand Down Expand Up @@ -623,7 +623,7 @@ private ServiceResult OnRespond(
m_source.SetOfflineState(false);
}

// response 1 means set the source offine.
// response 1 means set the source offline.
if (selectedResponse == 1)
{
m_source.SetOfflineState(true);
Expand Down
19 changes: 8 additions & 11 deletions src/AlarmCondition/QuickstartNodeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,9 @@ protected QuickstartNodeManager(
// set defaults.
MaxQueueSize = 1000;

if (configuration != null)
if (configuration != null && configuration.ServerConfiguration != null)
{
if (configuration.ServerConfiguration != null)
{
MaxQueueSize = (uint)configuration.ServerConfiguration.MaxNotificationQueueSize;
}
MaxQueueSize = (uint)configuration.ServerConfiguration.MaxNotificationQueueSize;
}

// save a reference to the UA server instance that owns the node manager.
Expand Down Expand Up @@ -121,7 +118,7 @@ public void Dispose()
}

/// <summary>
/// An overrideable version of the Dispose.
/// An overridable version of the Dispose.
/// </summary>
protected virtual void Dispose(bool disposing)
{
Expand Down Expand Up @@ -1397,7 +1394,7 @@ public virtual void Read(
{
errors[ii] = StatusCodes.BadNodeIdUnknown;

// must validate node in a seperate operation
// must validate node in a separate operation
handle.Index = ii;
nodesToValidate.Add(handle);

Expand Down Expand Up @@ -1633,7 +1630,7 @@ public virtual void Write(
{
errors[ii] = StatusCodes.BadNodeIdUnknown;

// must validate node in a seperate operation.
// must validate node in a separate operation.
handle.Index = ii;
nodesToValidate.Add(handle);

Expand Down Expand Up @@ -1767,7 +1764,7 @@ public virtual void HistoryRead(
{
errors[ii] = StatusCodes.BadNodeIdUnknown;

// must validate node in a seperate operation
// must validate node in a separate operation
handle.Index = ii;
nodesToProcess.Add(handle);

Expand Down Expand Up @@ -2160,7 +2157,7 @@ public virtual void HistoryUpdate(
{
errors[ii] = StatusCodes.BadNodeIdUnknown;

// must validate node in a seperate operation
// must validate node in a separate operation
handle.Index = ii;
nodesToProcess.Add(handle);
continue;
Expand Down Expand Up @@ -3027,7 +3024,7 @@ public virtual void CreateMonitoredItems(
// owned by this node manager.
itemToCreate.Processed = true;

// must validate node in a seperate operation.
// must validate node in a separate operation.
errors[ii] = StatusCodes.BadNodeIdUnknown;

handle.Index = ii;
Expand Down

0 comments on commit e757203

Please sign in to comment.