38 #include "../NIImporter_Vissim.h" 39 #include "../tempstructs/NIVissimTL.h" 71 WRITE_ERROR(
"A traffic light group with an unknown traffic light occured.\n Group-ID: " + toString<int>(
id)
72 +
"\n TrafficLight-ID: " + toString<int>(lsaid));
75 std::string type = tl->
getType();
76 if (type ==
"festzeit") {
79 if (type ==
"festzeit_fake") {
84 return parseVAS(
id, name, lsaid, from);
86 if (type ==
"vsplus") {
89 if (type ==
"trends") {
93 return parseVAP(
id, name, lsaid, from);
96 return parseTL(
id, name, lsaid, from);
99 return parsePOS(
id, name, lsaid, from);
101 WRITE_WARNING(
"Unsupported LSA-Type '" + type +
"' occured.");
108 int id,
const std::string& name,
int lsaid, std::istream& from) {
111 std::vector<double> times;
112 std::string tag =
myRead(from);
113 if (tag ==
"dauergruen") {
116 }
else if (tag ==
"dauerrot") {
117 isGreenBegin =
false;
122 while (tag ==
"rotende" || tag ==
"gruenanfang") {
125 times.push_back(point);
128 times.push_back(point);
133 double tredyellow, tyellow;
149 int ,
const std::string& ,
int lsaid, std::istream& from) {
150 WRITE_WARNING(
"VAS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
152 while (tag !=
"detektoren") {
161 int ,
const std::string&,
int lsaid, std::istream&) {
162 WRITE_WARNING(
"VSPLUS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
169 int ,
const std::string&,
int lsaid, std::istream&) {
170 WRITE_WARNING(
"TRENDS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
177 int ,
const std::string&,
int lsaid, std::istream&) {
178 WRITE_WARNING(
"VAS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
185 int ,
const std::string&,
int lsaid, std::istream&) {
186 WRITE_WARNING(
"TL traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
193 int ,
const std::string&,
int lsaid, std::istream&) {
194 WRITE_WARNING(
"POS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
201 int ,
const std::string&,
int lsaid, std::istream&) {
202 WRITE_WARNING(
"externally defined traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
bool parseTRENDS(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a TRENDS traffic light.
~NIVissimSingleTypeParser_Signalgruppendefinition()
Destructor.
std::string myRead(std::istream &from)
reads from the stream and returns the lower case version of the read value
std::string getType() const
Importer for networks stored in Vissim format.
bool parseVAP(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a VAStraffic light.
bool parseFixedTime(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a fixed time traffic light.
bool parsePOS(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a POS traffic light.
#define WRITE_WARNING(msg)
bool parseExternFixedTime(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs fixed time traffic light with an extern definition...
bool parseVSPLUS(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a VSPLUS traffic light.
static bool dictionary(int id, const std::string &type, const std::string &name, SUMOTime absdur, SUMOTime offset)
static bool dictionary(int lsaid, int id, NIVissimTLSignalGroup *o)
bool parseTL(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a TL traffic light.
NIVissimSingleTypeParser_Signalgruppendefinition(NIImporter_Vissim &parent)
Constructor.
std::string readName(std::istream &from)
Reads the structures name We cannot use the "<<" operator, as names may contain more than one word wh...
bool parseVAS(int id, const std::string &name, int lsaid, std::istream &from)
Parses a traffic light group which belongs to a VAS traffic light.
bool parse(std::istream &from)
Parses the data type from the given stream.