Hi,
PolygonScope::add had a type mismatch.
I also updated the item number to 5 in accordance to the documentation, but
not really necessary as this value is just ditched when reading the packet
anyway.
Brgds,
//Fredrik
Index: src/utils/traci/TraCIAPI.cpp
===================================================================
--- src/utils/traci/TraCIAPI.cpp (revision 21531)
+++ src/utils/traci/TraCIAPI.cpp (working copy)
@@ -1235,7 +1235,7 @@
TraCIAPI::PolygonScope::add(const std::string& polygonID, const
TraCIAPI::TraCIPositionVector& shape, const TraCIColor& c, bool fill, const
std::string& type, int layer) const {
tcpip::Storage content;
content.writeUnsignedByte(TYPE_COMPOUND);
- content.writeInt(4);
+ content.writeInt(5);
content.writeUnsignedByte(TYPE_STRING);
content.writeString(type);
content.writeUnsignedByte(TYPE_COLOR);
@@ -1249,7 +1249,7 @@
content.writeUnsignedByte(TYPE_INTEGER);
content.writeInt(layer);
content.writeUnsignedByte(TYPE_POLYGON);
- content.writeInt((int)shape.size());
+ content.writeUnsignedByte(shape.size());
for (int i = 0; i < (int)shape.size(); ++i) {
content.writeDouble(shape[i].x);
content.writeDouble(shape[i].y);
------------------------------------------------------------------------------
_______________________________________________
sumo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-devel