mbgtools-lx
4.2.8
|
Functions | |
_MBG_API_ATTR int _MBG_API | mbg_get_fast_hr_timestamp_cycles (MBG_DEV_HANDLE dh, PCPS_TIME_STAMP_CYCLES *p) |
Read a high resolution PCPS_TIME_STAMP_CYCLES structure via memory mapped access. More... | |
_MBG_API_ATTR int _MBG_API | mbg_get_fast_hr_timestamp_comp (MBG_DEV_HANDLE dh, PCPS_TIME_STAMP *p, int32_t *hns_latency) |
Read a high resolution timestamp and compensate the latency of the call. More... | |
_MBG_API_ATTR int _MBG_API | mbg_get_fast_hr_timestamp (MBG_DEV_HANDLE dh, PCPS_TIME_STAMP *p) |
Read a high resolution PCPS_TIME_STAMP structure via memory mapped access. More... | |
These functions are fast, but return only the UTC time. No status flags, no time zone offset. The time stamps are read from a latched counter chain in the PCI chip set, so this is only supported by cards whose chip set supports this.
int mbg_get_fast_hr_timestamp | ( | MBG_DEV_HANDLE | dh, |
PCPS_TIME_STAMP * | p | ||
) |
Read a high resolution PCPS_TIME_STAMP structure via memory mapped access.
This function does not return or evaluate a cycles count, so the latency of the call can not be determined. However, depending on the timer hardware used as cycles counter it may take quite some time to read the cycles count on some hardware architectures, so this call can be used to yield lower latencies, under the restriction to be unable to determine the exact latency.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a PCPS_TIME_STAMP structure to be filled up. |
Definition at line 7066 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_read_var, IOCTL_GET_FAST_HR_TIMESTAMP, MBG_ERR_NOT_SUPP_ON_OS, and MBGDEVIO_RET_VAL.
Referenced by show_fast_hr_timestamp(), show_fast_hr_timestamp_burst(), and show_time_and_status().
int mbg_get_fast_hr_timestamp_comp | ( | MBG_DEV_HANDLE | dh, |
PCPS_TIME_STAMP * | p, | ||
int32_t * | hns_latency | ||
) |
Read a high resolution timestamp and compensate the latency of the call.
The retrieved PCPS_TIME_STAMP is read from memory mapped registers, and timestamp is compensated for the call's latency before it is returned.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a PCPS_TIME_STAMP structure to be filled up |
[out] | hns_latency | Optionally receives the latency in hectonanoseconds //### TODO Check if hns |
Definition at line 7017 of file mbgdevio.c.
References PCPS_TIME_STAMP_CYCLES::cycles, mbg_comp_hr_latency(), mbg_get_fast_hr_timestamp_cycles(), mbg_get_pc_cycles(), mbg_init_pc_cycles_frequency(), mbg_rc_is_success, pc_cycles_frequency, and PCPS_TIME_STAMP_CYCLES::tstamp.
Referenced by show_fast_hr_timestamp(), and show_fast_hr_timestamp_burst().
int mbg_get_fast_hr_timestamp_cycles | ( | MBG_DEV_HANDLE | dh, |
PCPS_TIME_STAMP_CYCLES * | p | ||
) |
Read a high resolution PCPS_TIME_STAMP_CYCLES structure via memory mapped access.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a PCPS_TIME_STAMP_CYCLES structure to be filled up. |
Definition at line 6981 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_read_var, IOCTL_GET_FAST_HR_TIMESTAMP_CYCLES, MBG_ERR_NOT_SUPP_ON_OS, and MBGDEVIO_RET_VAL.
Referenced by get_htc_timestamps(), and mbg_get_fast_hr_timestamp_comp().