I implemented the finish method in my application but it is not being called at the end of the simulation.
I tried placing logs and using the debugger, but none of these methods gave me any indication that it was being called
Here is the header file:
class LoadBalancer : public BaseWaveApplLayer {
public:
virtual void initialize(int stage);
virtual void finish();
This is the implementation
void LoadBalancer::finish(){
std::string scWork = "Load Balancer : "+std::to_string(id)+" work finished";
recordScalar(scWork.c_str(),workFinished);
std::string scTask = "Load Balancer : "+std::to_string(id)+" task finished";
recordScalar(scTask.c_str(),taskCompleted);
EV << "Load balancer : " <<id<<" finished a total work of: "<<workFinished<<" and completed "<<taskCompleted<<" task"<<endl;
}
I would have hoped any of the logs in the finish method be called or any scalar file to have been created but that was not the case.