36 #define DEFAULT_MASK (~((long long int)1 << SUMO_ATTR_VEHICLE))
57 oc.
addDescription(
"device.fcd.period",
"FCD Device",
"Recording period for FCD-data");
60 oc.
addDescription(
"device.fcd.radius",
"FCD Device",
"Record objects in a radius around equipped vehicles");
69 into.push_back(device);
94 if (oc.
isSet(
"fcd-output.filter-edges.input-file")) {
95 const std::string file = oc.
getString(
"fcd-output.filter-edges.input-file");
96 std::ifstream strm(file.c_str());
98 throw ProcessError(
"Could not load names of edges for filtering fcd-output from '" + file +
"'.");
100 while (strm.good()) {
105 name = name.substr(5);
110 if (oc.
isSet(
"fcd-output.attributes")) {
112 for (std::string attrName : oc.
getStringVector(
"fcd-output.attributes")) {
114 WRITE_ERROR(
"Unknown attribute '" + attrName +
"' to write in fcd output.");
A device which collects info on the vehicle trip (mainly on departure and arrival)
static void cleanup()
resets the edge filter
static long long int myWrittenAttributes
bit mask for checking attributes to be written
MSDevice_FCD(SUMOVehicle &holder, const std::string &id)
Constructor.
~MSDevice_FCD()
Destructor.
static std::set< const MSEdge * > myEdgeFilter
spatial filter for FCD output
static void insertOptions(OptionsCont &oc)
Inserts MSDevice_FCD-options.
static bool myEdgeFilterInitialized
static void initOnce()
initialize edge filter and attribute mask (once)
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSVehicleDevice * > &into)
Build devices for the given vehicle, if needed.
static void insertDefaultAssignmentOptions(const std::string &deviceName, const std::string &optionsTopic, OptionsCont &oc, const bool isPerson=false)
Adds common command options that allow to assign devices to vehicles.
static bool equippedByDefaultAssignmentOptions(const OptionsCont &oc, const std::string &deviceName, DEVICEHOLDER &v, bool outputOptionSet, const bool isPerson=false)
Determines whether a vehicle should get a certain device.
static bool dictionary(const std::string &id, MSEdge *edge)
Inserts edge into the static dictionary Returns true if the key id isn't already in the dictionary....
Abstract in-vehicle device.
const std::string & getID() const
Returns the id.
A storage for options typed value containers)
void addDescription(const std::string &name, const std::string &subtopic, const std::string &description)
Adds a description for an option.
void doRegister(const std::string &name, Option *v)
Adds an option under the given name.
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
void addOptionSubTopic(const std::string &topic)
Adds an option subtopic.
const StringVector & getStringVector(const std::string &name) const
Returns the list of string-value of the named option (only for Option_StringVector)
static OptionsCont & getOptions()
Retrieves the options.
Representation of a vehicle.
static StringBijection< int > Attrs
The names of SUMO-XML attributes for use in netbuild.
T get(const std::string &str) const
static bool startsWith(const std::string &str, const std::string prefix)
Checks whether a given string starts with the prefix.