|
timingApi
|
Go to the source code of this file.
Data Structures | |
| struct | _EventTimingData |
| The EventTimingData structure is used to retrieve synchronous data from the eventCode arrival time FIFO. More... | |
Defines | |
| #define | TS_INDEX_INIT 1000000 |
| TS_INDEX_INIT is a magic value that when used as the incr argument to timingFifoRead() tells it to set the index to the most recently arrived timing info. | |
Typedefs | |
| typedef struct _EventTimingData | EventTimingData |
| The EventTimingData structure is used to retrieve synchronous data from the eventCode arrival time FIFO. | |
Functions | |
| int | timingFifoRead (unsigned int eventCode, int incr, uint64_t *index, EventTimingData *pTimingDataDest) |
| The timingFifoRead() call allows a timingFifo client to access a FIFO queue of the last TS_INDEX_INIT eventCode arrival timestamps. | |
| TimingPulseId | timingGetLastFiducial () |
| timingGetLastFiducial returns lastfid, the last fiducial set by ISR. | |
| TimingPulseId | timingGetFiducialForTimeStamp (epicsTimeStamp timeStamp) |
| timingGetFiducialForTimeStamp returns the fiducial that corresponds to the specified timestamp. | |
| int | timingGetCurTimeStamp (epicsTimeStamp *pTimeStampDest) |
| Retrieve the most recent timestamp available. | |
| int | timingGetEventTimeStamp (epicsTimeStamp *pTimeStampDest, int eventCode) |
| Retrieve the most recent timestamp and pulseId for the specified eventCode. | |
| #define TS_INDEX_INIT 1000000 |
TS_INDEX_INIT is a magic value that when used as the incr argument to timingFifoRead() tells it to set the index to the most recently arrived timing info.
| typedef struct _EventTimingData EventTimingData |
The EventTimingData structure is used to retrieve synchronous data from the eventCode arrival time FIFO.
The timing service must guarantee that all values returned via this structure are for the same pulse.
| int timingFifoRead | ( | unsigned int | eventCode, |
| int | incr, | ||
| uint64_t * | index, | ||
| EventTimingData * | pTimingDataDest | ||
| ) |
The timingFifoRead() call allows a timingFifo client to access a FIFO queue of the last TS_INDEX_INIT eventCode arrival timestamps.
Each client has their own index position in the queue which can be controlled w/ the incr argument.
Clients should not write directly to the index value.
The index is adjusted according to the incr argument before reading the eventCode arrival time info from the FIFO
FIFO underruns occur by trying to fetch another timestamp when you've already fetched the most recent one.
FIFO overruns occur by trying to fetch the next timestamp after it's position in the FIFO is reused by a new eventCode arrival time.
The timing service must guarantee that all values returned via this call are for the same pulse.
Return value: 0 on success -1 for NULL return ptrs -2 for invalid index -3 for FIFO overflow -4 for FIFO underflow.
These values are returned via ptr:
| int timingGetCurTimeStamp | ( | epicsTimeStamp * | pTimeStampDest | ) |
Retrieve the most recent timestamp available.
Return EPICS timestamp via this ptr
| int timingGetEventTimeStamp | ( | epicsTimeStamp * | pTimeStampDest, |
| int | eventCode | ||
| ) |
Retrieve the most recent timestamp and pulseId for the specified eventCode.
Which eventCode
| pTimeStampDest | Return EPICS timestamp via this ptr |
| TimingPulseId timingGetFiducialForTimeStamp | ( | epicsTimeStamp | timeStamp | ) |
timingGetFiducialForTimeStamp returns the fiducial that corresponds to the specified timestamp.
If the timing module cannot determine the correct fiducial, it returns TIMING_PULSEID_INVALID.
| TimingPulseId timingGetLastFiducial | ( | ) |
timingGetLastFiducial returns lastfid, the last fiducial set by ISR.
1.7.4