How to get total service time of all servers in Omnet++? -
simtime_t servicetime= par("servicetime"); totalservicetime=totalservicetime+servicetime; ev<<"service time= "<<servicetime<<endl; ev<<"total service time= "<<totalservicetime<<endl; this code wrote give me total service time of servers. gives me accumulates service times of each server in same variable. don't know total service time of servers. initialized totalservicetime 0 in initialize(). thank you!
the way understand question have multiple server modules in simulation. way total service time of them using signals (described in omnet++ manual in chapter 4.14).
to need emit signals containing service time of each server. create separate module within network listens signals emitted servers , accumulates service time of them.
Comments
Post a Comment