o-du/phy
Intel O-RAN/X-RAN Generated Doxygen Documentation
Macros | Functions
xran_sync_api.c File Reference

This file provides implementation of synchronization related APIs (PTP/1588) for XRAN. More...

#include <assert.h>
#include <dirent.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "xran_sync_api.h"
#include "xran_printf.h"
Include dependency graph for xran_sync_api.c:

Go to the source code of this file.

Macros

#define BUF_LEN   256
 
#define PROC_DIR   "/proc"
 
#define COMM_FILE   "comm"
 
#define PMC_CMD   "pmc -u -b 0 'GET PORT_DATA_SET'"
 
#define PTP4L_PROC_NAME   "ptp4l"
 
#define PHC2SYS_PROC_NAME   "phc2sys"
 

Functions

int xran_is_synchronized ()
 Function checks if machine is synchronized using PTP for Linux software. More...
 

Detailed Description

This file provides implementation of synchronization related APIs (PTP/1588) for XRAN.

Author
Intel Corporation

Definition in file xran_sync_api.c.

Macro Definition Documentation

◆ BUF_LEN

#define BUF_LEN   256

Definition at line 37 of file xran_sync_api.c.

◆ COMM_FILE

#define COMM_FILE   "comm"

Definition at line 39 of file xran_sync_api.c.

◆ PHC2SYS_PROC_NAME

#define PHC2SYS_PROC_NAME   "phc2sys"

Definition at line 42 of file xran_sync_api.c.

◆ PMC_CMD

#define PMC_CMD   "pmc -u -b 0 'GET PORT_DATA_SET'"

Definition at line 40 of file xran_sync_api.c.

◆ PROC_DIR

#define PROC_DIR   "/proc"

Definition at line 38 of file xran_sync_api.c.

◆ PTP4L_PROC_NAME

#define PTP4L_PROC_NAME   "ptp4l"

Definition at line 41 of file xran_sync_api.c.

Function Documentation

◆ xran_is_synchronized()

int xran_is_synchronized ( void  )

Function checks if machine is synchronized using PTP for Linux software.

Returns
int Returns 0 if synchronized, otherwise positive.

Definition at line 113 of file xran_sync_api.c.

Here is the caller graph for this function: