@aryacode/dsh-engineering 0.4.6 → 0.4.20
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 +199 -0
- package/README.md +37 -26
- package/cordis.patch.yml +7 -6
- package/entries/config.js +62 -0
- package/entries/ftview.js +5 -4
- package/entries/l5x.js +61 -13
- 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/l5x/README.md +27 -5
- package/vendor/l5x/studio-bridge/NuGet.Config +1 -1
- package/vendor/mwi/README.md +39 -18
- package/vendor/mwi/SKILL.md +26 -20
- package/vendor/mwi/bridge/mw_bridge.ps1 +2763 -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/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 +128 -128
- 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 +55 -0
- package/vendor/mwi/lib/session/backup.js +232 -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__/__init__.cpython-312.pyc +0 -0
- 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__/errors.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__/staging.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,118 +1,118 @@
|
|
|
1
|
-
#region Using directives
|
|
2
|
-
using UAManagedCore;
|
|
3
|
-
using FTOptix.NetLogic;
|
|
4
|
-
using FTOptix.System;
|
|
5
|
-
#endregion
|
|
6
|
-
|
|
7
|
-
public class IncomingConnectionApprovalLogic : BaseNetLogic
|
|
8
|
-
{
|
|
9
|
-
private const string LOG_CATEGORY = nameof(IncomingConnectionApprovalLogic);
|
|
10
|
-
|
|
11
|
-
public override void Start()
|
|
12
|
-
{
|
|
13
|
-
ftRemoteAccessWidgetDataObject = LogicObject.GetAlias("FTRemoteAccessWidgetDataObject") as FTRemoteAccessWidgetDataObject;
|
|
14
|
-
if (ftRemoteAccessWidgetDataObject == null)
|
|
15
|
-
{
|
|
16
|
-
Log.Error(LOG_CATEGORY, "FTRemoteAccessWidgetDataObject" + notDefinedMessage);
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
ftRemoteAccessNode = ftRemoteAccessWidgetDataObject.Context.GetNode(ftRemoteAccessWidgetDataObject.FTRemoteAccessNode) as FTRemoteAccess;
|
|
21
|
-
if (ftRemoteAccessNode == null)
|
|
22
|
-
{
|
|
23
|
-
Log.Error(LOG_CATEGORY, "FTRemoteAccessNode" + notDefinedMessage);
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
connectionPendingVariable = ftRemoteAccessNode.GetVariable(connectionPendingVariableName);
|
|
28
|
-
if (connectionPendingVariable == null)
|
|
29
|
-
{
|
|
30
|
-
Log.Error(LOG_CATEGORY, connectionPendingVariableName + notDefinedMessage);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
public override void Stop()
|
|
36
|
-
{
|
|
37
|
-
// destruct class objects
|
|
38
|
-
ftRemoteAccessNode = null;
|
|
39
|
-
ftRemoteAccessWidgetDataObject = null;
|
|
40
|
-
connectionPendingVariable = null;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
[ExportMethod]
|
|
44
|
-
public void AcceptIncomingConnection()
|
|
45
|
-
{
|
|
46
|
-
if (ftRemoteAccessWidgetDataObject == null)
|
|
47
|
-
{
|
|
48
|
-
Log.Error(LOG_CATEGORY, "FTRemoteAccessWidgetDataObject" + notDefinedMessage);
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (ftRemoteAccessNode == null)
|
|
53
|
-
{
|
|
54
|
-
Log.Error(LOG_CATEGORY, "FTRemoteAccessNode" + notDefinedMessage);
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (connectionPendingVariable == null)
|
|
59
|
-
{
|
|
60
|
-
Log.Error(LOG_CATEGORY, connectionPendingVariableName + notDefinedMessage);
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
var result = ftRemoteAccessNode.ApproveIncomingRemoteConnection(ftRemoteAccessWidgetDataObject.SupervisorId);
|
|
65
|
-
if (result == IncomingRemoteConnectionApprovalResult.Success)
|
|
66
|
-
{
|
|
67
|
-
connectionPendingVariable.Value = false;
|
|
68
|
-
}
|
|
69
|
-
else if (result == IncomingRemoteConnectionApprovalResult.NoConnectionToApprove)
|
|
70
|
-
{
|
|
71
|
-
Log.Info(LOG_CATEGORY, "Connection request has already been handled.");
|
|
72
|
-
connectionPendingVariable.Value = false;
|
|
73
|
-
}
|
|
74
|
-
else
|
|
75
|
-
Log.Error(LOG_CATEGORY, "Failed to accept connection request. FTRemoteAccess runtime is not connected.");
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
[ExportMethod]
|
|
79
|
-
public void DenyIncomingConnection()
|
|
80
|
-
{
|
|
81
|
-
if (ftRemoteAccessWidgetDataObject == null)
|
|
82
|
-
{
|
|
83
|
-
Log.Error(LOG_CATEGORY, "FTRemoteAccessWidgetDataObject" + notDefinedMessage);
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
if (ftRemoteAccessNode == null)
|
|
88
|
-
{
|
|
89
|
-
Log.Error(LOG_CATEGORY, "FTRemoteAccessNode" + notDefinedMessage);
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
if (connectionPendingVariable == null)
|
|
94
|
-
{
|
|
95
|
-
Log.Error(LOG_CATEGORY, connectionPendingVariableName + notDefinedMessage);
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
var result = ftRemoteAccessNode.DenyIncomingRemoteConnection(ftRemoteAccessWidgetDataObject.SupervisorId);
|
|
100
|
-
if (result == IncomingRemoteConnectionApprovalResult.Success)
|
|
101
|
-
{
|
|
102
|
-
connectionPendingVariable.Value = false;
|
|
103
|
-
}
|
|
104
|
-
else if (result == IncomingRemoteConnectionApprovalResult.NoConnectionToApprove)
|
|
105
|
-
{
|
|
106
|
-
Log.Info(LOG_CATEGORY, "Connection request has already been handled.");
|
|
107
|
-
connectionPendingVariable.Value = false;
|
|
108
|
-
}
|
|
109
|
-
else
|
|
110
|
-
Log.Error(LOG_CATEGORY, "Failed to deny connection request. FTRemoteAccess runtime is not connected.");
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
private FTRemoteAccessWidgetDataObject ftRemoteAccessWidgetDataObject;
|
|
114
|
-
private FTRemoteAccess ftRemoteAccessNode;
|
|
115
|
-
private IUAVariable connectionPendingVariable;
|
|
116
|
-
private const string connectionPendingVariableName = "FTRemoteAccessWidgetConnectionPending";
|
|
117
|
-
private const string notDefinedMessage = " is not defined.";
|
|
118
|
-
}
|
|
1
|
+
#region Using directives
|
|
2
|
+
using UAManagedCore;
|
|
3
|
+
using FTOptix.NetLogic;
|
|
4
|
+
using FTOptix.System;
|
|
5
|
+
#endregion
|
|
6
|
+
|
|
7
|
+
public class IncomingConnectionApprovalLogic : BaseNetLogic
|
|
8
|
+
{
|
|
9
|
+
private const string LOG_CATEGORY = nameof(IncomingConnectionApprovalLogic);
|
|
10
|
+
|
|
11
|
+
public override void Start()
|
|
12
|
+
{
|
|
13
|
+
ftRemoteAccessWidgetDataObject = LogicObject.GetAlias("FTRemoteAccessWidgetDataObject") as FTRemoteAccessWidgetDataObject;
|
|
14
|
+
if (ftRemoteAccessWidgetDataObject == null)
|
|
15
|
+
{
|
|
16
|
+
Log.Error(LOG_CATEGORY, "FTRemoteAccessWidgetDataObject" + notDefinedMessage);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
ftRemoteAccessNode = ftRemoteAccessWidgetDataObject.Context.GetNode(ftRemoteAccessWidgetDataObject.FTRemoteAccessNode) as FTRemoteAccess;
|
|
21
|
+
if (ftRemoteAccessNode == null)
|
|
22
|
+
{
|
|
23
|
+
Log.Error(LOG_CATEGORY, "FTRemoteAccessNode" + notDefinedMessage);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
connectionPendingVariable = ftRemoteAccessNode.GetVariable(connectionPendingVariableName);
|
|
28
|
+
if (connectionPendingVariable == null)
|
|
29
|
+
{
|
|
30
|
+
Log.Error(LOG_CATEGORY, connectionPendingVariableName + notDefinedMessage);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
public override void Stop()
|
|
36
|
+
{
|
|
37
|
+
// destruct class objects
|
|
38
|
+
ftRemoteAccessNode = null;
|
|
39
|
+
ftRemoteAccessWidgetDataObject = null;
|
|
40
|
+
connectionPendingVariable = null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[ExportMethod]
|
|
44
|
+
public void AcceptIncomingConnection()
|
|
45
|
+
{
|
|
46
|
+
if (ftRemoteAccessWidgetDataObject == null)
|
|
47
|
+
{
|
|
48
|
+
Log.Error(LOG_CATEGORY, "FTRemoteAccessWidgetDataObject" + notDefinedMessage);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (ftRemoteAccessNode == null)
|
|
53
|
+
{
|
|
54
|
+
Log.Error(LOG_CATEGORY, "FTRemoteAccessNode" + notDefinedMessage);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (connectionPendingVariable == null)
|
|
59
|
+
{
|
|
60
|
+
Log.Error(LOG_CATEGORY, connectionPendingVariableName + notDefinedMessage);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
var result = ftRemoteAccessNode.ApproveIncomingRemoteConnection(ftRemoteAccessWidgetDataObject.SupervisorId);
|
|
65
|
+
if (result == IncomingRemoteConnectionApprovalResult.Success)
|
|
66
|
+
{
|
|
67
|
+
connectionPendingVariable.Value = false;
|
|
68
|
+
}
|
|
69
|
+
else if (result == IncomingRemoteConnectionApprovalResult.NoConnectionToApprove)
|
|
70
|
+
{
|
|
71
|
+
Log.Info(LOG_CATEGORY, "Connection request has already been handled.");
|
|
72
|
+
connectionPendingVariable.Value = false;
|
|
73
|
+
}
|
|
74
|
+
else
|
|
75
|
+
Log.Error(LOG_CATEGORY, "Failed to accept connection request. FTRemoteAccess runtime is not connected.");
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
[ExportMethod]
|
|
79
|
+
public void DenyIncomingConnection()
|
|
80
|
+
{
|
|
81
|
+
if (ftRemoteAccessWidgetDataObject == null)
|
|
82
|
+
{
|
|
83
|
+
Log.Error(LOG_CATEGORY, "FTRemoteAccessWidgetDataObject" + notDefinedMessage);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (ftRemoteAccessNode == null)
|
|
88
|
+
{
|
|
89
|
+
Log.Error(LOG_CATEGORY, "FTRemoteAccessNode" + notDefinedMessage);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (connectionPendingVariable == null)
|
|
94
|
+
{
|
|
95
|
+
Log.Error(LOG_CATEGORY, connectionPendingVariableName + notDefinedMessage);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
var result = ftRemoteAccessNode.DenyIncomingRemoteConnection(ftRemoteAccessWidgetDataObject.SupervisorId);
|
|
100
|
+
if (result == IncomingRemoteConnectionApprovalResult.Success)
|
|
101
|
+
{
|
|
102
|
+
connectionPendingVariable.Value = false;
|
|
103
|
+
}
|
|
104
|
+
else if (result == IncomingRemoteConnectionApprovalResult.NoConnectionToApprove)
|
|
105
|
+
{
|
|
106
|
+
Log.Info(LOG_CATEGORY, "Connection request has already been handled.");
|
|
107
|
+
connectionPendingVariable.Value = false;
|
|
108
|
+
}
|
|
109
|
+
else
|
|
110
|
+
Log.Error(LOG_CATEGORY, "Failed to deny connection request. FTRemoteAccess runtime is not connected.");
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
private FTRemoteAccessWidgetDataObject ftRemoteAccessWidgetDataObject;
|
|
114
|
+
private FTRemoteAccess ftRemoteAccessNode;
|
|
115
|
+
private IUAVariable connectionPendingVariable;
|
|
116
|
+
private const string connectionPendingVariableName = "FTRemoteAccessWidgetConnectionPending";
|
|
117
|
+
private const string notDefinedMessage = " is not defined.";
|
|
118
|
+
}
|
|
@@ -1,166 +1,166 @@
|
|
|
1
|
-
#region Using directives
|
|
2
|
-
using UAManagedCore;
|
|
3
|
-
using FTOptix.System;
|
|
4
|
-
using FTOptix.NetLogic;
|
|
5
|
-
#endregion
|
|
6
|
-
|
|
7
|
-
public class IncomingConnectionReceiverLogic : BaseNetLogic
|
|
8
|
-
{
|
|
9
|
-
private const string LOG_CATEGORY = nameof(IncomingConnectionReceiverLogic);
|
|
10
|
-
|
|
11
|
-
public override void Start()
|
|
12
|
-
{
|
|
13
|
-
bool cancelStart = false;
|
|
14
|
-
|
|
15
|
-
ftRemoteAccessWidgetDataObject = Owner.Get<FTRemoteAccessWidgetDataObject>("FTRemoteAccessWidgetDataObject");
|
|
16
|
-
if (ftRemoteAccessWidgetDataObject == null)
|
|
17
|
-
{
|
|
18
|
-
Log.Error(LOG_CATEGORY, "FTRemoteAccessWidgetDataObject" + notDefinedMessage);
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
ftRemoteAccessNode = ftRemoteAccessWidgetDataObject.Context.GetNode(ftRemoteAccessWidgetDataObject.FTRemoteAccessNode) as FTRemoteAccess;
|
|
23
|
-
if (ftRemoteAccessNode == null)
|
|
24
|
-
{
|
|
25
|
-
Log.Error(LOG_CATEGORY, "FTRemoteAccessNode" + notDefinedMessage);
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
connectionPendingVariable = ftRemoteAccessNode.GetVariable(connectionPendingVariableName);
|
|
30
|
-
if (connectionPendingVariable == null)
|
|
31
|
-
{
|
|
32
|
-
Log.Error(LOG_CATEGORY, connectionPendingVariableName + notDefinedMessage);
|
|
33
|
-
cancelStart = true;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
usernameVariable = ftRemoteAccessNode.GetVariable(usernameVariableName);
|
|
37
|
-
if (usernameVariable == null)
|
|
38
|
-
{
|
|
39
|
-
Log.Error(LOG_CATEGORY, usernameVariableName + notDefinedMessage);
|
|
40
|
-
cancelStart = true;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
ipAddressVariable = ftRemoteAccessNode.GetVariable(ipAddressVariableName);
|
|
44
|
-
if (ipAddressVariable == null)
|
|
45
|
-
{
|
|
46
|
-
Log.Error(LOG_CATEGORY, ipAddressVariableName + notDefinedMessage);
|
|
47
|
-
cancelStart = true;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
supervisorIdVariable = ftRemoteAccessNode.GetVariable(supervisorIdVariableName);
|
|
51
|
-
if (supervisorIdVariable == null)
|
|
52
|
-
{
|
|
53
|
-
Log.Error(LOG_CATEGORY, supervisorIdVariableName + notDefinedMessage);
|
|
54
|
-
cancelStart = true;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (cancelStart)
|
|
58
|
-
{
|
|
59
|
-
DestroyClassFields();
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
//handle the case where an incoming connection request may already be pending at startup of the widget
|
|
64
|
-
SetFTRemoteAccessWidgetDataObjectValues(connectionPendingVariable.Value);
|
|
65
|
-
|
|
66
|
-
connectionPendingVariable.VariableChange += HandleConnectionPendingVariableChangedEvent;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
public override void Stop()
|
|
70
|
-
{
|
|
71
|
-
if (connectionPendingVariable != null)
|
|
72
|
-
connectionPendingVariable.VariableChange -= HandleConnectionPendingVariableChangedEvent;
|
|
73
|
-
|
|
74
|
-
DestroyClassFields();
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
private void DestroyClassFields()
|
|
78
|
-
{
|
|
79
|
-
ftRemoteAccessNode = null;
|
|
80
|
-
ftRemoteAccessWidgetDataObject = null;
|
|
81
|
-
connectionPendingVariable = null;
|
|
82
|
-
usernameVariable = null;
|
|
83
|
-
ipAddressVariable = null;
|
|
84
|
-
supervisorIdVariable = null;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
private void HandleConnectionPendingVariableChangedEvent(object sender, VariableChangeEventArgs args)
|
|
88
|
-
{
|
|
89
|
-
if (ftRemoteAccessWidgetDataObject == null)
|
|
90
|
-
{
|
|
91
|
-
Log.Error(LOG_CATEGORY, "FTRemoteAccessWidgetDataObject" + notDefinedMessage);
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
if (ftRemoteAccessNode == null)
|
|
96
|
-
{
|
|
97
|
-
Log.Error(LOG_CATEGORY, "FTRemoteAccessNode" + notDefinedMessage);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
SetFTRemoteAccessWidgetDataObjectValues(args.NewValue);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
private void SetFTRemoteAccessWidgetDataObjectValues(bool requestPending)
|
|
104
|
-
{
|
|
105
|
-
bool undefinedVars = false;
|
|
106
|
-
|
|
107
|
-
if (requestPending)
|
|
108
|
-
{
|
|
109
|
-
string userNameValue = usernameVariable.Value;
|
|
110
|
-
if (!string.IsNullOrEmpty(userNameValue))
|
|
111
|
-
ftRemoteAccessWidgetDataObject.Username = userNameValue;
|
|
112
|
-
else
|
|
113
|
-
{
|
|
114
|
-
Log.Error(LOG_CATEGORY, usernameVariableName + noValueMessage);
|
|
115
|
-
undefinedVars = true;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
string ipAddressValue = ipAddressVariable.Value;
|
|
119
|
-
if (!string.IsNullOrEmpty(ipAddressValue))
|
|
120
|
-
ftRemoteAccessWidgetDataObject.IpAddress = ipAddressVariable.Value;
|
|
121
|
-
else
|
|
122
|
-
{
|
|
123
|
-
Log.Error(LOG_CATEGORY, ipAddressVariableName + noValueMessage);
|
|
124
|
-
undefinedVars = true;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
ByteString supervisorIdValue = supervisorIdVariable.Value;
|
|
128
|
-
if (!supervisorIdValue.IsEmpty)
|
|
129
|
-
ftRemoteAccessWidgetDataObject.SupervisorId = supervisorIdValue;
|
|
130
|
-
else
|
|
131
|
-
{
|
|
132
|
-
Log.Error(LOG_CATEGORY, supervisorIdVariableName + noValueMessage);
|
|
133
|
-
undefinedVars = true;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
else
|
|
137
|
-
{
|
|
138
|
-
usernameVariable.Value = ftRemoteAccessWidgetDataObject.Username = string.Empty;
|
|
139
|
-
ipAddressVariable.Value = ftRemoteAccessWidgetDataObject.IpAddress = string.Empty;
|
|
140
|
-
supervisorIdVariable.Value = ftRemoteAccessWidgetDataObject.SupervisorId = ByteString.Empty;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
if (requestPending && !undefinedVars)
|
|
144
|
-
{
|
|
145
|
-
ftRemoteAccessWidgetDataObject.IncomingConnectionRequest = true;
|
|
146
|
-
}
|
|
147
|
-
else
|
|
148
|
-
{
|
|
149
|
-
connectionPendingVariable.Value = false;
|
|
150
|
-
ftRemoteAccessWidgetDataObject.IncomingConnectionRequest = false;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
private FTRemoteAccessWidgetDataObject ftRemoteAccessWidgetDataObject;
|
|
155
|
-
private FTRemoteAccess ftRemoteAccessNode;
|
|
156
|
-
private IUAVariable connectionPendingVariable;
|
|
157
|
-
private IUAVariable usernameVariable;
|
|
158
|
-
private IUAVariable ipAddressVariable;
|
|
159
|
-
private IUAVariable supervisorIdVariable;
|
|
160
|
-
private const string usernameVariableName = "FTRemoteAccessWidgetUsername";
|
|
161
|
-
private const string ipAddressVariableName = "FTRemoteAccessWidgetIPAddress";
|
|
162
|
-
private const string supervisorIdVariableName = "FTRemoteAccessWidgetSupervisorId";
|
|
163
|
-
private const string connectionPendingVariableName = "FTRemoteAccessWidgetConnectionPending";
|
|
164
|
-
private const string noValueMessage = " has no value.";
|
|
165
|
-
private const string notDefinedMessage = " is not defined.";
|
|
166
|
-
}
|
|
1
|
+
#region Using directives
|
|
2
|
+
using UAManagedCore;
|
|
3
|
+
using FTOptix.System;
|
|
4
|
+
using FTOptix.NetLogic;
|
|
5
|
+
#endregion
|
|
6
|
+
|
|
7
|
+
public class IncomingConnectionReceiverLogic : BaseNetLogic
|
|
8
|
+
{
|
|
9
|
+
private const string LOG_CATEGORY = nameof(IncomingConnectionReceiverLogic);
|
|
10
|
+
|
|
11
|
+
public override void Start()
|
|
12
|
+
{
|
|
13
|
+
bool cancelStart = false;
|
|
14
|
+
|
|
15
|
+
ftRemoteAccessWidgetDataObject = Owner.Get<FTRemoteAccessWidgetDataObject>("FTRemoteAccessWidgetDataObject");
|
|
16
|
+
if (ftRemoteAccessWidgetDataObject == null)
|
|
17
|
+
{
|
|
18
|
+
Log.Error(LOG_CATEGORY, "FTRemoteAccessWidgetDataObject" + notDefinedMessage);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
ftRemoteAccessNode = ftRemoteAccessWidgetDataObject.Context.GetNode(ftRemoteAccessWidgetDataObject.FTRemoteAccessNode) as FTRemoteAccess;
|
|
23
|
+
if (ftRemoteAccessNode == null)
|
|
24
|
+
{
|
|
25
|
+
Log.Error(LOG_CATEGORY, "FTRemoteAccessNode" + notDefinedMessage);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
connectionPendingVariable = ftRemoteAccessNode.GetVariable(connectionPendingVariableName);
|
|
30
|
+
if (connectionPendingVariable == null)
|
|
31
|
+
{
|
|
32
|
+
Log.Error(LOG_CATEGORY, connectionPendingVariableName + notDefinedMessage);
|
|
33
|
+
cancelStart = true;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
usernameVariable = ftRemoteAccessNode.GetVariable(usernameVariableName);
|
|
37
|
+
if (usernameVariable == null)
|
|
38
|
+
{
|
|
39
|
+
Log.Error(LOG_CATEGORY, usernameVariableName + notDefinedMessage);
|
|
40
|
+
cancelStart = true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
ipAddressVariable = ftRemoteAccessNode.GetVariable(ipAddressVariableName);
|
|
44
|
+
if (ipAddressVariable == null)
|
|
45
|
+
{
|
|
46
|
+
Log.Error(LOG_CATEGORY, ipAddressVariableName + notDefinedMessage);
|
|
47
|
+
cancelStart = true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
supervisorIdVariable = ftRemoteAccessNode.GetVariable(supervisorIdVariableName);
|
|
51
|
+
if (supervisorIdVariable == null)
|
|
52
|
+
{
|
|
53
|
+
Log.Error(LOG_CATEGORY, supervisorIdVariableName + notDefinedMessage);
|
|
54
|
+
cancelStart = true;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (cancelStart)
|
|
58
|
+
{
|
|
59
|
+
DestroyClassFields();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
//handle the case where an incoming connection request may already be pending at startup of the widget
|
|
64
|
+
SetFTRemoteAccessWidgetDataObjectValues(connectionPendingVariable.Value);
|
|
65
|
+
|
|
66
|
+
connectionPendingVariable.VariableChange += HandleConnectionPendingVariableChangedEvent;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
public override void Stop()
|
|
70
|
+
{
|
|
71
|
+
if (connectionPendingVariable != null)
|
|
72
|
+
connectionPendingVariable.VariableChange -= HandleConnectionPendingVariableChangedEvent;
|
|
73
|
+
|
|
74
|
+
DestroyClassFields();
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
private void DestroyClassFields()
|
|
78
|
+
{
|
|
79
|
+
ftRemoteAccessNode = null;
|
|
80
|
+
ftRemoteAccessWidgetDataObject = null;
|
|
81
|
+
connectionPendingVariable = null;
|
|
82
|
+
usernameVariable = null;
|
|
83
|
+
ipAddressVariable = null;
|
|
84
|
+
supervisorIdVariable = null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
private void HandleConnectionPendingVariableChangedEvent(object sender, VariableChangeEventArgs args)
|
|
88
|
+
{
|
|
89
|
+
if (ftRemoteAccessWidgetDataObject == null)
|
|
90
|
+
{
|
|
91
|
+
Log.Error(LOG_CATEGORY, "FTRemoteAccessWidgetDataObject" + notDefinedMessage);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (ftRemoteAccessNode == null)
|
|
96
|
+
{
|
|
97
|
+
Log.Error(LOG_CATEGORY, "FTRemoteAccessNode" + notDefinedMessage);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
SetFTRemoteAccessWidgetDataObjectValues(args.NewValue);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
private void SetFTRemoteAccessWidgetDataObjectValues(bool requestPending)
|
|
104
|
+
{
|
|
105
|
+
bool undefinedVars = false;
|
|
106
|
+
|
|
107
|
+
if (requestPending)
|
|
108
|
+
{
|
|
109
|
+
string userNameValue = usernameVariable.Value;
|
|
110
|
+
if (!string.IsNullOrEmpty(userNameValue))
|
|
111
|
+
ftRemoteAccessWidgetDataObject.Username = userNameValue;
|
|
112
|
+
else
|
|
113
|
+
{
|
|
114
|
+
Log.Error(LOG_CATEGORY, usernameVariableName + noValueMessage);
|
|
115
|
+
undefinedVars = true;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
string ipAddressValue = ipAddressVariable.Value;
|
|
119
|
+
if (!string.IsNullOrEmpty(ipAddressValue))
|
|
120
|
+
ftRemoteAccessWidgetDataObject.IpAddress = ipAddressVariable.Value;
|
|
121
|
+
else
|
|
122
|
+
{
|
|
123
|
+
Log.Error(LOG_CATEGORY, ipAddressVariableName + noValueMessage);
|
|
124
|
+
undefinedVars = true;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
ByteString supervisorIdValue = supervisorIdVariable.Value;
|
|
128
|
+
if (!supervisorIdValue.IsEmpty)
|
|
129
|
+
ftRemoteAccessWidgetDataObject.SupervisorId = supervisorIdValue;
|
|
130
|
+
else
|
|
131
|
+
{
|
|
132
|
+
Log.Error(LOG_CATEGORY, supervisorIdVariableName + noValueMessage);
|
|
133
|
+
undefinedVars = true;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
else
|
|
137
|
+
{
|
|
138
|
+
usernameVariable.Value = ftRemoteAccessWidgetDataObject.Username = string.Empty;
|
|
139
|
+
ipAddressVariable.Value = ftRemoteAccessWidgetDataObject.IpAddress = string.Empty;
|
|
140
|
+
supervisorIdVariable.Value = ftRemoteAccessWidgetDataObject.SupervisorId = ByteString.Empty;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (requestPending && !undefinedVars)
|
|
144
|
+
{
|
|
145
|
+
ftRemoteAccessWidgetDataObject.IncomingConnectionRequest = true;
|
|
146
|
+
}
|
|
147
|
+
else
|
|
148
|
+
{
|
|
149
|
+
connectionPendingVariable.Value = false;
|
|
150
|
+
ftRemoteAccessWidgetDataObject.IncomingConnectionRequest = false;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
private FTRemoteAccessWidgetDataObject ftRemoteAccessWidgetDataObject;
|
|
155
|
+
private FTRemoteAccess ftRemoteAccessNode;
|
|
156
|
+
private IUAVariable connectionPendingVariable;
|
|
157
|
+
private IUAVariable usernameVariable;
|
|
158
|
+
private IUAVariable ipAddressVariable;
|
|
159
|
+
private IUAVariable supervisorIdVariable;
|
|
160
|
+
private const string usernameVariableName = "FTRemoteAccessWidgetUsername";
|
|
161
|
+
private const string ipAddressVariableName = "FTRemoteAccessWidgetIPAddress";
|
|
162
|
+
private const string supervisorIdVariableName = "FTRemoteAccessWidgetSupervisorId";
|
|
163
|
+
private const string connectionPendingVariableName = "FTRemoteAccessWidgetConnectionPending";
|
|
164
|
+
private const string noValueMessage = " has no value.";
|
|
165
|
+
private const string notDefinedMessage = " is not defined.";
|
|
166
|
+
}
|