I am trying to implement a TraCi command for mysumo scenario (traci.lane.setDisallowed) while using veins. I created a new command in the TraciCommandInterface.cpp like:
void TraCICommandInterface::Lane::setDisallowed(std::list<std::string> disallowedClasses)
{
TraCIBuffer buf = connection->query(CMD_SET_LANE_VARIABLE, TraCIBuffer() << LANE_DISALLOWED << laneId << TYPE_STRINGLIST << disallowedClasses);
ASSERT(buf.eof());
}
and called like:
std::list<std::string> disallowedClasses = {"all"};
if (simTime()==20) {
TraCICommandInterface* cInt = getCommandInterface();
cInt->lane("ed_1_0").setDisallowed(disallowedClasses);
}
The problem is that i get the error: Answered with error to command 0xc3: Wrong position in requestMessage after dispatching command 195. Expected command length was 38 but 18 Bytes were read.
Is there something wrong with the way i implemented the command? Any suggestions why this problems occurs?