96 virtual const std::string
deviceName()
const = 0;
158 virtual void setParameter(
const std::string& key,
const std::string& value) {
virtual void setParameter(const std::string &key, const std::string &value)
try to set the given parameter for this device. Throw exception for unsupported key ...
virtual ~MSDevice()
Destructor.
SUMOVehicle & myHolder
The vehicle that stores the device.
static std::map< std::string, std::set< std::string > > myExplicitIDs
vehicles which explicitly carry a device, sorted by device, first
virtual std::string getParameter(const std::string &key) const
try to retrieve the given parameter from this device. Throw exception for unsupported key ...
virtual void generateOutput() const
Called on writing tripinfo output.
#define UNUSED_PARAMETER(x)
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSDevice *> &into)
Build devices for the given vehicle, if needed.
virtual const std::string deviceName() const =0
return the name for this type of device
Representation of a vehicle.
Encapsulated SAX-Attributes.
virtual void saveState(OutputDevice &out) const
Saves the state of the device.
static void insertDefaultAssignmentOptions(const std::string &deviceName, const std::string &optionsTopic, OptionsCont &oc)
Adds common command options that allow to assign devices to vehicles.
Something on a lane to be noticed about vehicle movement.
Base class for objects which have an id.
static bool checkOptions(OptionsCont &oc)
check device-specific options
Abstract in-vehicle device.
static MTRand myEquipmentRNG
A random number generator used to choose from vtype/route distributions and computing the speed facto...
static bool equippedByDefaultAssignmentOptions(const OptionsCont &oc, const std::string &deviceName, SUMOVehicle &v)
Determines whether a vehicle should get a certain device.
virtual void loadState(const SUMOSAXAttributes &attrs)
Loads the state of the device from the given description.
A storage for options typed value containers)
static void insertOptions(OptionsCont &oc)
Inserts options for building devices.
static MTRand * getEquipmentRNG()
Static storage of an output device and its base (abstract) implementation.
MSDevice & operator=(const MSDevice &)
Invalidated assignment operator.
MSDevice(SUMOVehicle &holder, const std::string &id)
Constructor.
SUMOVehicle & getHolder() const
Returns the vehicle that holds this device.