I'm trying to create a new thread in my Veins simulation that can use the Veins::TraCICommandInterface::Vehicle*
, however I'm not able to achieve this goal.
I use a class EVData that should be able to use the functionality, however it gives an error in SUMO about not implemented commands.
Here is the class that has access to the Veins::TraCICommandInterface::Vehicle*
:
class EVData : public BaseWaveApplLayer
{
public:
simtime_t lastDroveAt;
bool sentMessage;
TraCIMobility::Statistics statistics;
simtime_t stoppedAt, startedAt, lastUpdate;
bool isOver;
void printSomething()
{
std::cout<< "data que eu quero: " << traciVehicle->getLaneId() << "\n";
}
};
and here is the thread code:
void socketThread(EVData* evD/*, Veins::TraCICommandInterface::Vehicle* tv*/)
{
std::cout << "sou uma thread nova \n";
while(!evD->isOver)
{
//std::cout << "";
evD->printSomething();
}
}
The threading works so I have no clue how to solve this issue, can anyone help me?