 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
16 #ifndef VEHICLEENGINEHANDLER_H
17 #define VEHICLEENGINEHANDLER_H
25 #include <xercesc/sax2/Attributes.hpp>
26 #include <xercesc/sax2/DefaultHandler.hpp>
30 #define ENGINE_TAG_VEHICLES "vehicles"
31 #define ENGINE_TAG_VEHICLE "vehicle"
32 #define ENGINE_TAG_VEHICLE_ID "id"
33 #define ENGINE_TAG_VEHICLE_DESCRIPTION "description"
34 #define ENGINE_TAG_GEARS "gears"
35 #define ENGINE_TAG_GEAR "gear"
36 #define ENGINE_TAG_GEAR_N "n"
37 #define ENGINE_TAG_GEAR_RATIO "ratio"
38 #define ENGINE_TAG_GEAR_DIFFERENTIAL "differential"
39 #define ENGINE_TAG_MASS "mass"
40 #define ENGINE_TAG_MASS_MASS "mass"
41 #define ENGINE_TAG_MASS_FACTOR "massFactor"
42 #define ENGINE_TAG_WHEELS "wheels"
43 #define ENGINE_TAG_WHEELS_DIAMETER "diameter"
44 #define ENGINE_TAG_WHEELS_FRICTION "friction"
45 #define ENGINE_TAG_WHEELS_CR1 "cr1"
46 #define ENGINE_TAG_WHEELS_CR2 "cr2"
47 #define ENGINE_TAG_DRAG "drag"
48 #define ENGINE_TAG_DRAG_CAIR "cAir"
49 #define ENGINE_TAG_DRAG_SECTION "section"
50 #define ENGINE_TAG_ENGINE "engine"
51 #define ENGINE_TAG_ENGINE_TYPE "type"
52 #define ENGINE_TAG_ENGINE_EFFICIENCY "efficiency"
53 #define ENGINE_TAG_ENGINE_CYLINDERS "cylinders"
54 #define ENGINE_TAG_ENGINE_MINRPM "minRpm"
55 #define ENGINE_TAG_ENGINE_MAXRPM "maxRpm"
56 #define ENGINE_TAG_ENGINE_TAU_EX "tauEx"
57 #define ENGINE_TAG_ENGINE_TAU_BURN "tauBurn"
58 #define ENGINE_TAG_ENGINE_POWER "power"
59 #define ENGINE_TAG_ENGINE_POWER_RPM "rpm"
60 #define ENGINE_TAG_ENGINE_POWER_HP "hp"
61 #define ENGINE_TAG_ENGINE_POWER_KW "kw"
62 #define ENGINE_TAG_ENGINE_POWER_SLOPE "slope"
63 #define ENGINE_TAG_ENGINE_POWER_INTERCEPT "intercept"
64 #define ENGINE_TAG_SHIFTING "shifting"
65 #define ENGINE_TAG_SHIFTING_RPM "rpm"
66 #define ENGINE_TAG_SHIFTING_DELTARPM "deltaRpm"
67 #define ENGINE_TAG_BRAKES "brakes"
68 #define ENGINE_TAG_BRAKES_TAU "tau"
70 #define TAG_VEHICLES 0
96 void startElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
97 const XMLCh*
const qname,
const XERCES_CPP_NAMESPACE::Attributes& attrs);
99 void endElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
100 const XMLCh*
const qname);
112 void loadMassData(
const XERCES_CPP_NAMESPACE::Attributes& attrs);
118 void loadDragData(
const XERCES_CPP_NAMESPACE::Attributes& attrs);
123 void loadWheelsData(
const XERCES_CPP_NAMESPACE::Attributes& attrs);
127 void loadEngineData(
const XERCES_CPP_NAMESPACE::Attributes& attrs);
131 void loadGearData(
const XERCES_CPP_NAMESPACE::Attributes& attrs);
148 void loadBrakesData(
const XERCES_CPP_NAMESPACE::Attributes& attrs);
155 int existsAttribute(std::string tag,
const char* attribute,
const XERCES_CPP_NAMESPACE::Attributes& attrs);
160 std::string
parseStringAttribute(std::string tag,
const char* attribute,
const XERCES_CPP_NAMESPACE::Attributes& attrs);
166 int parseIntAttribute(std::string tag,
const char* attribute,
const XERCES_CPP_NAMESPACE::Attributes& attrs);
172 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)