Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/riclolsen/OSHMI
Browse files Browse the repository at this point in the history
  • Loading branch information
riclolsen committed Mar 23, 2024
2 parents 0a019f1 + e9694d1 commit b85154c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions iec61850_client/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace OSHMI_IEC61850_Client
{
class Program
{
static public string Version = "OSHMI IEC61850 Client Driver Version 0.8";
static public string Version = "OSHMI IEC61850 Client Driver Version 0.10";
static public string HmiConfigFile = "c:\\oshmi\\conf\\hmi.ini";
static public string OtherHmiIp = "";
static public string ConfigFile = "c:\\oshmi\\conf\\iec61850_client.conf";
Expand Down Expand Up @@ -918,6 +918,12 @@ static void Process(Iec61850Server srv)
else
// wait 1/10 second
Thread.Sleep(100);

// when device disconnected, will abort and keep trying to reconnect
if (con.GetState() != IedConnectionState.IED_STATE_CONNECTED)
{
throw new Exception(srv.name + " Connection error detected!");
}
}

if (brcbCountPrev != srv.brcbCount)
Expand Down Expand Up @@ -1314,7 +1320,7 @@ static void CheckCommands(Iec61850Server srv, IedConnection con)
Log(srv.name + " Error: " + control.GetLastApplError().error);
Log(srv.name + " Addit.Cause: " + control.GetLastApplError().addCause);
break;
}
}
}
Log(srv.name + " Selected successfully!");
Thread.Sleep(100);
Expand Down

0 comments on commit b85154c

Please sign in to comment.