本文整理汇总了C++中shawn::SimulationController::simulation_task_keeper_w方法的典型用法代码示例。如果您正苦于以下问题:C++ SimulationController::simulation_task_keeper_w方法的具体用法?C++ SimulationController::simulation_task_keeper_w怎么用?C++ SimulationController::simulation_task_keeper_w使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类shawn::SimulationController
的用法示例。
在下文中一共展示了SimulationController::simulation_task_keeper_w方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
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 );
}
示例2: init_topology_elevation
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 );
}
示例3:
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 );
}
}
示例4:
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 );
}
示例5:
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 );
}
示例6:
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 );
}
示例7: init_topology_generator
void init_topology_generator( shawn::SimulationController& sc )
{
std::cout << "init_topology_generator" << std::endl;
sc.simulation_task_keeper_w().add( new PopulateTask );
}
示例8:
extern "C" void init_spyglass( shawn::SimulationController& sc )
{
sc.simulation_task_keeper_w().add( new spyglass::SpyglassTask );
}