@aryacode/dsh-engineering 0.4.7 → 0.4.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +202 -0
- package/README.md +40 -26
- package/cordis.patch.yml +7 -6
- package/entries/config.js +62 -0
- package/entries/ftview.js +5 -4
- package/entries/l5x.js +47 -15
- package/entries/mwi.js +26 -6
- package/entries/optix.js +105 -0
- package/lib/client.js +335 -6
- package/package.json +11 -10
- package/vendor/ftview/SKILL.md +17 -0
- package/vendor/l5x/SKILL.md +17 -0
- package/vendor/l5x/studio-bridge/NuGet.Config +1 -1
- package/vendor/mwi/README.md +41 -18
- package/vendor/mwi/SKILL.md +39 -20
- package/vendor/mwi/bridge/mw_bridge.ps1 +2768 -2763
- package/vendor/mwi/bridge/sdk-interop-importer.cs +30 -30
- package/vendor/mwi/bridge/sdk-variable-reader.cs +22 -22
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/__init__.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/errors.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/staging.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/build.py +339 -339
- package/vendor/mwi/code/engine/motionworks_iec_mcp/cfb.py +765 -765
- package/vendor/mwi/code/engine/motionworks_iec_mcp/declarations.py +399 -399
- package/vendor/mwi/code/engine/motionworks_iec_mcp/ide.py +313 -313
- package/vendor/mwi/code/engine/motionworks_iec_mcp/manuals.py +520 -520
- package/vendor/mwi/code/engine/motionworks_iec_mcp/mwt_bind.py +133 -133
- package/vendor/mwi/code/engine/motionworks_iec_mcp/reference_data/catalog.json +672 -672
- package/vendor/mwi/code/engine/motionworks_iec_mcp/reference_data/patterns.json +86 -86
- package/vendor/mwi/code/engine/motionworks_iec_mcp/restore.py +208 -208
- package/vendor/mwi/code/engine/motionworks_iec_mcp/staging.py +134 -130
- package/vendor/mwi/code/engine/motionworks_iec_mcp/stlint.py +673 -673
- package/vendor/mwi/code/engine/motionworks_iec_mcp/tree_writer.py +790 -790
- package/vendor/mwi/code/engine/motionworks_iec_mcp/writer.py +642 -642
- package/vendor/mwi/lib/core/code-engine.d.ts +13 -0
- package/vendor/mwi/lib/core/code-engine.js +18 -1
- package/vendor/mwi/lib/edit.d.ts +1 -1
- package/vendor/mwi/lib/edit.js +1 -1
- package/vendor/mwi/lib/read/service.js +8 -1
- package/vendor/mwi/lib/session/backup.d.ts +72 -0
- package/vendor/mwi/lib/session/backup.js +257 -0
- package/vendor/mwi/lib/session/project.d.ts +4 -1
- package/vendor/mwi/lib/session/project.js +13 -2
- package/vendor/mwi/lib/session/service.d.ts +13 -6
- package/vendor/mwi/lib/session/service.js +127 -36
- package/vendor/mwi/lib/session/workspace.d.ts +10 -0
- package/vendor/mwi/lib/session/workspace.js +53 -3
- package/vendor/mwi/lib/skill.d.ts +2 -2
- package/vendor/mwi/lib/skill.js +2 -2
- package/vendor/mwi/lib/tools/edit.d.ts +3 -3
- package/vendor/mwi/lib/tools/edit.js +14 -15
- package/vendor/mwi/lib/tools/read.js +1 -1
- package/vendor/mwi/lib/tools/session.js +13 -9
- package/vendor/optix/templates/arya-optix-ipc/project/AryaNewHMIProject_IPC.optix +81 -81
- package/vendor/optix/templates/arya-optix-ipc/project/AryaNewHMIProject_IPC.optix.design +38 -38
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/Alarms/Alarms.yaml +3 -3
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/AryaNewHMIProject_IPC.yaml +67 -67
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/CommDrivers/CommDrivers.yaml +2 -2
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/Converters/Converters.yaml +2 -2
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/DataStores/DataStores.yaml +2 -2
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/Loggers/Loggers.yaml +2 -2
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/MQTT/MQTT.yaml +2 -2
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/Model/Model.yaml +2 -2
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/NetLogic/NetLogic.yaml +26 -26
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/OPC-UA/OPC-UA.yaml +2 -2
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/Recipes/Recipes.yaml +2 -2
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/Reports/Reports.yaml +2 -2
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/Retentivity/Retentivity.yaml +57 -57
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/Security/Groups/Groups.yaml +3 -3
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/Security/Roles/Roles.yaml +3 -3
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/Security/Security.yaml +7 -7
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/Security/Users/Users.yaml +3 -3
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/System/System.yaml +2 -2
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/Translations/Translations.yaml +16 -16
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/UI/Keyboards/Keyboards.yaml +2 -2
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/UI/Screens/Screens.yaml +2 -2
- package/vendor/optix/templates/arya-optix-ipc/project/Nodes/UI/UI.yaml +250 -250
- package/vendor/optix/templates/arya-optix-ipc/project/ProjectFiles/NetSolution/.vscode/launch.json +18 -18
- package/vendor/optix/templates/arya-optix-ipc/project/ProjectFiles/NetSolution/AryaNewHMIProject_IPC.code-workspace +9 -9
- package/vendor/optix/templates/arya-optix-ipc/project/ProjectFiles/NetSolution/AryaNewHMIProject_IPC.csproj +19 -19
- package/vendor/optix/templates/arya-optix-ipc/project/ProjectFiles/NetSolution/AryaNewHMIProject_IPC.references +172 -172
- package/vendor/optix/templates/arya-optix-ipc/project/ProjectFiles/NetSolution/AryaNewHMIProject_IPC.sln +21 -21
- package/vendor/optix/templates/arya-optix-ipc/project/ProjectFiles/NetSolution/Private/TypeConstants.cs +20 -20
- package/vendor/optix/templates/arya-optix-ipc/project/ProjectFiles/NetSolution/Private/UITypeDefinitions.cs +11 -11
- package/vendor/optix/templates/arya-optix-ipc/project/ProjectFiles/NetSolution/StudioMCPBridge.cs +4340 -4340
- package/vendor/optix/templates/arya-optix-ipc/project/ProjectFiles/UserDefinedModule.xml +26 -26
- package/vendor/optix/templates/arya-optix-panel/project/AryaNewHMIProject_OptixPanel.optix +97 -97
- package/vendor/optix/templates/arya-optix-panel/project/AryaNewHMIProject_OptixPanel.optix.design +38 -38
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/Alarms/Alarms.yaml +3 -3
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/AryaNewHMIProject_OptixPanel.yaml +67 -67
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/CommDrivers/CommDrivers.yaml +2 -2
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/Converters/Converters.yaml +2 -2
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/DataStores/DataStores.yaml +2 -2
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/Loggers/Loggers.yaml +2 -2
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/MQTT/MQTT.yaml +2 -2
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/Model/Model.yaml +2 -2
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/NetLogic/NetLogic.yaml +26 -26
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/OPC-UA/OPC-UA.yaml +2 -2
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/Recipes/Recipes.yaml +2 -2
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/Reports/Reports.yaml +2 -2
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/Retentivity/Retentivity.yaml +57 -57
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/Security/Groups/Groups.yaml +3 -3
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/Security/Roles/Roles.yaml +3 -3
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/Security/Security.yaml +7 -7
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/Security/Users/Users.yaml +3 -3
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/System/System.yaml +444 -444
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/Translations/Translations.yaml +81 -81
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/UI/Keyboards/Keyboards.yaml +2 -2
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/UI/Screens/Screens.yaml +2 -2
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/UI/SettingsWidgets/DeviceSettingsWidget/DeviceSettingsWidget.yaml +163 -163
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/UI/SettingsWidgets/DeviceSettingsWidget/DeviceSettingsWidgetComponents/DeviceSettingsWidgetComponents.yaml +1663 -1663
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/UI/SettingsWidgets/FactoryTalkRemoteAccessWidget/FTRemoteAccessWidgetComponents/FTRemoteAccessWidgetComponents.yaml +2471 -2471
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/UI/SettingsWidgets/FactoryTalkRemoteAccessWidget/FactoryTalkRemoteAccessWidget.yaml +218 -218
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/UI/SettingsWidgets/NetworkSettingsWidget/NetworkSettingsWidget.yaml +524 -524
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/UI/SettingsWidgets/NetworkSettingsWidget/NetworkSettingsWidgetComponents/NetworkSettingsWidgetComponents.yaml +690 -690
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/UI/SettingsWidgets/SettingsWidgets.yaml +1265 -1265
- package/vendor/optix/templates/arya-optix-panel/project/Nodes/UI/UI.yaml +252 -252
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/.vscode/launch.json +18 -18
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/ApplicationNameLogic.cs +19 -19
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/AryaNewHMIProject_OptixPanel.code-workspace +9 -9
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/AryaNewHMIProject_OptixPanel.csproj +19 -19
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/AryaNewHMIProject_OptixPanel.references +172 -172
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/AryaNewHMIProject_OptixPanel.sln +21 -21
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/ConnectionSwitchLogic.cs +74 -74
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/DateAndTimeWidgetLogic.cs +420 -420
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/DeviceSettingsWidgetLogic.cs +34 -34
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/FTOptixStudioVersionLogic.cs +47 -47
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/FTRemoteAccessWidgetSetupLogic.cs +153 -153
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/IncomingConnectionApprovalLogic.cs +118 -118
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/IncomingConnectionReceiverLogic.cs +166 -166
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/NetworkConfiguratorEditModelsLogic.cs +56 -56
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/NetworkInterfaceLogic.cs +138 -138
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/NetworkInterfacesEditModelReaderLogic.cs +87 -87
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/NetworkInterfacesEditModelToSystemWriterLogic.cs +139 -139
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/NetworkSettingsLogic.cs +168 -168
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/Private/FTRemoteAccessWidgetDataObject.cs +106 -106
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/Private/TypeConstants.cs +37 -37
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/Private/UITypeDefinitions.cs +91 -91
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/RequestAssistanceSwitchLogic.cs +93 -93
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/StudioMCPBridge.cs +4340 -4340
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/NetSolution/SystemToNetworkInterfacesEditModelWriterLogic.cs +77 -77
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/UserDefinedModule.xml +111 -111
- package/vendor/optix/templates/arya-optix-panel/project/ProjectFiles/WarningIcon.svg +4 -4
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/block_interfaces.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/cfb.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/datatypes.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/declarations.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/graphical_listing.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/grid.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/knowledge.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/mwt_bind.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/navigation.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/program_checks.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/project.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/structure.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/task_bindings.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/tasks.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/tree.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/validation.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/variable_edit.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/variables.cpython-312.pyc +0 -0
- package/vendor/mwi/code/engine/motionworks_iec_mcp/__pycache__/workflow.cpython-312.pyc +0 -0
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
#region Using directives
|
|
2
|
-
using UAManagedCore;
|
|
3
|
-
using FTOptix.HMIProject;
|
|
4
|
-
using FTOptix.NetLogic;
|
|
5
|
-
using System.Linq;
|
|
6
|
-
using FTOptix.UI;
|
|
7
|
-
using FTOptix.SerialPort;
|
|
8
|
-
#endregion
|
|
9
|
-
|
|
10
|
-
public class NetworkConfiguratorEditModelsLogic : BaseNetLogic
|
|
11
|
-
{
|
|
12
|
-
public static void CreateEditModels(FTOptix.System.System systemNode, IUAObject parentNode)
|
|
13
|
-
{
|
|
14
|
-
NetworkInterfacesEditModel.CreateEditModel(systemNode, parentNode);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
public static IUAObject GetNetworkInterfacesEditModel(IUAObject parentNode)
|
|
18
|
-
{
|
|
19
|
-
var networkInterfacesEditModel = parentNode.GetObject(editModelNetworkInterfacesBrowseName);
|
|
20
|
-
if (networkInterfacesEditModel == null)
|
|
21
|
-
throw new CoreConfigurationException("Edit model for network interfaces not found");
|
|
22
|
-
|
|
23
|
-
return networkInterfacesEditModel;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
public static void DeleteEditModels(IUAObject parentNode)
|
|
27
|
-
{
|
|
28
|
-
NetworkInterfacesEditModel.DeleteEditModel(parentNode);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
private static class NetworkInterfacesEditModel
|
|
32
|
-
{
|
|
33
|
-
public static IUAObject CreateEditModel(FTOptix.System.System systemNode, IUAObject parentNode)
|
|
34
|
-
{
|
|
35
|
-
var editModelNetworkInterfaces = parentNode.FindObject(editModelNetworkInterfacesBrowseName);
|
|
36
|
-
if (editModelNetworkInterfaces == null)
|
|
37
|
-
{
|
|
38
|
-
editModelNetworkInterfaces = InformationModel.MakeObject(editModelNetworkInterfacesBrowseName);
|
|
39
|
-
var systemToNetworkInterfacesEditModelWriter = new SystemToNetworkInterfacesEditModelWriterLogic(editModelNetworkInterfaces);
|
|
40
|
-
systemToNetworkInterfacesEditModelWriter.InitializeEditModel(systemNode.NetworkInterfaces.ToList());
|
|
41
|
-
parentNode.Add(editModelNetworkInterfaces);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return editModelNetworkInterfaces;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
public static void DeleteEditModel(IUAObject parentNode)
|
|
48
|
-
{
|
|
49
|
-
var editModelNetworkInterfaces = parentNode.FindObject(editModelNetworkInterfacesBrowseName);
|
|
50
|
-
if (editModelNetworkInterfaces != null)
|
|
51
|
-
parentNode.Remove(editModelNetworkInterfaces);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
private static readonly string editModelNetworkInterfacesBrowseName = "NetworkInterfacesEditModel";
|
|
56
|
-
}
|
|
1
|
+
#region Using directives
|
|
2
|
+
using UAManagedCore;
|
|
3
|
+
using FTOptix.HMIProject;
|
|
4
|
+
using FTOptix.NetLogic;
|
|
5
|
+
using System.Linq;
|
|
6
|
+
using FTOptix.UI;
|
|
7
|
+
using FTOptix.SerialPort;
|
|
8
|
+
#endregion
|
|
9
|
+
|
|
10
|
+
public class NetworkConfiguratorEditModelsLogic : BaseNetLogic
|
|
11
|
+
{
|
|
12
|
+
public static void CreateEditModels(FTOptix.System.System systemNode, IUAObject parentNode)
|
|
13
|
+
{
|
|
14
|
+
NetworkInterfacesEditModel.CreateEditModel(systemNode, parentNode);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public static IUAObject GetNetworkInterfacesEditModel(IUAObject parentNode)
|
|
18
|
+
{
|
|
19
|
+
var networkInterfacesEditModel = parentNode.GetObject(editModelNetworkInterfacesBrowseName);
|
|
20
|
+
if (networkInterfacesEditModel == null)
|
|
21
|
+
throw new CoreConfigurationException("Edit model for network interfaces not found");
|
|
22
|
+
|
|
23
|
+
return networkInterfacesEditModel;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public static void DeleteEditModels(IUAObject parentNode)
|
|
27
|
+
{
|
|
28
|
+
NetworkInterfacesEditModel.DeleteEditModel(parentNode);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
private static class NetworkInterfacesEditModel
|
|
32
|
+
{
|
|
33
|
+
public static IUAObject CreateEditModel(FTOptix.System.System systemNode, IUAObject parentNode)
|
|
34
|
+
{
|
|
35
|
+
var editModelNetworkInterfaces = parentNode.FindObject(editModelNetworkInterfacesBrowseName);
|
|
36
|
+
if (editModelNetworkInterfaces == null)
|
|
37
|
+
{
|
|
38
|
+
editModelNetworkInterfaces = InformationModel.MakeObject(editModelNetworkInterfacesBrowseName);
|
|
39
|
+
var systemToNetworkInterfacesEditModelWriter = new SystemToNetworkInterfacesEditModelWriterLogic(editModelNetworkInterfaces);
|
|
40
|
+
systemToNetworkInterfacesEditModelWriter.InitializeEditModel(systemNode.NetworkInterfaces.ToList());
|
|
41
|
+
parentNode.Add(editModelNetworkInterfaces);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return editModelNetworkInterfaces;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public static void DeleteEditModel(IUAObject parentNode)
|
|
48
|
+
{
|
|
49
|
+
var editModelNetworkInterfaces = parentNode.FindObject(editModelNetworkInterfacesBrowseName);
|
|
50
|
+
if (editModelNetworkInterfaces != null)
|
|
51
|
+
parentNode.Remove(editModelNetworkInterfaces);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
private static readonly string editModelNetworkInterfacesBrowseName = "NetworkInterfacesEditModel";
|
|
56
|
+
}
|
|
@@ -1,138 +1,138 @@
|
|
|
1
|
-
#region Using directives
|
|
2
|
-
using FTOptix.CoreBase;
|
|
3
|
-
using FTOptix.UI;
|
|
4
|
-
using UAManagedCore;
|
|
5
|
-
using FTOptix.NetLogic;
|
|
6
|
-
using FTOptix.SerialPort;
|
|
7
|
-
#endregion
|
|
8
|
-
|
|
9
|
-
public class NetworkInterfaceLogic : BaseNetLogic
|
|
10
|
-
{
|
|
11
|
-
public override void Stop()
|
|
12
|
-
{
|
|
13
|
-
if (doesThisNetworkInterfaceExist && dhcpCheckbox != null)
|
|
14
|
-
dhcpCheckbox.CheckedVariable.VariableChange -= DhcpChecked_VariableChange;
|
|
15
|
-
|
|
16
|
-
editModelNetworkInterfacesReader = null;
|
|
17
|
-
dhcpCheckbox = null;
|
|
18
|
-
ipAddressTextBox = null;
|
|
19
|
-
maskTextBox= null;
|
|
20
|
-
defaultGatewayTextBox= null;
|
|
21
|
-
dns1TextBox= null;
|
|
22
|
-
dns2TextBox= null;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
public void SetMembers(FTOptix.System.System systemNode, string interfaceName, IUAObject networkConfiguratorEditModelsObject, IUANode panelObject)
|
|
26
|
-
{
|
|
27
|
-
this.interfaceName = interfaceName;
|
|
28
|
-
|
|
29
|
-
dhcpCheckbox = panelObject.Find<CheckBox>("DHCPClientEnabledCheckbox");
|
|
30
|
-
if (dhcpCheckbox == null)
|
|
31
|
-
throw new CoreConfigurationException("LAN DHCPClientEnabledCheckbox not found");
|
|
32
|
-
|
|
33
|
-
ipAddressTextBox = panelObject.Find<TextBox>("IPAddressTextBox");
|
|
34
|
-
if (ipAddressTextBox == null)
|
|
35
|
-
throw new CoreConfigurationException("LAN IPAddressTextBox not found");
|
|
36
|
-
|
|
37
|
-
maskTextBox = panelObject.Find<TextBox>("MaskTextBox");
|
|
38
|
-
if (maskTextBox == null)
|
|
39
|
-
throw new CoreConfigurationException("LAN MaskTextBox not found");
|
|
40
|
-
|
|
41
|
-
defaultGatewayTextBox = panelObject.Find<TextBox>("DefaultGatewayTextBox");
|
|
42
|
-
if (defaultGatewayTextBox == null)
|
|
43
|
-
throw new CoreConfigurationException("LAN DefaultGatewayTextBox not found");
|
|
44
|
-
|
|
45
|
-
dns1TextBox = panelObject.Find<TextBox>("DNS1TextBox");
|
|
46
|
-
if (dns1TextBox == null)
|
|
47
|
-
throw new CoreConfigurationException("LAN DNS1TextBox not found");
|
|
48
|
-
|
|
49
|
-
dns2TextBox = panelObject.Find<TextBox>("DNS2TextBox");
|
|
50
|
-
if (dns2TextBox == null)
|
|
51
|
-
throw new CoreConfigurationException("LAN DNS2TextBox not found");
|
|
52
|
-
|
|
53
|
-
NetworkConfiguratorEditModelsLogic.CreateEditModels(systemNode, networkConfiguratorEditModelsObject);
|
|
54
|
-
var editModelNetworkInterfaces = NetworkConfiguratorEditModelsLogic.GetNetworkInterfacesEditModel(networkConfiguratorEditModelsObject);
|
|
55
|
-
|
|
56
|
-
editModelNetworkInterfacesReader = new NetworkInterfacesEditModelReaderLogic(editModelNetworkInterfaces);
|
|
57
|
-
|
|
58
|
-
var networkInterfaceObject = editModelNetworkInterfaces.GetObject(interfaceName);
|
|
59
|
-
if (networkInterfaceObject == null)
|
|
60
|
-
{
|
|
61
|
-
if (panelObject is Panel panel)
|
|
62
|
-
panel.Enabled = false;
|
|
63
|
-
|
|
64
|
-
doesThisNetworkInterfaceExist = false;
|
|
65
|
-
}
|
|
66
|
-
else
|
|
67
|
-
{
|
|
68
|
-
SetDynamicLinksToEditModel(this.interfaceName);
|
|
69
|
-
SetControlsEnabled();
|
|
70
|
-
dhcpCheckbox.CheckedVariable.VariableChange += DhcpChecked_VariableChange;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
private void DhcpChecked_VariableChange(object sender, VariableChangeEventArgs e)
|
|
75
|
-
{
|
|
76
|
-
SetControlsEnabled();
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
private void SetDynamicLinksToEditModel(string interfaceName)
|
|
80
|
-
{
|
|
81
|
-
var checkedVariable = dhcpCheckbox.CheckedVariable;
|
|
82
|
-
checkedVariable.ResetDynamicLink();
|
|
83
|
-
checkedVariable.SetDynamicLink(editModelNetworkInterfacesReader.GetDhcpVariable(interfaceName), DynamicLinkMode.ReadWrite);
|
|
84
|
-
|
|
85
|
-
var ipAddressTextBoxTextVariable = ipAddressTextBox.TextVariable;
|
|
86
|
-
ipAddressTextBoxTextVariable.ResetDynamicLink();
|
|
87
|
-
ipAddressTextBoxTextVariable.SetDynamicLink(editModelNetworkInterfacesReader.GetIPAddressVariable(interfaceName), DynamicLinkMode.ReadWrite);
|
|
88
|
-
|
|
89
|
-
var maskTextBoxTextVariable = maskTextBox.TextVariable;
|
|
90
|
-
maskTextBoxTextVariable.ResetDynamicLink();
|
|
91
|
-
maskTextBoxTextVariable.SetDynamicLink(editModelNetworkInterfacesReader.GetMaskVariable(interfaceName), DynamicLinkMode.ReadWrite);
|
|
92
|
-
|
|
93
|
-
var dns1TextBoxTextVariable = dns1TextBox.TextVariable;
|
|
94
|
-
dns1TextBoxTextVariable.ResetDynamicLink();
|
|
95
|
-
dns1TextBoxTextVariable.SetDynamicLink(editModelNetworkInterfacesReader.GetDNS1Variable(interfaceName), DynamicLinkMode.ReadWrite);
|
|
96
|
-
|
|
97
|
-
var dns2TextBoxTextVariable = dns2TextBox.TextVariable;
|
|
98
|
-
dns2TextBoxTextVariable.ResetDynamicLink();
|
|
99
|
-
dns2TextBoxTextVariable.SetDynamicLink(editModelNetworkInterfacesReader.GetDNS2Variable(interfaceName), DynamicLinkMode.ReadWrite);
|
|
100
|
-
|
|
101
|
-
var defaultGatewayTextBoxTextVariable = defaultGatewayTextBox.TextVariable;
|
|
102
|
-
defaultGatewayTextBoxTextVariable.ResetDynamicLink();
|
|
103
|
-
defaultGatewayTextBoxTextVariable.SetDynamicLink(editModelNetworkInterfacesReader.GetDefaultGatewayVariable(interfaceName), DynamicLinkMode.ReadWrite);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
private void SetControlsEnabled()
|
|
107
|
-
{
|
|
108
|
-
if (dhcpCheckbox.Checked)
|
|
109
|
-
{
|
|
110
|
-
ipAddressTextBox.Enabled = false;
|
|
111
|
-
maskTextBox.Enabled = false;
|
|
112
|
-
defaultGatewayTextBox.Enabled = false;
|
|
113
|
-
dns1TextBox.Enabled = false;
|
|
114
|
-
dns2TextBox.Enabled = false;
|
|
115
|
-
}
|
|
116
|
-
else
|
|
117
|
-
{
|
|
118
|
-
ipAddressTextBox.Enabled = true;
|
|
119
|
-
maskTextBox.Enabled = true;
|
|
120
|
-
defaultGatewayTextBox.Enabled = true;
|
|
121
|
-
dns1TextBox.Enabled = true;
|
|
122
|
-
dns2TextBox.Enabled = true;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
private string interfaceName;
|
|
127
|
-
|
|
128
|
-
private NetworkInterfacesEditModelReaderLogic editModelNetworkInterfacesReader;
|
|
129
|
-
|
|
130
|
-
private CheckBox dhcpCheckbox;
|
|
131
|
-
private TextBox ipAddressTextBox;
|
|
132
|
-
private TextBox maskTextBox;
|
|
133
|
-
private TextBox defaultGatewayTextBox;
|
|
134
|
-
private TextBox dns1TextBox;
|
|
135
|
-
private TextBox dns2TextBox;
|
|
136
|
-
|
|
137
|
-
private bool doesThisNetworkInterfaceExist = true;
|
|
138
|
-
}
|
|
1
|
+
#region Using directives
|
|
2
|
+
using FTOptix.CoreBase;
|
|
3
|
+
using FTOptix.UI;
|
|
4
|
+
using UAManagedCore;
|
|
5
|
+
using FTOptix.NetLogic;
|
|
6
|
+
using FTOptix.SerialPort;
|
|
7
|
+
#endregion
|
|
8
|
+
|
|
9
|
+
public class NetworkInterfaceLogic : BaseNetLogic
|
|
10
|
+
{
|
|
11
|
+
public override void Stop()
|
|
12
|
+
{
|
|
13
|
+
if (doesThisNetworkInterfaceExist && dhcpCheckbox != null)
|
|
14
|
+
dhcpCheckbox.CheckedVariable.VariableChange -= DhcpChecked_VariableChange;
|
|
15
|
+
|
|
16
|
+
editModelNetworkInterfacesReader = null;
|
|
17
|
+
dhcpCheckbox = null;
|
|
18
|
+
ipAddressTextBox = null;
|
|
19
|
+
maskTextBox= null;
|
|
20
|
+
defaultGatewayTextBox= null;
|
|
21
|
+
dns1TextBox= null;
|
|
22
|
+
dns2TextBox= null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
public void SetMembers(FTOptix.System.System systemNode, string interfaceName, IUAObject networkConfiguratorEditModelsObject, IUANode panelObject)
|
|
26
|
+
{
|
|
27
|
+
this.interfaceName = interfaceName;
|
|
28
|
+
|
|
29
|
+
dhcpCheckbox = panelObject.Find<CheckBox>("DHCPClientEnabledCheckbox");
|
|
30
|
+
if (dhcpCheckbox == null)
|
|
31
|
+
throw new CoreConfigurationException("LAN DHCPClientEnabledCheckbox not found");
|
|
32
|
+
|
|
33
|
+
ipAddressTextBox = panelObject.Find<TextBox>("IPAddressTextBox");
|
|
34
|
+
if (ipAddressTextBox == null)
|
|
35
|
+
throw new CoreConfigurationException("LAN IPAddressTextBox not found");
|
|
36
|
+
|
|
37
|
+
maskTextBox = panelObject.Find<TextBox>("MaskTextBox");
|
|
38
|
+
if (maskTextBox == null)
|
|
39
|
+
throw new CoreConfigurationException("LAN MaskTextBox not found");
|
|
40
|
+
|
|
41
|
+
defaultGatewayTextBox = panelObject.Find<TextBox>("DefaultGatewayTextBox");
|
|
42
|
+
if (defaultGatewayTextBox == null)
|
|
43
|
+
throw new CoreConfigurationException("LAN DefaultGatewayTextBox not found");
|
|
44
|
+
|
|
45
|
+
dns1TextBox = panelObject.Find<TextBox>("DNS1TextBox");
|
|
46
|
+
if (dns1TextBox == null)
|
|
47
|
+
throw new CoreConfigurationException("LAN DNS1TextBox not found");
|
|
48
|
+
|
|
49
|
+
dns2TextBox = panelObject.Find<TextBox>("DNS2TextBox");
|
|
50
|
+
if (dns2TextBox == null)
|
|
51
|
+
throw new CoreConfigurationException("LAN DNS2TextBox not found");
|
|
52
|
+
|
|
53
|
+
NetworkConfiguratorEditModelsLogic.CreateEditModels(systemNode, networkConfiguratorEditModelsObject);
|
|
54
|
+
var editModelNetworkInterfaces = NetworkConfiguratorEditModelsLogic.GetNetworkInterfacesEditModel(networkConfiguratorEditModelsObject);
|
|
55
|
+
|
|
56
|
+
editModelNetworkInterfacesReader = new NetworkInterfacesEditModelReaderLogic(editModelNetworkInterfaces);
|
|
57
|
+
|
|
58
|
+
var networkInterfaceObject = editModelNetworkInterfaces.GetObject(interfaceName);
|
|
59
|
+
if (networkInterfaceObject == null)
|
|
60
|
+
{
|
|
61
|
+
if (panelObject is Panel panel)
|
|
62
|
+
panel.Enabled = false;
|
|
63
|
+
|
|
64
|
+
doesThisNetworkInterfaceExist = false;
|
|
65
|
+
}
|
|
66
|
+
else
|
|
67
|
+
{
|
|
68
|
+
SetDynamicLinksToEditModel(this.interfaceName);
|
|
69
|
+
SetControlsEnabled();
|
|
70
|
+
dhcpCheckbox.CheckedVariable.VariableChange += DhcpChecked_VariableChange;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
private void DhcpChecked_VariableChange(object sender, VariableChangeEventArgs e)
|
|
75
|
+
{
|
|
76
|
+
SetControlsEnabled();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
private void SetDynamicLinksToEditModel(string interfaceName)
|
|
80
|
+
{
|
|
81
|
+
var checkedVariable = dhcpCheckbox.CheckedVariable;
|
|
82
|
+
checkedVariable.ResetDynamicLink();
|
|
83
|
+
checkedVariable.SetDynamicLink(editModelNetworkInterfacesReader.GetDhcpVariable(interfaceName), DynamicLinkMode.ReadWrite);
|
|
84
|
+
|
|
85
|
+
var ipAddressTextBoxTextVariable = ipAddressTextBox.TextVariable;
|
|
86
|
+
ipAddressTextBoxTextVariable.ResetDynamicLink();
|
|
87
|
+
ipAddressTextBoxTextVariable.SetDynamicLink(editModelNetworkInterfacesReader.GetIPAddressVariable(interfaceName), DynamicLinkMode.ReadWrite);
|
|
88
|
+
|
|
89
|
+
var maskTextBoxTextVariable = maskTextBox.TextVariable;
|
|
90
|
+
maskTextBoxTextVariable.ResetDynamicLink();
|
|
91
|
+
maskTextBoxTextVariable.SetDynamicLink(editModelNetworkInterfacesReader.GetMaskVariable(interfaceName), DynamicLinkMode.ReadWrite);
|
|
92
|
+
|
|
93
|
+
var dns1TextBoxTextVariable = dns1TextBox.TextVariable;
|
|
94
|
+
dns1TextBoxTextVariable.ResetDynamicLink();
|
|
95
|
+
dns1TextBoxTextVariable.SetDynamicLink(editModelNetworkInterfacesReader.GetDNS1Variable(interfaceName), DynamicLinkMode.ReadWrite);
|
|
96
|
+
|
|
97
|
+
var dns2TextBoxTextVariable = dns2TextBox.TextVariable;
|
|
98
|
+
dns2TextBoxTextVariable.ResetDynamicLink();
|
|
99
|
+
dns2TextBoxTextVariable.SetDynamicLink(editModelNetworkInterfacesReader.GetDNS2Variable(interfaceName), DynamicLinkMode.ReadWrite);
|
|
100
|
+
|
|
101
|
+
var defaultGatewayTextBoxTextVariable = defaultGatewayTextBox.TextVariable;
|
|
102
|
+
defaultGatewayTextBoxTextVariable.ResetDynamicLink();
|
|
103
|
+
defaultGatewayTextBoxTextVariable.SetDynamicLink(editModelNetworkInterfacesReader.GetDefaultGatewayVariable(interfaceName), DynamicLinkMode.ReadWrite);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
private void SetControlsEnabled()
|
|
107
|
+
{
|
|
108
|
+
if (dhcpCheckbox.Checked)
|
|
109
|
+
{
|
|
110
|
+
ipAddressTextBox.Enabled = false;
|
|
111
|
+
maskTextBox.Enabled = false;
|
|
112
|
+
defaultGatewayTextBox.Enabled = false;
|
|
113
|
+
dns1TextBox.Enabled = false;
|
|
114
|
+
dns2TextBox.Enabled = false;
|
|
115
|
+
}
|
|
116
|
+
else
|
|
117
|
+
{
|
|
118
|
+
ipAddressTextBox.Enabled = true;
|
|
119
|
+
maskTextBox.Enabled = true;
|
|
120
|
+
defaultGatewayTextBox.Enabled = true;
|
|
121
|
+
dns1TextBox.Enabled = true;
|
|
122
|
+
dns2TextBox.Enabled = true;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
private string interfaceName;
|
|
127
|
+
|
|
128
|
+
private NetworkInterfacesEditModelReaderLogic editModelNetworkInterfacesReader;
|
|
129
|
+
|
|
130
|
+
private CheckBox dhcpCheckbox;
|
|
131
|
+
private TextBox ipAddressTextBox;
|
|
132
|
+
private TextBox maskTextBox;
|
|
133
|
+
private TextBox defaultGatewayTextBox;
|
|
134
|
+
private TextBox dns1TextBox;
|
|
135
|
+
private TextBox dns2TextBox;
|
|
136
|
+
|
|
137
|
+
private bool doesThisNetworkInterfaceExist = true;
|
|
138
|
+
}
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
#region Using directives
|
|
2
|
-
using UAManagedCore;
|
|
3
|
-
using FTOptix.NetLogic;
|
|
4
|
-
using FTOptix.UI;
|
|
5
|
-
using FTOptix.SerialPort;
|
|
6
|
-
#endregion
|
|
7
|
-
|
|
8
|
-
public class NetworkInterfacesEditModelReaderLogic : BaseNetLogic
|
|
9
|
-
{
|
|
10
|
-
public NetworkInterfacesEditModelReaderLogic(IUAObject editModelNetworkInterfacesObject)
|
|
11
|
-
{
|
|
12
|
-
this.editModelNetworkInterfacesObject = editModelNetworkInterfacesObject;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
public NetworkInterfacesEditModelReaderLogic() {}
|
|
16
|
-
|
|
17
|
-
public IUAVariable GetDhcpVariable(string interfaceName)
|
|
18
|
-
{
|
|
19
|
-
var networkInterfaceObject = editModelNetworkInterfacesObject.GetObject(interfaceName);
|
|
20
|
-
var variable = networkInterfaceObject.GetVariable("DHCPClientEnabled");
|
|
21
|
-
if (variable == null)
|
|
22
|
-
throw new CoreConfigurationException("DHCPClientEnabled variable not found");
|
|
23
|
-
|
|
24
|
-
return variable;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
public IUAVariable GetIPAddressVariable(string interfaceName)
|
|
28
|
-
{
|
|
29
|
-
var networkInterfaceObject = editModelNetworkInterfacesObject.GetObject(interfaceName);
|
|
30
|
-
var variable = networkInterfaceObject.GetVariable("IPAddress");
|
|
31
|
-
if (variable == null)
|
|
32
|
-
throw new CoreConfigurationException("IPAddress variable not found");
|
|
33
|
-
|
|
34
|
-
return variable;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
public IUAVariable GetMaskVariable(string interfaceName)
|
|
38
|
-
{
|
|
39
|
-
var variable = GetIPAddressVariable(interfaceName).GetVariable("Mask");
|
|
40
|
-
if (variable == null)
|
|
41
|
-
throw new CoreConfigurationException("Mask variable not found");
|
|
42
|
-
|
|
43
|
-
return variable;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
public IUAVariable GetDNS1Variable(string interfaceName)
|
|
47
|
-
{
|
|
48
|
-
var networkInterfaceObject = editModelNetworkInterfacesObject.GetObject(interfaceName);
|
|
49
|
-
var variable = networkInterfaceObject.GetVariable("DNS1");
|
|
50
|
-
if (variable == null)
|
|
51
|
-
throw new CoreConfigurationException("DNS1 variable not found");
|
|
52
|
-
|
|
53
|
-
return variable;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
public IUAVariable GetDNS2Variable(string interfaceName)
|
|
57
|
-
{
|
|
58
|
-
var networkInterfaceObject = editModelNetworkInterfacesObject.GetObject(interfaceName);
|
|
59
|
-
var variable = networkInterfaceObject.GetVariable("DNS2");
|
|
60
|
-
if (variable == null)
|
|
61
|
-
throw new CoreConfigurationException("DNS2 variable not found");
|
|
62
|
-
|
|
63
|
-
return variable;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
public IUAVariable GetDefaultGatewayVariable(string interfaceName)
|
|
67
|
-
{
|
|
68
|
-
var networkInterfaceObject = editModelNetworkInterfacesObject.GetObject(interfaceName);
|
|
69
|
-
var variable = networkInterfaceObject.GetVariable("DefaultGateway");
|
|
70
|
-
if (variable == null)
|
|
71
|
-
throw new CoreConfigurationException("DefaultGateway variable not found");
|
|
72
|
-
|
|
73
|
-
return variable;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
public IUAObject GetAdditionalIPAddressesObject(string interfaceName)
|
|
77
|
-
{
|
|
78
|
-
var networkInterfaceObject = editModelNetworkInterfacesObject.GetObject(interfaceName);
|
|
79
|
-
var additonalIPAddressesObject = networkInterfaceObject.GetObject("AdditionalIPAddresses");
|
|
80
|
-
if (additonalIPAddressesObject == null)
|
|
81
|
-
throw new CoreConfigurationException("AdditionalIPAddresses object not found");
|
|
82
|
-
|
|
83
|
-
return additonalIPAddressesObject;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
readonly private IUAObject editModelNetworkInterfacesObject;
|
|
87
|
-
}
|
|
1
|
+
#region Using directives
|
|
2
|
+
using UAManagedCore;
|
|
3
|
+
using FTOptix.NetLogic;
|
|
4
|
+
using FTOptix.UI;
|
|
5
|
+
using FTOptix.SerialPort;
|
|
6
|
+
#endregion
|
|
7
|
+
|
|
8
|
+
public class NetworkInterfacesEditModelReaderLogic : BaseNetLogic
|
|
9
|
+
{
|
|
10
|
+
public NetworkInterfacesEditModelReaderLogic(IUAObject editModelNetworkInterfacesObject)
|
|
11
|
+
{
|
|
12
|
+
this.editModelNetworkInterfacesObject = editModelNetworkInterfacesObject;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
public NetworkInterfacesEditModelReaderLogic() {}
|
|
16
|
+
|
|
17
|
+
public IUAVariable GetDhcpVariable(string interfaceName)
|
|
18
|
+
{
|
|
19
|
+
var networkInterfaceObject = editModelNetworkInterfacesObject.GetObject(interfaceName);
|
|
20
|
+
var variable = networkInterfaceObject.GetVariable("DHCPClientEnabled");
|
|
21
|
+
if (variable == null)
|
|
22
|
+
throw new CoreConfigurationException("DHCPClientEnabled variable not found");
|
|
23
|
+
|
|
24
|
+
return variable;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public IUAVariable GetIPAddressVariable(string interfaceName)
|
|
28
|
+
{
|
|
29
|
+
var networkInterfaceObject = editModelNetworkInterfacesObject.GetObject(interfaceName);
|
|
30
|
+
var variable = networkInterfaceObject.GetVariable("IPAddress");
|
|
31
|
+
if (variable == null)
|
|
32
|
+
throw new CoreConfigurationException("IPAddress variable not found");
|
|
33
|
+
|
|
34
|
+
return variable;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public IUAVariable GetMaskVariable(string interfaceName)
|
|
38
|
+
{
|
|
39
|
+
var variable = GetIPAddressVariable(interfaceName).GetVariable("Mask");
|
|
40
|
+
if (variable == null)
|
|
41
|
+
throw new CoreConfigurationException("Mask variable not found");
|
|
42
|
+
|
|
43
|
+
return variable;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public IUAVariable GetDNS1Variable(string interfaceName)
|
|
47
|
+
{
|
|
48
|
+
var networkInterfaceObject = editModelNetworkInterfacesObject.GetObject(interfaceName);
|
|
49
|
+
var variable = networkInterfaceObject.GetVariable("DNS1");
|
|
50
|
+
if (variable == null)
|
|
51
|
+
throw new CoreConfigurationException("DNS1 variable not found");
|
|
52
|
+
|
|
53
|
+
return variable;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public IUAVariable GetDNS2Variable(string interfaceName)
|
|
57
|
+
{
|
|
58
|
+
var networkInterfaceObject = editModelNetworkInterfacesObject.GetObject(interfaceName);
|
|
59
|
+
var variable = networkInterfaceObject.GetVariable("DNS2");
|
|
60
|
+
if (variable == null)
|
|
61
|
+
throw new CoreConfigurationException("DNS2 variable not found");
|
|
62
|
+
|
|
63
|
+
return variable;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
public IUAVariable GetDefaultGatewayVariable(string interfaceName)
|
|
67
|
+
{
|
|
68
|
+
var networkInterfaceObject = editModelNetworkInterfacesObject.GetObject(interfaceName);
|
|
69
|
+
var variable = networkInterfaceObject.GetVariable("DefaultGateway");
|
|
70
|
+
if (variable == null)
|
|
71
|
+
throw new CoreConfigurationException("DefaultGateway variable not found");
|
|
72
|
+
|
|
73
|
+
return variable;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
public IUAObject GetAdditionalIPAddressesObject(string interfaceName)
|
|
77
|
+
{
|
|
78
|
+
var networkInterfaceObject = editModelNetworkInterfacesObject.GetObject(interfaceName);
|
|
79
|
+
var additonalIPAddressesObject = networkInterfaceObject.GetObject("AdditionalIPAddresses");
|
|
80
|
+
if (additonalIPAddressesObject == null)
|
|
81
|
+
throw new CoreConfigurationException("AdditionalIPAddresses object not found");
|
|
82
|
+
|
|
83
|
+
return additonalIPAddressesObject;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
readonly private IUAObject editModelNetworkInterfacesObject;
|
|
87
|
+
}
|