-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscrCheckConnection.xml
More file actions
48 lines (40 loc) · 1.22 KB
/
scrCheckConnection.xml
File metadata and controls
48 lines (40 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?xml version="1.0" encoding="utf-8"?>
<aaScript name="scrCheckConnection">
<ScriptExecutionGroup>Before outputs</ScriptExecutionGroup>
<ScriptOrder>32004</ScriptOrder>
<OffScanText />
<OnScanText />
<ShutdownText />
<StartupText />
<Expression />
<TriggerType>Periodic</TriggerType>
<TriggerPeriod>00:01:00.0000000</TriggerPeriod>
<TriggerOnQualityChange>false</TriggerOnQualityChange>
<ExecuteTimeoutLimit>0</ExecuteTimeoutLimit>
<RunsAsync>false</RunsAsync>
<ExecuteText>{
'***********************************************
Author Andy Robinson (Phase 2 Automation)
Purpose Periodically check the status of the
socket connection.
User should tune the periodic time to suit your needs
Revision History
Rev Date By Comment
0 11/30/14 APR Initial Issue
************************************************
}
dim vSocket as System.Net.Sockets.TcpClient;
try
' Get the object from the app domain
vSocket = System.AppDomain.CurrentDomain.GetData(Me._SocketAppDomainName);
' Check to see if the socket is null
if vSocket == null then
Me.Status.IsConnected = false;
else
Me.Status.IsConnected = vSocket.Connected;
endif;
catch
LogError(error.ToString());
endtry;
</ExecuteText>
</aaScript>