Changeset 47 in tmcsimulator for trunk/src/tmcsim/paramicscommunicator/ParamicsCommunicator.java
- Timestamp:
- 06/28/2016 02:25:42 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tmcsim/paramicscommunicator/ParamicsCommunicator.java
r33 r47 19 19 import java.util.logging.Level; 20 20 import java.util.logging.Logger; 21 21 import javax.swing.JFrame; 22 22 import javax.swing.JOptionPane; 23 23 import javax.swing.UIManager; … … 140 140 public ParamicsCommunicator(String propertiesFile) 141 141 { 142 paramLogger.logp(Level.INFO, "ParamicsCommunicator", "Constructor", 143 "Entering "); 142 144 143 145 writers = new TreeMap<String, ParamicsFileWriter>(); 144 146 readers = new TreeMap<String, ParamicsFileReader>(); 145 147 148 theGUI = new ParamicsCommunicatorGUI(); 149 addObserver(theGUI); 150 theGUI.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 146 151 try 147 152 { … … 301 306 "Dropped Connection", JOptionPane.ERROR_MESSAGE); 302 307 break; 308 } 309 try 310 { 311 Thread.sleep(2000); 312 paramLogger.logp(Level.INFO, "ParamicsCommunicator", 313 "run", "sleeping."); 314 } catch (InterruptedException ex) 315 { 316 paramLogger.logp(Level.INFO, "ParamicsCommunicator", 317 "run", "Exception in reading data from the socket.", ex); 303 318 } 304 319 } … … 456 471 } catch (SocketTimeoutException ste) 457 472 { 458 System.out.println("...waiting for socket connection from the CAD Simulator..."); 473 System.out.println("...waiting..."); 474 try 475 { 476 Thread.sleep(2000); 477 paramLogger.logp(Level.INFO, "ParamicsCommunicator", 478 "initializeSockets", "sleeping."); 479 } catch (InterruptedException ex) 480 { 481 paramLogger.logp(Level.INFO, "ParamicsCommunicator", 482 "initializeSockets", "Exception exiting for socket.", ex); 483 } 459 484 } catch (IOException ioe) 460 485 { … … 462 487 + "the receiving socket on port " + socketPort); 463 488 } 489 464 490 } 465 491
Note: See TracChangeset
for help on using the changeset viewer.
