pps_example.c

Reference Documentation

Platform
Intel® PAC
Napatech SmartNIC
Content Type
Reference Information
Capture Software Version
Link™ Capture Software 12.10
Napatech Software Suite: examples/pps/pps_example.c File Reference
pps_example.c File Reference
#include <nt.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]
 
int stopApplication =0
 

Macro Definition Documentation

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

Definition at line 96 of file pps_example.c.

Referenced by main().

#define NT_CONST64 (   a)    a##ULL

Definition at line 123 of file pps_example.c.

#define UNIX_EPOCH_OFFSET_MAGIC   116444736000000000ULL

Definition at line 124 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)
Examples:
pps/pps_example.c.

Definition at line 164 of file pps_example.c.

Referenced by main().

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

Definition at line 178 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 198 of file pps_example.c.

Referenced by main().

static void StopApplication ( int  sig)
static

Definition at line 147 of file pps_example.c.

Referenced by main().

int main ( void  )

Definition at line 221 of file pps_example.c.

Variable Documentation

Examples:
pps/pps_example.c.

Definition at line 103 of file pps_example.c.

int stopApplication =0