|
sumo-integrator
0.4.0-alpha4+201812051700
sumo-integrator is a C++ static library that provides abstract integration tools geared towards connecting SUMO with a (any) graphic engine(s).
|
Exposes facilities related to SUMO's entities. More...
#include <include/sumo-integrator/core/Entities.h>
Public Member Functions | |
| void | subscribe (TraCIAPI::TraCIScopeWrapper &, const std::string &, const std::vector< int > &, const double, const double) |
| Subscribe to an entity's data feed. More... | |
| types::Datamap | poll (TraCIAPI::TraCIScopeWrapper &, const std::string &) |
| Poll an entity's data feed. More... | |
Public Attributes | |
| std::map< std::string, std::vector< int > > | DATASETS |
| Provides default datasets to be used with subscriptions. More... | |
Exposes facilities related to SUMO's entities.
Handles anything related to SUMO's entities in the current simulation, including obtaining and feeding data.
sumointegrator::Sumo (sumointegrator::Sumo::entities). Inherits sumointegrator::Sumo::Concern.
| void sumointegrator::Sumo::Entities::subscribe | ( | TraCIAPI::TraCIScopeWrapper & | entity, |
| const std::string & | id, | ||
| const std::vector< int > & | request, | ||
| const double | start, | ||
| const double | end | ||
| ) |
Subscribe to an entity's data feed.
Once subscribed to a data feed, on each SUMO simulation tick that data is made available through poll().
start seconds (s)end seconds (s)| [in] | entity | The type of entity whose feed to subscribe to. |
| [in] | id | The id of the entity whose feed to subscribe to. |
| [in] | request | The requested data. |
| [in] | start | The time the subscription starts taking effect. |
| [in] | end | The time the subscription stops taking effect. |
DEBUG_INFO - Subscription target. | types::Datamap sumointegrator::Sumo::Entities::poll | ( | TraCIAPI::TraCIScopeWrapper & | entity, |
| const std::string & | id | ||
| ) |
Poll an entity's data feed.
It is assumed a subscription was previously made with subscribe(). The data is collected in an std::map (types::Datamap) and can be index-accessed for usage.
| [in] | entity | The type of entity whose feed to poll. |
| [in] | id | The id of the entity whose feed to poll. |
std::map with all the requested data.| types::RuntimeException | If no subscription was previously made. |
DEBUG_DATA - Number of datapoints received from the subscription. | std::map<std::string, std::vector<int> > sumointegrator::Sumo::Entities::DATASETS |
Provides default datasets to be used with subscriptions.
TRANSFORMVECTORSSTATE