Specialized context for a RTEvent coming from the TimingSimulationEventSource. More...
#include <TimingSimulationContext.h>
Public Member Functions | |
TimingSimulationContext (std::string &domainName, long cycleId, std::string &cycleName, long relativEventTimeInCycle) | |
Constructor. | |
long long | getInterruptTimeStamp () |
Returns the time of occurrence of the event expressed as a 64-bit integer counting the number of nanoseconds elapsed since the UNIX epoch i.e. since January 1st 1970 at 00.00 A.M. | |
unsigned long | getCycleTime () |
Returns the time of occurrence of the event in the cycle in ms. The time is returned in a 32 bit integer with the number of miliseconds ticks since the start of the **currently** executing cycle. | |
void | setCycleTimeStamp () |
set startCycle time: internally relies on gettimeofday() call | |
Private Attributes | |
long | cycleTime_ |
time since the start of the current cycle in ms. |
Specialized context for a RTEvent coming from the TimingSimulationEventSource.
Definition at line 14 of file TimingSimulationContext.h.
fesaGSI::TimingSimulationContext::TimingSimulationContext | ( | std::string & | domainName, | |
long | cycleId, | |||
std::string & | cycleName, | |||
long | relativEventTimeInCycle | |||
) |
Constructor.
cycleName | Name of the cycle the context is used for | |
relativEventTimeInCycle | time from the start of the cycle to the event |
Definition at line 7 of file TimingSimulationContext.cpp.
References cycleTime_.
unsigned long fesaGSI::TimingSimulationContext::getCycleTime | ( | ) |
Returns the time of occurrence of the event in the cycle in ms. The time is returned in a 32 bit integer with the number of miliseconds ticks since the start of the **currently** executing cycle.
Definition at line 23 of file TimingSimulationContext.cpp.
References cycleTime_.
long long fesaGSI::TimingSimulationContext::getInterruptTimeStamp | ( | ) |
Returns the time of occurrence of the event expressed as a 64-bit integer counting the number of nanoseconds elapsed since the UNIX epoch i.e. since January 1st 1970 at 00.00 A.M.
Definition at line 18 of file TimingSimulationContext.cpp.
void fesaGSI::TimingSimulationContext::setCycleTimeStamp | ( | ) |
set startCycle time: internally relies on gettimeofday() call
Definition at line 28 of file TimingSimulationContext.cpp.
Referenced by fesaGSI::TimingSimulationEventSource::wait().
long fesaGSI::TimingSimulationContext::cycleTime_ [private] |
time since the start of the current cycle in ms.
Definition at line 51 of file TimingSimulationContext.h.
Referenced by getCycleTime(), and TimingSimulationContext().