-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from wetcon/bugfix/multiple-dtms
Fix for projecting same Com DTM multiple times
- Loading branch information
Showing
17 changed files
with
314 additions
and
108 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
src/Wetcon.PactwarePlugin.OpcUaServer.Plugin/OpcUa/Models/Device/DeviceModelContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* Copyright (c) 2019 wetcon gmbh. All rights reserved. | ||
Wetcon provides this source code under a dual license model | ||
designed to meet the development and distribution needs of both | ||
commercial distributors (such as OEMs, ISVs and VARs) and open | ||
source projects. | ||
For open source projects the source code in this file is covered | ||
under GPL V2. | ||
See https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html | ||
OEMs (Original Equipment Manufacturers), ISVs (Independent Software | ||
Vendors), VARs (Value Added Resellers) and other distributors that | ||
combine and distribute commercially licensed software with this | ||
source code and do not wish to distribute the source code for the | ||
commercially licensed software under version 2 of the GNU General | ||
Public License (the "GPL") must enter into a commercial license | ||
agreement with wetcon. | ||
This source code is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
*/ | ||
|
||
using System.Collections.Generic; | ||
using Opc.Ua; | ||
using PWID.Interfaces; | ||
using Wetcon.PactwarePlugin.OpcUaServer.Fdt; | ||
|
||
namespace Wetcon.PactwarePlugin.OpcUaServer.OpcUa.Models | ||
{ | ||
/// <summary> | ||
/// Represents the Offline Device model | ||
/// </summary> | ||
public struct DeviceModelContext | ||
{ | ||
public DeviceModelContext(ushort serverNamespaceIndex, IPACTwareProjectNode projectNode, | ||
IFdtServiceProvider fdtServiceProvider, NodeState parent, List<NodeId> existingNodeIds = null) | ||
{ | ||
ServerNamespaceIndex = serverNamespaceIndex; | ||
PactwareProjectNode = projectNode; | ||
FdtServiceProvider = fdtServiceProvider; | ||
Parent = parent; | ||
ExistingNodeIds = existingNodeIds ?? new List<NodeId>(); | ||
} | ||
|
||
public ushort ServerNamespaceIndex { get; private set; } | ||
public IPACTwareProjectNode PactwareProjectNode { get; private set; } | ||
public IFdtServiceProvider FdtServiceProvider { get; private set; } | ||
public NodeState Parent { get; private set; } | ||
public List<NodeId> ExistingNodeIds { get; private set; } | ||
|
||
public DeviceModelContext WithNewParent(NodeState parent) | ||
{ | ||
return new DeviceModelContext | ||
{ | ||
ServerNamespaceIndex = ServerNamespaceIndex, | ||
PactwareProjectNode = PactwareProjectNode, | ||
FdtServiceProvider = FdtServiceProvider, | ||
Parent = parent, | ||
ExistingNodeIds = ExistingNodeIds | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.