mbgtools-lx
4.2.8
|
#include <mbgdevio.h>
#include <mbgutil.h>
#include <mbgtime.h>
#include <pcpsmktm.h>
#include <pcpslstr.h>
#include <myutil.h>
#include <toolutil.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
Go to the source code of this file.
Macros | |
#define | MBG_FIRST_COPYRIGHT_YEAR 2003 |
#define | MBG_LAST_COPYRIGHT_YEAR 0 |
Functions | |
static int | snprint_hours_mins (char *s, size_t max_len, long num_minutes) |
static void | print_cfg_rx (const char *info, const char *msg) |
static void | print_cfg_tx (const char *info, const char *msg) |
static void | set_new_icode_rx (char *s) |
static void | set_new_ref_offs (char *s) |
static void | set_ref_offs_not_cfgd (void) |
static void | set_new_str_utc (char *s) |
static void | set_new_icode_tx (char *s) |
static void | set_new_irig_tx_local (char *s) |
static void | set_new_tfom_flag (char *s, IRIG_SETTINGS *p, int *changed_flag, int *err_flag) |
static int | chk_dev_rx (const PCPS_DEV *p_dev) |
static int | chk_dev_tx (const PCPS_DEV *p_dev) |
static void | check_cmd_line (int argc, char *argv[], const PCPS_DEV *p_dev) |
static void | usage (void) |
static int | do_mbgirigcfg (MBG_DEV_HANDLE dh, const PCPS_DEV *p_dev) |
int | main (int argc, char *argv[]) |
Variables | |
static const char | pname [] = "mbgirigcfg" |
static int | glb_argc |
static char ** | glb_argv |
static const char | str_yes [] = "YES" |
static const char | str_no [] = "NO" |
static const char | str_not_supp [] = " (not supp. by this frame type)" |
static const char | info_curr [] = "Current" |
static const char | info_new [] = "New" |
static const char | msg_rx [] = DEFAULT_OPT_NAME_IRIG_RX_EN |
static const char | msg_tx [] = DEFAULT_OPT_NAME_IRIG_TX_EN |
static IRIG_INFO | irig_rx_info |
static IRIG_INFO | irig_tx_info |
static MBG_REF_OFFS | ref_offs |
static MBG_OPT_INFO | opt_info |
static int | cfg_err_rx |
static int | cfg_err_tx |
static int | changed_cfg_rx |
static int | changed_cfg_tx |
static int | warned_no_rx |
static int | warned_no_tx |
static int | must_print_help_info |
static const char * | icode_rx_names [N_ICODE_RX] = DEFAULT_ICODE_RX_NAMES |
static const char * | icode_rx_descr [N_ICODE_RX] = DEFAULT_ICODE_RX_DESCRIPTIONS_ENG |
static const char * | icode_tx_names [N_ICODE_TX] = DEFAULT_ICODE_TX_NAMES |
static const char * | icode_tx_descr [N_ICODE_TX] = DEFAULT_ICODE_TX_DESCRIPTIONS_ENG |
static char | str_ref_offs_min [16] |
static char | str_ref_offs_max [16] |
static MBG_DEV_HANDLER_FNC | do_mbgirigcfg |
#define MBG_FIRST_COPYRIGHT_YEAR 2003 |
Definition at line 78 of file mbgirigcfg.c.
Referenced by main().
#define MBG_LAST_COPYRIGHT_YEAR 0 |
Definition at line 79 of file mbgirigcfg.c.
Referenced by main().
|
static |
Definition at line 453 of file mbgirigcfg.c.
References cfg_err_rx, cfg_err_tx, changed_cfg_rx, changed_cfg_tx, chk_dev_rx(), chk_dev_tx(), must_print_usage, set_new_icode_rx(), set_new_icode_tx(), set_new_irig_tx_local(), set_new_ref_offs(), set_new_str_utc(), set_new_tfom_flag(), set_ref_offs_not_cfgd(), and IRIG_INFO::settings.
Referenced by do_mbgirigcfg(), and main().
|
static |
Definition at line 407 of file mbgirigcfg.c.
References _pcps_is_irig_rx, cfg_err_rx, and warned_no_rx.
Referenced by check_cmd_line(), and do_mbgirigcfg().
|
static |
Definition at line 430 of file mbgirigcfg.c.
References _pcps_has_irig_tx, cfg_err_tx, and warned_no_tx.
Referenced by check_cmd_line(), and do_mbgirigcfg().
|
static |
Definition at line 632 of file mbgirigcfg.c.
References _pcps_has_irig, _pcps_has_irig_tx, _pcps_is_irig_rx, cfg_err_rx, cfg_err_tx, changed_cfg_rx, changed_cfg_tx, check_cmd_line(), chk_dev_rx(), chk_dev_tx(), glb_argc, glb_argv, info_curr, info_new, mbg_cond_err_msg(), MBG_ERR_CFG, MBG_ERR_NOT_SUPP_BY_DEV, mbg_get_all_irig_rx_info(), mbg_get_irig_tx_info(), mbg_save_all_irig_rx_settings(), mbg_set_irig_tx_settings(), MBG_SUCCESS, msg_rx, msg_tx, must_print_help_info, print_cfg_rx(), print_cfg_tx(), ref_offs, IRIG_INFO::settings, MBG_OPT_INFO::settings, warned_no_rx, and warned_no_tx.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 720 of file mbgirigcfg.c.
References check_cmd_line(), do_mbgirigcfg, glb_argc, glb_argv, MBG_EXIT_CODE_FAIL, MBG_EXIT_CODE_SUCCESS, MBG_EXIT_CODE_USAGE, MBG_FIRST_COPYRIGHT_YEAR, mbg_handle_devices(), MBG_LAST_COPYRIGHT_YEAR, mbg_print_program_info(), mbg_rc_is_success, MBG_REF_OFFS_MAX, must_print_help_info, must_print_usage, pname, snprint_hours_mins(), str_ref_offs_max, str_ref_offs_min, and usage().
|
static |
Definition at line 141 of file mbgirigcfg.c.
References _idx_bit, DEFAULT_IGNORE_RX_TFOM_EN, DEFAULT_STR_IRIG_FMT_EN, DEFAULT_STR_IRIG_OFFS_EN, DEFAULT_STR_IRIG_TIMESTR_UTC_EN, IRIG_SETTINGS::flags, MBG_OPT_SETTINGS::flags, IRIG_SETTINGS::icode, icode_rx_descr, icode_rx_names, IFLAGS_DISABLE_TFOM, MBG_OPT_FLAG_STR_UTC, MBG_REF_OFFS_MAX, MSK_ICODE_RX_HAS_TFOM, MSK_ICODE_RX_HAS_TZI, ref_offs, IRIG_INFO::settings, MBG_OPT_INFO::settings, snprint_hours_mins(), str_no, str_not_supp, str_yes, and MBG_OPT_INFO::supp_flags.
Referenced by do_mbgirigcfg().
|
static |
Definition at line 185 of file mbgirigcfg.c.
References _idx_bit, DEFAULT_STR_IRIG_FMT_EN, DEFAULT_STR_IRIG_OUTPUT_LOC_TM_EN, DEFAULT_STR_TFOM_ALWAYS_SYNC_EN, IRIG_SETTINGS::flags, IRIG_SETTINGS::icode, icode_tx_descr, icode_tx_names, IFLAGS_DISABLE_TFOM, IFLAGS_TX_GEN_LOCAL_TIME, MSK_ICODE_TX_HAS_TFOM, IRIG_INFO::settings, str_no, str_not_supp, and str_yes.
Referenced by do_mbgirigcfg().
|
static |
Definition at line 210 of file mbgirigcfg.c.
References _is_supported, cfg_err_rx, changed_cfg_rx, IRIG_SETTINGS::icode, icode_rx_names, N_ICODE_RX, IRIG_INFO::settings, and IRIG_INFO::supp_codes.
Referenced by check_cmd_line().
|
static |
Definition at line 332 of file mbgirigcfg.c.
References _is_supported, cfg_err_tx, changed_cfg_tx, IRIG_SETTINGS::icode, icode_tx_names, N_ICODE_TX, IRIG_INFO::settings, and IRIG_INFO::supp_codes.
Referenced by check_cmd_line().
|
static |
Definition at line 361 of file mbgirigcfg.c.
References cfg_err_tx, changed_cfg_tx, IRIG_SETTINGS::flags, IFLAGS_TX_GEN_LOCAL_TIME, and IRIG_INFO::settings.
Referenced by check_cmd_line().
|
static |
Definition at line 239 of file mbgirigcfg.c.
References cfg_err_rx, changed_cfg_rx, MBG_REF_OFFS_MAX, MINS_PER_HOUR, ref_offs, snprint_hours_mins(), str_ref_offs_max, and str_ref_offs_min.
Referenced by check_cmd_line().
|
static |
Definition at line 304 of file mbgirigcfg.c.
References cfg_err_rx, changed_cfg_rx, MBG_OPT_SETTINGS::flags, MBG_OPT_FLAG_STR_UTC, MBG_OPT_INFO::settings, and MBG_OPT_INFO::supp_flags.
Referenced by check_cmd_line().
|
static |
Definition at line 383 of file mbgirigcfg.c.
References _idx_bit, IRIG_SETTINGS::flags, IRIG_SETTINGS::icode, IFLAGS_DISABLE_TFOM, and MSK_ICODE_TX_HAS_TFOM.
Referenced by check_cmd_line().
|
static |
Definition at line 294 of file mbgirigcfg.c.
References changed_cfg_rx, MBG_REF_OFFS_NOT_CFGD, and ref_offs.
Referenced by check_cmd_line().
|
static |
Definition at line 122 of file mbgirigcfg.c.
References _int_from_size_t, mbg_snprintf(), and MINS_PER_HOUR.
Referenced by main(), print_cfg_rx(), and set_new_ref_offs().
|
static |
Definition at line 524 of file mbgirigcfg.c.
References icode_rx_descr, icode_rx_names, icode_tx_descr, icode_tx_names, N_ICODE_RX, N_ICODE_TX, pname, str_ref_offs_max, and str_ref_offs_min.
Referenced by main().
|
static |
Definition at line 101 of file mbgirigcfg.c.
Referenced by check_cmd_line(), chk_dev_rx(), do_mbgirigcfg(), set_new_icode_rx(), set_new_ref_offs(), and set_new_str_utc().
|
static |
Definition at line 102 of file mbgirigcfg.c.
Referenced by check_cmd_line(), chk_dev_tx(), do_mbgirigcfg(), set_new_icode_tx(), and set_new_irig_tx_local().
|
static |
Definition at line 103 of file mbgirigcfg.c.
Referenced by check_cmd_line(), do_mbgirigcfg(), set_new_icode_rx(), set_new_ref_offs(), set_new_str_utc(), and set_ref_offs_not_cfgd().
|
static |
Definition at line 104 of file mbgirigcfg.c.
Referenced by check_cmd_line(), do_mbgirigcfg(), set_new_icode_tx(), and set_new_irig_tx_local().
|
static |
Definition at line 716 of file mbgirigcfg.c.
Referenced by main().
|
static |
Definition at line 84 of file mbgirigcfg.c.
Referenced by do_mbgirigcfg(), and main().
|
static |
Definition at line 85 of file mbgirigcfg.c.
Referenced by do_mbgirigcfg(), and main().
|
static |
Definition at line 111 of file mbgirigcfg.c.
Referenced by print_cfg_rx(), and usage().
|
static |
Definition at line 110 of file mbgirigcfg.c.
Referenced by print_cfg_rx(), set_new_icode_rx(), and usage().
|
static |
Definition at line 114 of file mbgirigcfg.c.
Referenced by print_cfg_tx(), and usage().
|
static |
Definition at line 113 of file mbgirigcfg.c.
Referenced by print_cfg_tx(), set_new_icode_tx(), and usage().
|
static |
Definition at line 91 of file mbgirigcfg.c.
Referenced by do_mbgirigcfg().
|
static |
Definition at line 92 of file mbgirigcfg.c.
Referenced by do_mbgirigcfg().
|
static |
Definition at line 96 of file mbgirigcfg.c.
Referenced by do_mbgtcrcal(), and show_signal().
|
static |
Definition at line 97 of file mbgirigcfg.c.
|
static |
Definition at line 93 of file mbgirigcfg.c.
Referenced by do_mbgirigcfg().
|
static |
Definition at line 94 of file mbgirigcfg.c.
Referenced by do_mbgirigcfg().
|
static |
Definition at line 108 of file mbgirigcfg.c.
Referenced by do_mbgirigcfg(), and main().
|
static |
Definition at line 99 of file mbgirigcfg.c.
|
static |
Definition at line 81 of file mbgirigcfg.c.
|
static |
Definition at line 98 of file mbgirigcfg.c.
Referenced by do_mbgirigcfg(), print_cfg_rx(), set_new_ref_offs(), set_ref_offs_not_cfgd(), show_signal(), and show_time_and_status().
|
static |
Definition at line 88 of file mbgirigcfg.c.
Referenced by print_cfg_rx(), and print_cfg_tx().
|
static |
Definition at line 89 of file mbgirigcfg.c.
Referenced by print_cfg_rx(), and print_cfg_tx().
|
static |
Definition at line 117 of file mbgirigcfg.c.
Referenced by main(), set_new_ref_offs(), and usage().
|
static |
Definition at line 116 of file mbgirigcfg.c.
Referenced by main(), set_new_ref_offs(), and usage().
|
static |
Definition at line 87 of file mbgirigcfg.c.
Referenced by print_cfg_rx(), and print_cfg_tx().
|
static |
Definition at line 105 of file mbgirigcfg.c.
Referenced by chk_dev_rx(), and do_mbgirigcfg().
|
static |
Definition at line 106 of file mbgirigcfg.c.
Referenced by chk_dev_tx(), and do_mbgirigcfg().