mbgtools-lx  4.2.8
mbgcmptime.c File Reference
#include <cmp_time_util.h>
#include <mbgdevio.h>
#include <toolutil.h>
#include <str_util.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

Go to the source code of this file.

Macros

#define MBG_FIRST_COPYRIGHT_YEAR   2013
 
#define MBG_LAST_COPYRIGHT_YEAR   0
 

Functions

static FILE * fopen_log (const char *mode)
 
static int do_mbgcmptime (MBG_DEV_HANDLE dh, const PCPS_DEV *p_dev)
 
static void usage (void)
 
int main (int argc, char *argv[])
 

Variables

static const char * pname = "mbgcmptime"
 
static int loops
 
static int read_fast
 
static int read_raw
 
static long sleep_secs
 
static long sleep_usecs
 
static int print_raw
 
static double warn_limit
 
static double chk_limit
 
static int auto_offset
 
static int check_status
 
static int quiet
 
static const char * log_fn
 
MBG_PC_CYCLES_FREQUENCY cyc_freq
 Must be set up tby the application. More...
 
static const char * ref_dev_param
 
static MBG_DEV_HANDLE dh_ref
 
static PCPS_DEV dev_info_ref
 
static const char term_clreol [] = "\x1B[0K"
 

Macro Definition Documentation

◆ MBG_FIRST_COPYRIGHT_YEAR

#define MBG_FIRST_COPYRIGHT_YEAR   2013

Definition at line 52 of file mbgcmptime.c.

Referenced by main().

◆ MBG_LAST_COPYRIGHT_YEAR

#define MBG_LAST_COPYRIGHT_YEAR   0

Definition at line 53 of file mbgcmptime.c.

Referenced by main().

Function Documentation

◆ do_mbgcmptime()

◆ fopen_log()

static FILE* fopen_log ( const char *  mode)
static

Definition at line 83 of file mbgcmptime.c.

References log_fn.

Referenced by do_mbgcmptime(), and main().

◆ main()

◆ usage()

static void usage ( void  )
static

Variable Documentation

◆ auto_offset

int auto_offset
static

Definition at line 66 of file mbgcmptime.c.

Referenced by do_mbgcmptime(), and main().

◆ check_status

int check_status
static

Definition at line 67 of file mbgcmptime.c.

Referenced by do_mbgcmptime(), and main().

◆ chk_limit

double chk_limit
static

Definition at line 65 of file mbgcmptime.c.

Referenced by do_mbgcmptime(), and main().

◆ cyc_freq

Must be set up tby the application.

Definition at line 72 of file mbgcmptime.c.

Referenced by do_mbgcmptime().

◆ dev_info_ref

PCPS_DEV dev_info_ref
static

Definition at line 76 of file mbgcmptime.c.

◆ dh_ref

MBG_DEV_HANDLE dh_ref
static

Definition at line 75 of file mbgcmptime.c.

◆ log_fn

const char* log_fn
static

Definition at line 70 of file mbgcmptime.c.

Referenced by do_mbgcmptime(), fopen_log(), and main().

◆ loops

int loops
static

Definition at line 58 of file mbgcmptime.c.

Referenced by do_mbgcmptime(), and main().

◆ pname

const char* pname = "mbgcmptime"
static

Definition at line 55 of file mbgcmptime.c.

Referenced by main(), and usage().

◆ print_raw

int print_raw
static

Definition at line 63 of file mbgcmptime.c.

Referenced by do_mbgcmptime().

◆ quiet

int quiet
static

Definition at line 68 of file mbgcmptime.c.

Referenced by do_mbgcmptime(), and main().

◆ read_fast

int read_fast
static

Definition at line 59 of file mbgcmptime.c.

Referenced by do_mbgcmptime(), and main().

◆ read_raw

int read_raw
static

Definition at line 60 of file mbgcmptime.c.

Referenced by main().

◆ ref_dev_param

const char* ref_dev_param
static

Definition at line 74 of file mbgcmptime.c.

Referenced by main().

◆ sleep_secs

long sleep_secs
static

Definition at line 61 of file mbgcmptime.c.

Referenced by do_mbgcmptime(), and main().

◆ sleep_usecs

long sleep_usecs
static

Definition at line 62 of file mbgcmptime.c.

Referenced by do_mbgcmptime(), and main().

◆ term_clreol

const char term_clreol[] = "\x1B[0K"
static

Definition at line 78 of file mbgcmptime.c.

Referenced by do_mbgcmptime().

◆ warn_limit

double warn_limit
static

Definition at line 64 of file mbgcmptime.c.

Referenced by do_mbgcmptime(), and main().