#include <mbgdevio.h>
#include <pcpsutil.h>
#include <toolutil.h>
#include <mbgerror.h>
#include <pcpsmktm.h>
#include <chk_time_info.h>
#include <ntp_shm.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <syslog.h>
#include <stdarg.h>
#include <time.h>
#include <sys/ipc.h>
#include <sys/shm.h>
Go to the source code of this file.
◆ LOCK_FILE
#define LOCK_FILE "mbgsvcd.pid" |
◆ MBG_FIRST_COPYRIGHT_YEAR
#define MBG_FIRST_COPYRIGHT_YEAR 2010 |
◆ MBG_LAST_COPYRIGHT_YEAR
#define MBG_LAST_COPYRIGHT_YEAR 0 |
◆ RUNNING_DIR
#define RUNNING_DIR "/var/run" |
◆ do_mbgsvctasks()
static int do_mbgsvctasks |
( |
void |
| ) |
|
|
static |
Definition at line 123 of file mbgsvcd.c.
References _pcps_has_hr_time, _pcps_is_irig_rx, _pcps_is_lwr, _pcps_is_usb, _pcps_type_name, shmTime::clockTimeStampNSec, shmTime::clockTimeStampSec, shmTime::clockTimeStampUSec, shmTime::count, cyc_freq, MBG_CHK_TIME_INFO::d_ref_comp, MBG_CHK_TIME_INFO::exec_cyc, MBG_CHK_TIME_INFO::exec_cyc_limit, frac_digits, has_synced_after_reset, MBG_CHK_TIME_INFO::hrti, shmTime::leap, LEAP_ADDSECOND, LEAP_DELSECOND, LEAP_NOWARNING, MAX_SHM_REFCLOCKS, mbg_chk_time_info(), mbg_close_device(), mbg_cond_err_msg(), mbg_find_devices(), mbg_get_default_cycles_frequency_from_dev(), mbg_get_device_info(), mbg_log(), mbg_open_device(), n_unit0, n_units, NANO_TIME_64::nano_secs, ntpshm_init(), PCPS_FREER, PCPS_LS_ANN, PCPS_LS_ANN_NEG, PCPS_SYNCD, shmTime::precision, pretend_sync, print_raw, quiet, shmTime::receiveTimeStampNSec, shmTime::receiveTimeStampSec, shmTime::receiveTimeStampUSec, MBG_TIME_INFO_HRT::ref_hr_time_cycles, ref_trust_time_expire, ref_trust_time_start, NANO_TIME_64::secs, sleep_intv, snprint_chk_time_info(), PCPS_HR_TIME::status, MBG_SYS_TIME_CYCLES::sys_time, MBG_TIME_INFO_HRT::sys_time_cycles, PCPS_HR_TIME_CYCLES::t, trust_time_seconds, and shmTime::valid.
Referenced by main().
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 400 of file mbgsvcd.c.
References do_mbgsvctasks(), foreground, MAX_SHM_REFCLOCKS, MAX_SHM_UNIT_OFFSET, MBG_EXIT_CODE_FAIL, MBG_EXIT_CODE_SUCCESS, MBG_EXIT_CODE_USAGE, MBG_FIRST_COPYRIGHT_YEAR, MBG_LAST_COPYRIGHT_YEAR, mbg_log(), mbg_print_program_info(), mbg_program_info_str(), mbg_rc_is_success, must_print_usage, n_unit0, n_units, pname, pretend_sync, print_raw, quiet, sleep_intv, startup_daemon(), trust_time_seconds, and usage().
◆ mbg_log()
void mbg_log |
( |
int |
lvl, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
◆ startup_daemon()
static void startup_daemon |
( |
void |
| ) |
|
|
static |
◆ usage()
static void usage |
( |
void |
| ) |
|
|
static |
◆ cyc_freq
◆ filter
◆ foreground
◆ frac_digits
◆ has_synced_after_reset
◆ n_unit0
◆ n_units
◆ pname
const char* pname = "mbgsvcd" |
|
static |
◆ pretend_sync
◆ print_raw
◆ quiet
◆ ref_trust_time_expire
◆ ref_trust_time_start
◆ shmTime
◆ sleep_intv
◆ trust_time_seconds
unsigned long trust_time_seconds |
|
static |