pps_example.c

Reference Documentation

product_line_custom
IntelĀ® PAC
Napatech SmartNIC
category
Reference Information
Napatech Software Suite: examples/pps/pps_example.c File Reference
pps_example.c File Reference
#include "nt.h"

Go to the source code of this file.

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)
 

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
 

Variables

TimeSync_t TS_os [MAX_TS_CARDS]
 
int stopApplication =0
 

Function Documentation

int PpsGetOsTime ( uint64_t *  osTime)
Examples:
pps/pps_example.c.

Definition at line 168 of file pps_example.c.

Referenced by main().

int PrintTimestamp ( uint64_t  timeValue)
Examples:
pps/pps_example.c.

Definition at line 182 of file pps_example.c.

Referenced by PpsPrintStatusAndTime().

int PpsPrintStatusAndTime ( int  i,
uint64_t  timeSyncPpsSampled,
int64_t  timeSyncTimeSkew 
)
Examples:
pps/pps_example.c.

Definition at line 202 of file pps_example.c.

Referenced by main().

static void StopApplication ( int  sig)
static

Definition at line 151 of file pps_example.c.

Referenced by main().

int main ( void  )

Definition at line 225 of file pps_example.c.

Macro Definition Documentation

#define MAX_TS_CARDS   4
Examples:
pps/pps_example.c.

Definition at line 97 of file pps_example.c.

Referenced by main().

#define NT_CONST64 (   a)    a##ULL

Definition at line 127 of file pps_example.c.

#define UNIX_EPOCH_OFFSET_MAGIC   116444736000000000ULL

Definition at line 128 of file pps_example.c.

Typedef Documentation

typedef struct TimeSync_s TimeSync_t
Examples:
pps/pps_example.c.

Variable Documentation

Examples:
pps/pps_example.c.

Definition at line 104 of file pps_example.c.

int stopApplication =0
Examples:
bypass/watchdog/bypass_watchdog_example.c, eventMonitor_example.c, and pps/pps_example.c.

Definition at line 107 of file pps_example.c.

Referenced by main(), and StopApplication().