pps_example.c File Reference
#include <nt.h>#include <signal.h>#include <sys/time.h>#include <unistd.h>#include <stdatomic.h>#include <stdlib.h>#include <time.h>Go to the source code of this file.
Data Structures | |
| struct | TimeSync_s |
| struct | nttimeval |
Macros | |
| #define | MAX_TS_CARDS 4 |
| #define | NT_CONST64(a) a##ULL |
| #define | UNIX_EPOCH_OFFSET_MAGIC 116444736000000000ULL |
Typedefs | |
| typedef struct TimeSync_s | TimeSync_t |
Functions | |
| int | PpsGetOsTime (uint64_t *osTime) |
| int | PrintTimestamp (uint64_t timeValue) |
| int | PpsPrintStatusAndTime (int i, uint64_t timeSyncPpsSampled, int64_t timeSyncTimeSkew) |
| static void | StopApplication (int sig) |
| int | main (void) |
Variables | |
| TimeSync_t | TS_os [MAX_TS_CARDS] |
| static atomic_int | appRunning = 1 |
Macro Definition Documentation
| #define MAX_TS_CARDS 4 |
| #define NT_CONST64 | ( | a | ) | a##ULL |
Definition at line 129 of file pps_example.c.
| #define UNIX_EPOCH_OFFSET_MAGIC 116444736000000000ULL |
Definition at line 130 of file pps_example.c.
Typedef Documentation
| typedef struct TimeSync_s TimeSync_t |
- Examples:
- pps/pps_example.c.
Function Documentation
| int PpsGetOsTime | ( | uint64_t * | osTime | ) |
| int PrintTimestamp | ( | uint64_t | timeValue | ) |
- Examples:
- pps/pps_example.c.
Definition at line 184 of file pps_example.c.
Referenced by PpsPrintStatusAndTime().
| int PpsPrintStatusAndTime | ( | int | i, |
| uint64_t | timeSyncPpsSampled, | ||
| int64_t | timeSyncTimeSkew | ||
| ) |
|
static |
Definition at line 158 of file pps_example.c.
Referenced by main().
| int main | ( | void | ) |
Definition at line 227 of file pps_example.c.
Variable Documentation
| TimeSync_t TS_os[MAX_TS_CARDS] |
- Examples:
- pps/pps_example.c.
Definition at line 105 of file pps_example.c.
|
static |
Definition at line 111 of file pps_example.c.
Referenced by main(), and StopApplication().