Ignore:
Timestamp:
06/28/2016 02:25:42 PM (10 years ago)
Author:
jdalbey
Message:

Merge 305 modifications into trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tmcsim/paramicscommunicator/ParamicsCommunicator.java

    r33 r47  
    1919import java.util.logging.Level; 
    2020import java.util.logging.Logger; 
    21  
     21import javax.swing.JFrame; 
    2222import javax.swing.JOptionPane; 
    2323import javax.swing.UIManager; 
     
    140140    public ParamicsCommunicator(String propertiesFile) 
    141141    { 
     142        paramLogger.logp(Level.INFO, "ParamicsCommunicator", "Constructor", 
     143                "Entering "); 
    142144 
    143145        writers = new TreeMap<String, ParamicsFileWriter>(); 
    144146        readers = new TreeMap<String, ParamicsFileReader>(); 
    145147 
     148        theGUI = new ParamicsCommunicatorGUI(); 
     149        addObserver(theGUI); 
     150        theGUI.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
    146151        try 
    147152        { 
     
    301306                        "Dropped Connection", JOptionPane.ERROR_MESSAGE); 
    302307                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); 
    303318            } 
    304319        } 
     
    456471            } catch (SocketTimeoutException ste) 
    457472            { 
    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                } 
    459484            } catch (IOException ioe) 
    460485            { 
     
    462487                        + "the receiving socket on port " + socketPort); 
    463488            } 
     489 
    464490        } 
    465491 
Note: See TracChangeset for help on using the changeset viewer.