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

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -