 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
17 #ifndef VEHICLEENGINEHANDLER_H
18 #define VEHICLEENGINEHANDLER_H
26 #include <xercesc/sax2/Attributes.hpp>
27 #include <xercesc/sax2/DefaultHandler.hpp>
31 #define ENGINE_TAG_VEHICLES "vehicles"
32 #define ENGINE_TAG_VEHICLE "vehicle"
33 #define ENGINE_TAG_VEHICLE_ID "id"
34 #define ENGINE_TAG_VEHICLE_DESCRIPTION "description"
35 #define ENGINE_TAG_GEARS "gears"
36 #define ENGINE_TAG_GEAR "gear"
37 #define ENGINE_TAG_GEAR_N "n"
38 #define ENGINE_TAG_GEAR_RATIO "ratio"
39 #define ENGINE_TAG_GEAR_DIFFERENTIAL "differential"
40 #define ENGINE_TAG_MASS "mass"
41 #define ENGINE_TAG_MASS_MASS "mass"
42 #define ENGINE_TAG_MASS_FACTOR "massFactor"
43 #define ENGINE_TAG_WHEELS "wheels"
44 #define ENGINE_TAG_WHEELS_DIAMETER "diameter"
45 #define ENGINE_TAG_WHEELS_FRICTION "friction"
46 #define ENGINE_TAG_WHEELS_CR1 "cr1"
47 #define ENGINE_TAG_WHEELS_CR2 "cr2"
48 #define ENGINE_TAG_DRAG "drag"
49 #define ENGINE_TAG_DRAG_CAIR "cAir"
50 #define ENGINE_TAG_DRAG_SECTION "section"
51 #define ENGINE_TAG_ENGINE "engine"
52 #define ENGINE_TAG_ENGINE_TYPE "type"
53 #define ENGINE_TAG_ENGINE_EFFICIENCY "efficiency"
54 #define ENGINE_TAG_ENGINE_CYLINDERS "cylinders"
55 #define ENGINE_TAG_ENGINE_MINRPM "minRpm"
56 #define ENGINE_TAG_ENGINE_MAXRPM "maxRpm"
57 #define ENGINE_TAG_ENGINE_TAU_EX "tauEx"
58 #define ENGINE_TAG_ENGINE_TAU_BURN "tauBurn"
59 #define ENGINE_TAG_ENGINE_POWER "power"
60 #define ENGINE_TAG_ENGINE_POWER_RPM "rpm"
61 #define ENGINE_TAG_ENGINE_POWER_HP "hp"
62 #define ENGINE_TAG_ENGINE_POWER_KW "kw"
63 #define ENGINE_TAG_ENGINE_POWER_SLOPE "slope"
64 #define ENGINE_TAG_ENGINE_POWER_INTERCEPT "intercept"
65 #define ENGINE_TAG_SHIFTING "shifting"
66 #define ENGINE_TAG_SHIFTING_RPM "rpm"
67 #define ENGINE_TAG_SHIFTING_DELTARPM "deltaRpm"
68 #define ENGINE_TAG_BRAKES "brakes"
69 #define ENGINE_TAG_BRAKES_TAU "tau"
71 #define TAG_VEHICLES 0
97 void startElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
98 const XMLCh*
const qname,
const XERCES_CPP_NAMESPACE::Attributes& attrs);
100 void endElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
101 const XMLCh*
const qname);
113 void loadMassData(
const XERCES_CPP_NAMESPACE::Attributes& attrs);
119 void loadDragData(
const XERCES_CPP_NAMESPACE::Attributes& attrs);
124 void loadWheelsData(
const XERCES_CPP_NAMESPACE::Attributes& attrs);
128 void loadEngineData(
const XERCES_CPP_NAMESPACE::Attributes& attrs);
132 void loadGearData(
const XERCES_CPP_NAMESPACE::Attributes& attrs);
149 void loadBrakesData(
const XERCES_CPP_NAMESPACE::Attributes& attrs);
156 int existsAttribute(std::string tag,
const char* attribute,
const XERCES_CPP_NAMESPACE::Attributes& attrs);
161 std::string
parseStringAttribute(std::string tag,
const char* attribute,
const XERCES_CPP_NAMESPACE::Attributes& attrs);
167 int parseIntAttribute(std::string tag,
const char* attribute,
const XERCES_CPP_NAMESPACE::Attributes& attrs);
173 double parseDoubleAttribute(std::string tag,
const char* attribute,
const XERCES_CPP_NAMESPACE::Attributes& attrs);
int existsAttribute(std::string tag, const char *attribute, const XERCES_CPP_NAMESPACE::Attributes &attrs)
void loadWheelsData(const XERCES_CPP_NAMESPACE::Attributes &attrs)
std::string parseStringAttribute(std::string tag, const char *attribute, const XERCES_CPP_NAMESPACE::Attributes &attrs)
void loadBrakesData(const XERCES_CPP_NAMESPACE::Attributes &attrs)
void loadDifferentialData(const XERCES_CPP_NAMESPACE::Attributes &attrs)
double parsePolynomialCoefficient(int index, const XERCES_CPP_NAMESPACE::Attributes &attrs)
double parseDoubleAttribute(std::string tag, const char *attribute, const XERCES_CPP_NAMESPACE::Attributes &attrs)
void raiseUnknownTagError(std::string tag)
void loadEngineModelData(const XERCES_CPP_NAMESPACE::Attributes &attrs)
EngineParameters engineParameters
void loadDragData(const XERCES_CPP_NAMESPACE::Attributes &attrs)
const VehicleEngineHandler & operator=(const VehicleEngineHandler &s)
invalidated assignment operator
std::string vehicleToLoad
void loadMassData(const XERCES_CPP_NAMESPACE::Attributes &attrs)
const EngineParameters & getEngineParameters()
void raiseMissingAttributeError(std::string tag, std::string attribute)
std::vector< double > gearRatios
void loadGearData(const XERCES_CPP_NAMESPACE::Attributes &attrs)
VehicleEngineHandler(const std::string &toLoad)
int parseIntAttribute(std::string tag, const char *attribute, const XERCES_CPP_NAMESPACE::Attributes &attrs)
void endElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname)
void startElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const XERCES_CPP_NAMESPACE::Attributes &attrs)
void loadEngineData(const XERCES_CPP_NAMESPACE::Attributes &attrs)
virtual ~VehicleEngineHandler()
Destructor.
void loadShiftingData(const XERCES_CPP_NAMESPACE::Attributes &attrs)