File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ namespace OSHMI_IEC61850_Client
3636{
3737 class Program
3838 {
39- static public string Version = "OSHMI IEC61850 Client Driver Version 0.8 " ;
39+ static public string Version = "OSHMI IEC61850 Client Driver Version 0.10 " ;
4040 static public string HmiConfigFile = "c:\\ oshmi\\ conf\\ hmi.ini" ;
4141 static public string OtherHmiIp = "" ;
4242 static public string ConfigFile = "c:\\ oshmi\\ conf\\ iec61850_client.conf" ;
@@ -918,6 +918,12 @@ static void Process(Iec61850Server srv)
918918 else
919919 // wait 1/10 second
920920 Thread . Sleep ( 100 ) ;
921+
922+ // when device disconnected, will abort and keep trying to reconnect
923+ if ( con . GetState ( ) != IedConnectionState . IED_STATE_CONNECTED )
924+ {
925+ throw new Exception ( srv . name + " Connection error detected!" ) ;
926+ }
921927 }
922928
923929 if ( brcbCountPrev != srv . brcbCount )
@@ -1314,7 +1320,7 @@ static void CheckCommands(Iec61850Server srv, IedConnection con)
13141320 Log ( srv . name + " Error: " + control . GetLastApplError ( ) . error ) ;
13151321 Log ( srv . name + " Addit.Cause: " + control . GetLastApplError ( ) . addCause ) ;
13161322 break ;
1317- }
1323+ }
13181324 }
13191325 Log ( srv . name + " Selected successfully!" ) ;
13201326 Thread . Sleep ( 100 ) ;
You can’t perform that action at this time.
0 commit comments