I'm looking for a way to collect results from omnet simulation, using statistics, in different vectorial file, one for each module, or one for each signal. I can find nothing in the documentation. All the examples show how record results in a single vector file.
I'm simulating an airport: The module are Tower, Landing, Takeoff, Runway. Here some code of Landing.cc
if(!landing_queue.isEmpty())
{
EV << "LANDING: Start Landing\n";
cObject* obj_plane;
obj_plane = landing_queue.pop();
plane = dynamic_cast<Plane*>(obj_plane);
send(plane, "out_airstrip");
//emissione segnale contenente id aereo
emit(arrivalSignalId, plane->getId());
}
...
EV << "LANDING: Aereo aggiunto alla landing_queue\n";
myMsg->setEnter(simTime()); //segno a che ore entra nella lista landing_queue
myMsg->setKind(0); //setto per sicurezza
landing_queue.insert(myMsg);
//emissione segnale con numero di aereo nella coda Landing
emit(arrivalSignalId, landing_queue.getLength());
The other modules use also emit function to collect information. Here the omnetpp.ini:
[General]
network = Airport
**.sky.sendInitialMessage = true
**.sky[*].SkyRecId.result-recording-modes = -vector
**.landing[*].LandingRecId.result-recording-modes = -vector
**.parking[*].ParkingRecId.result-recording-modes = -vector
**.takeoff[*].TakeoffRecId.result-recording-modes = -vector
All the results are on the same vector file "General-#0.vec"
Is there a way to put results of different modules in different .vec files? Is there a way to put results of different signal (emit) in the same module in different .vec files?
Comments
Post a Comment