Changeset 664 in tmcsimulator for trunk/src/tmcsim/cadsimulator/CADServer.java


Ignore:
Timestamp:
09/14/2022 03:31:54 PM (4 years ago)
Author:
jdalbey
Message:

Multifile commit - revise source to match revisions to config filenames. Fix broken system tests. Fix defect #160.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tmcsim/cadsimulator/CADServer.java

    r654 r664  
    2727 
    2828/** 
    29  * CADSimulator is main class for the CAD Simulator application. At construction 
    30  * the Coordinator, CoordinatorViewer, and all CAD Simulator Managers are 
     29 * CADServer is main class for the CAD Simulator application.  
     30 * CADServer must be running before starting any other components of the TMCSim. 
     31 * At construction the Coordinator, CoordinatorViewer, and all CAD Simulator Managers are 
    3132 * initialized and data relationships are established. Simulation control is 
    32  * managed through the Coordinator and Managers. The CADSimulator contains the 
     33 * managed through the Coordinator and Managers. The CADServer contains the 
    3334 * instances of all Manager Objects that are used to control the Simulation flow 
    3435 * of data.<br> 
     36 * There is a GUI (and for testing, a text-based UI) that displays the state 
     37 * of the server. 
    3538 * <br> 
     39 * A properties file contains settings for many parameters of the CADServer<br> 
    3640 * 
    37  * The CADSimulator is initialized with a properties file containing the 
    38  * following data items:<br> 
    39  * <code> 
    40  * -----------------------------------------------------------------------------<br> 
    41  * CADClientPort The port number to use for remote CAD Client connections.<br> 
    42  * CoordinatorRMIPort The port number to use for binding the Coordinator.<br> 
    43  * CMSDiversionXML The filepath for the xml file containing initialization data 
    44  * for the Diversion "database." AudioFileLocation The root directory path where 
    45  * audio files are referenced from.<br> 
    46  * ParamicsProperties The filepath for the properties file to initialize the 
    47  * ParamicsControlManager.<br> 
    48  * ATMSProperties The filepath for the properties file to initialize the 
    49  * ATMSManager.<br> 
    50  * MediaProperties The filepath for the properties file to initialize the 
    51  * MediaManager.<br> 
    52  * ErrorFile The filename of the error file used for logging errors.<br> 
    53  * ----------------------------------------------------------------------------<br> 
    54  * Example File:<br> 
    55  * CADClientPort = 4444<br> 
    56  * CoordinatorRMIPort = 4445<br> 
    57  * CMSDiversionXML = ../data/cmsdiversions.xml<br> 
    58  * AudioFileLocation = ../audio/<br> 
    59  * ParamicsProperties = ../config/paramics.properties<br> 
    60  * ATMSProperties = ../config/atms.properties<br> 
    61  * MediaProperties = ../config/media.properties<br> 
    62  * ErrorFile = cad_sim_error.xml<br> 
    63  * </code> 
    64  * 
    65  * @author Matthew Cechini (mcechini@calpoly.edu) jdalbey 
     41 * @author Matthew Cechini (mcechini@calpoly.edu) 
     42 * @author John Dalbey (jdalbey@calpoly.edu) 
    6643 * @version $Date: 2009/04/17 16:27:46 $ $Revision: 1.5 $ 
    6744 */ 
     
    6946{ 
    7047 
    71     private static String CONFIG_FILE_NAME = "cad_simulator_config.properties"; 
     48    private static String CONFIG_FILE_NAME = "cad_server.properties"; 
    7249    /** 
    7350     * Error logger. 
     
    7653 
    7754    /** 
    78      * Enumeration containing properties name values. See CADSimulator class 
     55     * Enumeration containing properties name values. See CADServer class 
    7956     * description for more information. 
    8057     * 
     
    149126    /** NOTE: Protected fields are accessed by Coordinator */ 
    150127    /** 
    151      * CADSimulatorViewer instance. 
     128     * CADServerViewer instance. 
    152129     */ 
    153130    protected static CADViewer theViewer; 
     
    189166     
    190167    /** 
    191      * Properties file for the CADSimulator. 
     168     * Properties file for the CADServer, read from CONFIG_FILE_NAME. 
    192169     */ 
    193170    private Properties cadServerProperties; 
     
    211188            cadServerProperties = new Properties(); 
    212189            cadServerProperties.load(new FileInputStream(propertiesFile)); 
    213             cadSimLogger.logp(Level.INFO, "CADSimulator", "Constructor", 
     190            cadSimLogger.logp(Level.INFO, "CADServer", "Constructor", 
    214191                    "Properties loaded from " + propertiesFile); 
    215192        } catch (Exception e) 
    216193        { 
    217             cadSimLogger.logp(Level.SEVERE, "CADSimulator", "Constructor", 
     194            cadSimLogger.logp(Level.SEVERE, "CADServer", "Constructor", 
    218195                    "Exception in reading properties file.", e); 
    219196            JOptionPane.showMessageDialog(new JWindow(), e.getMessage() + 
     
    233210            if (userInterfaceName == null) 
    234211            { 
    235                 cadSimLogger.logp(Level.SEVERE, "CADSimulator", "Constructor", 
     212                cadSimLogger.logp(Level.SEVERE, "CADServer", "Constructor", 
    236213                        propertiesFile + " missing property for user interface."); 
    237214                throw new SimulationException(SimulationException.PROPERTY_MISSING_ERROR); 
     
    244221            } catch (Exception exc) 
    245222            { 
    246                 cadSimLogger.logp(Level.SEVERE, "CADSimulator", "Constructor", 
     223                cadSimLogger.logp(Level.SEVERE, "CADServer", "Constructor", 
    247224                        "Unable to instantiate user interface: " + userInterfaceName 
    248225                        + " " + exc); 
     
    257234            if (simTimeFilename == null) 
    258235            { 
    259                 cadSimLogger.logp(Level.SEVERE, "CADSimulator", "Constructor", 
     236                cadSimLogger.logp(Level.SEVERE, "CADServer", "Constructor", 
    260237                        propertiesFile + " missing property for " + CAD_PROPERTIES.ELAPSED_TIME_FILE.name); 
    261238                throw new SimulationException(SimulationException.PROPERTY_MISSING_ERROR); 
     
    267244            if (commentLogname == null) 
    268245            { 
    269                 cadSimLogger.logp(Level.SEVERE, "CADSimulator", "Constructor", 
     246                cadSimLogger.logp(Level.SEVERE, "CADServer", "Constructor", 
    270247                        propertiesFile + " missing property for " + CAD_PROPERTIES.CAD_COMMENTS_LOG.name); 
    271248                throw new SimulationException(SimulationException.PROPERTY_MISSING_ERROR); 
     
    317294        } catch (RemoteException e) 
    318295        { 
    319             cadSimLogger.logp(Level.SEVERE, "CADSimulator", "Constructor", 
     296            cadSimLogger.logp(Level.SEVERE, "CADServer", "Constructor", 
    320297                    "Exception in starting Coordinator.", e); 
    321298 
     
    336313        } catch (Exception e) 
    337314        { 
    338             cadSimLogger.logp(Level.SEVERE, "CADSimulator", "Constructor", 
     315            cadSimLogger.logp(Level.SEVERE, "CADServer", "Constructor", 
    339316                    "Exception in parsing CMSDiversion xml file.", e); 
    340317 
     
    472449        } catch (Exception e) 
    473450        { 
    474             cadSimLogger.logp(Level.SEVERE, "CADSimulator", "Main", 
     451            cadSimLogger.logp(Level.SEVERE, "CADServer", "Main", 
    475452                    "Error initializing application.", e); 
    476453 
Note: See TracChangeset for help on using the changeset viewer.