Closed HuyTyskland closed 1 year ago
@awillecke @riebl Sorry if this message bothers you guys. Would you mind suggesting me on this matter?
You are not bothering me, it's just that I don't have as much spare time to spend on Artery as I would like to.
I think you are looking for Timer::reconstructMilliseconds
which creates a time stamp from a time delta fragment in milliseconds, as genDeltaTime is.
Artery can also measure quite precisely (i.e., better than ms granularity) the link latency, see https://github.com/riebl/artery/blob/4bc468e372091fa392d43c5fc3358821a21534c9/scenarios/car2car-grid/omnetpp.ini#LL25C1-L25C82
Hello @riebl Thank you for your answer. I can do it now.
Hello everyone,
Currently, I want to implement the way to measure the age of a CAM: from sendCam() of its transmitter to indicate() of its receiver.
I notice, and based on this issue, I can get the time, in ms, when a CAM is generated by accessing the genDeltaTime. By changing
mTimer->getTimeFor(mVehicleDataProvider->updated())
tomTimer->getCurrentTime()
as in here, I can get the simulation time. To measure that CAM's age, at its receiver, I subtracted thesimTime().inUnit(SIMTIME_MS)
by thegenerationDeltaTime
as in here.However, the results, starting from minus values, kept increasing. I believe my way to do as I want (measuring age of a CAM) is not the right way.
Is there a more proper way to do this? or did I have some error in the way I do it? or there is already a signal emitted for such measure?
Best regards, Huy Nguyen.