39 #include "../NIImporter_Vissim.h" 40 #include "../tempstructs/NIVissimTL.h" 72 WRITE_ERROR(
"A traffic light group with an unknown traffic light occured.\n Group-ID: " + toString<int>(
id)
73 +
"\n TrafficLight-ID: " + toString<int>(lsaid));
76 std::string type = tl->
getType();
77 if (type ==
"festzeit") {
80 if (type ==
"festzeit_fake") {
85 return parseVAS(
id, name, lsaid, from);
87 if (type ==
"vsplus") {
90 if (type ==
"trends") {
94 return parseVAP(
id, name, lsaid, from);
97 return parseTL(
id, name, lsaid, from);
100 return parsePOS(
id, name, lsaid, from);
102 WRITE_WARNING(
"Unsupported LSA-Type '" + type +
"' occured.");
109 int id,
const std::string& name,
int lsaid, std::istream& from) {
112 std::vector<double> times;
113 std::string tag =
myRead(from);
114 if (tag ==
"dauergruen") {
117 }
else if (tag ==
"dauerrot") {
118 isGreenBegin =
false;
123 while (tag ==
"rotende" || tag ==
"gruenanfang") {
126 times.push_back(point);
129 times.push_back(point);
134 double tredyellow, tyellow;
150 int ,
const std::string& ,
int lsaid, std::istream& from) {
151 WRITE_WARNING(
"VAS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
153 while (tag !=
"detektoren") {
162 int ,
const std::string&,
int lsaid, std::istream&) {
163 WRITE_WARNING(
"VSPLUS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
170 int ,
const std::string&,
int lsaid, std::istream&) {
171 WRITE_WARNING(
"TRENDS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
178 int ,
const std::string&,
int lsaid, std::istream&) {
179 WRITE_WARNING(
"VAS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
186 int ,
const std::string&,
int lsaid, std::istream&) {
187 WRITE_WARNING(
"TL traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
194 int ,
const std::string&,
int lsaid, std::istream&) {
195 WRITE_WARNING(
"POS traffic lights are not supported (lsa=" + toString<int>(lsaid) +
")");
202 int ,
const std::string&,
int lsaid, std::istream&) {
203 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.