Reputation: 31
In veins 4.7.1 I can have getVehicleCount() in TraciScenarioManger class. But In veins 5.0 this method is not available instead of a protective variable activeVehicleCount. I defined ''' TraCIScenarioManager* Tracscene' ''' but when I use ''' Tracscene->activeVehicleCount ''' I got an error "uint32_t veins::TraCIScenarioManager::activeVehicleCount’ is protected within this context"
How can I solve this problem? Thank you very much!
Upvotes: 1
Views: 74
Reputation: 31
Creat a sub class to visit it.
class VEINS_API myTCM : TraCIScenarioManager {
public:
int getVehicleCount(){
return activeVehicleCount;
}
};
Upvotes: 1