Exemple #1
0
extern "C" void init_distest( shawn::SimulationController& sc )
{
	sc.distance_estimate_keeper_w().add( new shawn::NeighborhoodIntersectionDistanceEstimate );
	sc.simulation_task_keeper_w().add( new distest::DistanceEstimateTask );
	sc.simulation_task_keeper_w().add( new distest::MultihopDistanceEstimateTask );
	sc.simulation_task_keeper_w().add( new distest::TestTask );
}
  void init_topology_elevation( shawn::SimulationController& sc )
  {
     std::cout << "init_topology_elevation" << std::endl;

     sc.simulation_task_keeper_w().add( new ConstantElevationTask );
     sc.simulation_task_keeper_w().add( new XYZFileElevationTask );
  }
Exemple #3
0
extern "C" void init_routing( shawn::SimulationController& sc )
{
	// Create two keepers in the simulation controller 
    // one for the factories ... 
	sc.add_keeper( new routing::RoutingFactoryKeeper );
	// ... and one for the created routing protocol instances
	sc.add_keeper( new routing::RoutingKeeper );
	sc.simulation_task_keeper_w().add( new routing::RoutingTask );

	routing::RoutingFactoryKeeper& rfk = routing::routing_factory_keeper_w(sc);

	// Initialize the routing algorithms
	
	// Distributed Tree
	{
		routing::tree::TreeRoutingProcessorFactory::register_factory(sc);
		rfk.add( new routing::tree::TreeRoutingFactory );
		// Tree knowledge injection
		sc.simulation_task_keeper_w().add( new routing::tree::TreeCreationTask );
	}

	// Distributed Flood
	{
		routing::flood::FloodRoutingProcessorFactory::register_factory(sc);
		rfk.add( new routing::flood::FloodRoutingFactory );
	}

	// Distributed GeoRouting
	{
		routing::geo::GeoRoutingProcessorFactory::register_factory(sc);
		rfk.add( new routing::geo::GeoRoutingFactory );
		// Pre creates the neighborhood
		sc.simulation_task_keeper_w().add( new routing::geo::GeoNeighborhoodCreationTask );
	}

	// Centralized FloodRouting
	{
		rfk.add( new routing::flood::CentralizedFloodRoutingFactory );
	}

	// Centralized TreeRouting
	{
		rfk.add( new routing::tree::CentralizedTreeRoutingFactory );
		sc.simulation_task_keeper_w().add( new routing::tree::CentralizedTreeCreationTask ); 
	}

	// Simplified GeoRouting
	{
		routing::geo::SimplifiedGeoRoutingProcessorFactory::register_factory(sc);
		rfk.add( new routing::geo::SimplifiedGeoRoutingFactory );
		//// Pre creates the neighborhood
		//sc.simulation_task_keeper_w().add( new routing::geo::SimplifiedGeoNeighborhoodCreationTask );
	}
}
Exemple #4
0
extern "C" void init_examples( shawn::SimulationController& sc )
{
	std::cout << "Initialising examples" << std::endl;
	
	sc.simulation_task_keeper_w().add( new exampletask::ExampleTask );
	sc.simulation_task_keeper_w().add( new examples::ConnectivityTask );
	
	helloworld::HelloworldProcessorFactory::register_factory(sc);
	helloworld::HelloworldRandomProcessorFactory::register_factory(sc);
	
	sc.simulation_task_keeper_w().add( new examples::tagtest::TagTestTask );
}
Exemple #5
0
extern "C" void init_reading( shawn::SimulationController& sc )
{
   // Keepers
    sc.add_keeper(new reading::ReadingKeeper());
    sc.add_keeper(new reading::SensorKeeper());

   // Sensors
    sc.keeper_by_name_w<reading::SensorKeeper>("SensorKeeper")->add( new reading::SimpleSensorDoubleFactory );
    sc.keeper_by_name_w<reading::SensorKeeper>("SensorKeeper")->add( new reading::SimpleSensorIntegerFactory );

   // Test
   reading::RandomDoubleTestProcessorFactory::register_factory(sc);
   sc.simulation_task_keeper_w().add( new reading::SimulationTaskReadingDoubleTestCreate );
}
Exemple #6
0
extern "C" void init_localization( shawn::SimulationController& sc )
{
   LocalizationProcessorFactory::register_factory( sc );
   sc.simulation_task_keeper_w().add( new SimulationTaskLocalizationEvaluation );
   sc.simulation_task_keeper_w().add( new SimulationTaskLocalizationSelectNode );
}
 void init_topology_generator( shawn::SimulationController& sc )
 {
    std::cout << "init_topology_generator" << std::endl;
    sc.simulation_task_keeper_w().add( new PopulateTask );
 }
Exemple #8
0
extern "C" void init_spyglass( shawn::SimulationController& sc )
{
	sc.simulation_task_keeper_w().add( new spyglass::SpyglassTask );
}