Exemple #1
0
 public override bool StartAsyncAcceptingClients()
 {
     keep_modbus_server_alive = true;
     try {
         ClientManagmentThread.Start();
     } catch (Exception e) {
         if ((e is ThreadStateException) || (e is OutOfMemoryException))
         {
             return(false);
         }
         else
         {
             throw e;
         }                  // Unexpected exception
     }
     return(true);
 }
Exemple #2
0
 public override bool StartAsyncAcceptingClients()
 {
     MCU.StartAsyncAcceptingClients();
     keep_modbus_server_alive = true;
     try {
         ClientManagmentThread.Start();
     } catch (Exception e) {
         if ((e is ThreadStateException) || (e is OutOfMemoryException))
         {
             logger.Error(Utilities.GetTimeStamp() + ": failed to start prodi=uction plc and mcu threads err:____    {0}", e);
             return(false);
         }
         else
         {
             throw e;
         }                  // Unexpected exception
     }
     return(true);
 }