void 
		init_distance_estimates( SimulationController& sc )
		throw()
	{
		sc.distance_estimate_keeper_w().add( new PerfectDistanceEstimate );
		sc.simulation_task_keeper_w().add( new SimulationTaskRandomizedDistanceEstimate );
		sc.simulation_task_keeper_w().add( new SimulationTaskAbsoluteErrorDistanceEstimate);
		sc.simulation_task_keeper_w().add( new SimulationTaskLQIDistanceEstimate);

	}
Beispiel #2
0
void
init_misc( SimulationController& sc )
throw()
{
    sc.simulation_task_keeper_w().add( new SimulationTaskDegreeSequence );

    sc.simulation_task_keeper_w().add( new SimulationTaskLocalizationAnchorPlacement );
    sc.simulation_task_keeper_w().add( new SimulationTaskDumpLocation );

    init_misc_random(sc);
    init_misc_os(sc);
}
Beispiel #3
0
 void init_transmission_models( SimulationController& sc ) throw()
 {
    sc.transmission_model_keeper_w().add( new ReliableTransmissionModelFactory() );
    sc.transmission_model_keeper_w().add( new TracesTransmissionModelFactory() );
    sc.transmission_model_keeper_w().add( new StatsChainTransmissionModelFactory() );
    sc.transmission_model_keeper_w().add( new RandomDropTransmissionModelFactory() );
    sc.transmission_model_keeper_w().add( new AlohaTransmissionModelFactory() );
    sc.transmission_model_keeper_w().add( new SlottedAlohaTransmissionModelFactory() );
    sc.transmission_model_keeper_w().add( new MacaTransmissionModelFactory() );
    sc.transmission_model_keeper_w().add( new CsmaTransmissionModelFactory() );
    sc.transmission_model_keeper_w().add( new ZigbeeCsmaTransmissionModelFactory() );
    
    sc.simulation_task_keeper_w().add( new SimulationTaskChainTransmModel() );
    sc.simulation_task_keeper_w().add( new StatsChainTransmissionModelDumpStats() );
 }
Beispiel #4
0
   void
   init_logging( SimulationController& sc )
      throw()
   {
      sc.simulation_task_keeper_w().add( new SimulationTaskLoggingLoadCfg );
      sc.simulation_task_keeper_w().add( new SimulationTaskLoggingReconfigure );

#if defined ( LOGGER_LOG4CXX )
      log4cxx::LoggerPtr root_logger = log4cxx::Logger::getRootLogger();
      root_logger->addAppender( new log4cxx::ConsoleAppender(
         new log4cxx::PatternLayout( "%c{1} - %m%n" ), "System.Out" ) );

      log4cxx::LoggerPtr user_logger = log4cxx::Logger::getLogger( LOG_USER_NAME );
      user_logger->addAppender( new log4cxx::ConsoleAppender(
         new log4cxx::PatternLayout( "%m%n" ), "System.Out" ) );
      user_logger->setAdditivity( false );
#elif defined ( LOGGER_LOG4CPLUS )
      log4cplus::SharedAppenderPtr root_appender( new log4cplus::ConsoleAppender() );
      log4cplus::SharedAppenderPtr user_appender( new log4cplus::ConsoleAppender() );
      root_appender->setName( "default_root_console" );
      user_appender->setName( "default_user_console" );

      std::auto_ptr<log4cplus::Layout> root_layout =
         std::auto_ptr<log4cplus::Layout>( new log4cplus::PatternLayout( "%c{1} - %m%n" ) );
      std::auto_ptr<log4cplus::Layout> user_layout =
         std::auto_ptr<log4cplus::Layout>( new log4cplus::PatternLayout( "%m%n" ) );

      root_appender->setLayout( root_layout );
      user_appender->setLayout( user_layout );

      log4cplus::Logger root_logger = log4cplus::Logger::getRoot();
      log4cplus::Logger user_logger = log4cplus::Logger::getInstance( LOG_USER_NAME );
      root_logger.addAppender( root_appender );
      user_logger.addAppender( user_appender );
      user_logger.setAdditivity( false );
#endif
   }
Beispiel #5
0
	void 
		init_xml( SimulationController& sc )
		throw()
	{
       sc.simulation_task_keeper_w().add( new shawn::SimulationTaskSaveWorld );
	}