- Timestamp:
- 09/14/2022 03:31:54 PM (4 years ago)
- Location:
- trunk/src
- Files:
-
- 2 added
- 6 edited
-
python/unifiedlogger/__pycache__ (added)
-
python/unifiedlogger/__pycache__/test_logging_service.cpython-27-PYTEST.pyc (added)
-
tmcsim/cadsimulator/CADClientConnector.java (modified) (1 diff)
-
tmcsim/cadsimulator/CADServer.java (modified) (13 diffs)
-
tmcsim/cadsimulator/viewer/ConfigStatusTab.java (modified) (1 diff)
-
tmcsim/paramicslog/ParamicsLog.java (modified) (1 diff)
-
tmcsim/paramicslog/ParamicsLogFileHandler.java (modified) (1 diff)
-
tmcsim/simulationmanager/SimulationManager.java (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tmcsim/cadsimulator/CADClientConnector.java
r660 r664 107 107 catch (ClassNotFoundException cnfe) { 108 108 cnfe.printStackTrace(); 109 } 110 catch (java.io.EOFException except) 111 { 112 cadLogger.logp(Level.INFO, "CADClientConnector", "run", "Client appears to have shutdown, removing client.\n"); 113 disconnectClient(); 109 114 } 110 115 catch (SocketException except) -
trunk/src/tmcsim/cadsimulator/CADServer.java
r654 r664 27 27 28 28 /** 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 31 32 * initialized and data relationships are established. Simulation control is 32 * managed through the Coordinator and Managers. The CADS imulator contains the33 * managed through the Coordinator and Managers. The CADServer contains the 33 34 * instances of all Manager Objects that are used to control the Simulation flow 34 35 * of data.<br> 36 * There is a GUI (and for testing, a text-based UI) that displays the state 37 * of the server. 35 38 * <br> 39 * A properties file contains settings for many parameters of the CADServer<br> 36 40 * 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) 66 43 * @version $Date: 2009/04/17 16:27:46 $ $Revision: 1.5 $ 67 44 */ … … 69 46 { 70 47 71 private static String CONFIG_FILE_NAME = "cad_s imulator_config.properties";48 private static String CONFIG_FILE_NAME = "cad_server.properties"; 72 49 /** 73 50 * Error logger. … … 76 53 77 54 /** 78 * Enumeration containing properties name values. See CADS imulator class55 * Enumeration containing properties name values. See CADServer class 79 56 * description for more information. 80 57 * … … 149 126 /** NOTE: Protected fields are accessed by Coordinator */ 150 127 /** 151 * CADS imulatorViewer instance.128 * CADServerViewer instance. 152 129 */ 153 130 protected static CADViewer theViewer; … … 189 166 190 167 /** 191 * Properties file for the CADS imulator.168 * Properties file for the CADServer, read from CONFIG_FILE_NAME. 192 169 */ 193 170 private Properties cadServerProperties; … … 211 188 cadServerProperties = new Properties(); 212 189 cadServerProperties.load(new FileInputStream(propertiesFile)); 213 cadSimLogger.logp(Level.INFO, "CADS imulator", "Constructor",190 cadSimLogger.logp(Level.INFO, "CADServer", "Constructor", 214 191 "Properties loaded from " + propertiesFile); 215 192 } catch (Exception e) 216 193 { 217 cadSimLogger.logp(Level.SEVERE, "CADS imulator", "Constructor",194 cadSimLogger.logp(Level.SEVERE, "CADServer", "Constructor", 218 195 "Exception in reading properties file.", e); 219 196 JOptionPane.showMessageDialog(new JWindow(), e.getMessage() + … … 233 210 if (userInterfaceName == null) 234 211 { 235 cadSimLogger.logp(Level.SEVERE, "CADS imulator", "Constructor",212 cadSimLogger.logp(Level.SEVERE, "CADServer", "Constructor", 236 213 propertiesFile + " missing property for user interface."); 237 214 throw new SimulationException(SimulationException.PROPERTY_MISSING_ERROR); … … 244 221 } catch (Exception exc) 245 222 { 246 cadSimLogger.logp(Level.SEVERE, "CADS imulator", "Constructor",223 cadSimLogger.logp(Level.SEVERE, "CADServer", "Constructor", 247 224 "Unable to instantiate user interface: " + userInterfaceName 248 225 + " " + exc); … … 257 234 if (simTimeFilename == null) 258 235 { 259 cadSimLogger.logp(Level.SEVERE, "CADS imulator", "Constructor",236 cadSimLogger.logp(Level.SEVERE, "CADServer", "Constructor", 260 237 propertiesFile + " missing property for " + CAD_PROPERTIES.ELAPSED_TIME_FILE.name); 261 238 throw new SimulationException(SimulationException.PROPERTY_MISSING_ERROR); … … 267 244 if (commentLogname == null) 268 245 { 269 cadSimLogger.logp(Level.SEVERE, "CADS imulator", "Constructor",246 cadSimLogger.logp(Level.SEVERE, "CADServer", "Constructor", 270 247 propertiesFile + " missing property for " + CAD_PROPERTIES.CAD_COMMENTS_LOG.name); 271 248 throw new SimulationException(SimulationException.PROPERTY_MISSING_ERROR); … … 317 294 } catch (RemoteException e) 318 295 { 319 cadSimLogger.logp(Level.SEVERE, "CADS imulator", "Constructor",296 cadSimLogger.logp(Level.SEVERE, "CADServer", "Constructor", 320 297 "Exception in starting Coordinator.", e); 321 298 … … 336 313 } catch (Exception e) 337 314 { 338 cadSimLogger.logp(Level.SEVERE, "CADS imulator", "Constructor",315 cadSimLogger.logp(Level.SEVERE, "CADServer", "Constructor", 339 316 "Exception in parsing CMSDiversion xml file.", e); 340 317 … … 472 449 } catch (Exception e) 473 450 { 474 cadSimLogger.logp(Level.SEVERE, "CADS imulator", "Main",451 cadSimLogger.logp(Level.SEVERE, "CADServer", "Main", 475 452 "Error initializing application.", e); 476 453 -
trunk/src/tmcsim/cadsimulator/viewer/ConfigStatusTab.java
r455 r664 132 132 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 133 133 frame.setSize(1050, 450); 134 ConfigStatusTab pnl = new ConfigStatusTab("config/cad_s imulator_config.properties");134 ConfigStatusTab pnl = new ConfigStatusTab("config/cad_server.properties"); 135 135 frame.add(pnl); 136 136 frame.setVisible(true); -
trunk/src/tmcsim/paramicslog/ParamicsLog.java
r47 r664 56 56 } 57 57 } 58 private static final String CONFIG_FILE_NAME = " paramics_communicator_logging.properties";58 private static final String CONFIG_FILE_NAME = "logging_paramics_communicator.properties"; 59 59 /** 60 60 * Error logger. -
trunk/src/tmcsim/paramicslog/ParamicsLogFileHandler.java
r47 r664 88 88 public static ParamicsLogFileHandler getInstance() throws IOException 89 89 { 90 System.setProperty("PARAMICS_LOG_PROPERTIES", "config/ paramics_communicator_logging.properties");90 System.setProperty("PARAMICS_LOG_PROPERTIES", "config/logging_paramics_communicator.properties"); 91 91 // Has an instance been created yet? 92 92 if (instance == null) -
trunk/src/tmcsim/simulationmanager/SimulationManager.java
r658 r664 22 22 * communicator and applying diversions. A history of all events is shown as 23 23 * well.<br> 24 * The SimulationManager may be started at any point before, during, or after a25 * simulation has begun. The SimulationManager connects to the CADSimulator and24 * The CADServer must be running before the SimulationManager is started. 25 * SimulationManager connects to the CADServer and 26 26 * communicates through Java RMI methods. If two SimulationManagers are started, 27 27 * the second one started, chronologically, will receive communication from the 28 * CADSimulator. <br><br> 29 * The properties file for the SimulationManager class contains the following 30 * data.<br> 31 * <code> 32 * -----------------------------------------------------------------------------<br> 33 * Host Name The host name where the CADSimulator is located.<br> 34 * Error File The target file to use for error logging.<br> 35 * -----------------------------------------------------------------------------<br> 36 * Example File: <br> 37 * CADSimulatorHost = localhost <br> 38 * ErrorFile = sim_mgr_error.xml <br> 39 * -----------------------------------------------------------------------------<br> 40 * </code> 28 * CADServer. (It's a bad idea to do this, there's no normal use case 29 * that requires it.)<br><br> 41 30 * 42 31 * @author Matthew Cechini (mcechini@calpoly.edu) … … 46 35 { 47 36 48 private static final String CONFIG_FILE_NAME = "sim_manager _config.properties";37 private static final String CONFIG_FILE_NAME = "sim_manager.properties"; 49 38 /* 50 39 * Default name of folder that contains Scenario xml files. … … 65 54 { 66 55 67 CAD_S IM_HOST("CADSimulatorHost"),68 CAD_S IM_PORT("CADSimulatorRMIPort"),56 CAD_SERVER_HOST("CADServerHost"), 57 CAD_SERVER_PORT("CADServerRMIPort"), 69 58 SCENARIOS_DIR("ScenariosDir"), 70 59 FAKE_PARAMICS("FakeParamicsConnection"); … … 116 105 117 106 //make sure properties aren't null 118 if (simManagerProperties.getProperty(PROPERTIES.CAD_S IM_HOST.name) == null)107 if (simManagerProperties.getProperty(PROPERTIES.CAD_SERVER_HOST.name) == null) 119 108 { 120 109 throw new Exception("CAD Simulator host property is null."); 121 110 } 122 111 123 if (simManagerProperties.getProperty(PROPERTIES.CAD_S IM_PORT.name) == null)112 if (simManagerProperties.getProperty(PROPERTIES.CAD_SERVER_PORT.name) == null) 124 113 { 125 114 throw new Exception("CAD Simulator port property is null."); … … 138 127 { 139 128 theSimManagerModel = new SimulationManagerModel( 140 simManagerProperties.getProperty(PROPERTIES.CAD_S IM_HOST.name).trim(),141 simManagerProperties.getProperty(PROPERTIES.CAD_S IM_PORT.name).trim());129 simManagerProperties.getProperty(PROPERTIES.CAD_SERVER_HOST.name).trim(), 130 simManagerProperties.getProperty(PROPERTIES.CAD_SERVER_PORT.name).trim()); 142 131 143 132 //Construct the SimulationManagerView and set up the Model-View references.
Note: See TracChangeset
for help on using the changeset viewer.
