mbgtools-lx  4.2.8
Extended multi ref definitions

Data Structures

struct  XMULTI_REF_ID
 Identifier for a reference source. More...
 
struct  XMULTI_REF_SETTINGS
 Reference source configuration settings. More...
 
struct  XMULTI_REF_SETTINGS_IDX
 Reference source configuration for a specific priority level. More...
 
struct  XMULTI_REF_INFO
 Reference source capabilities and current configuration. More...
 
struct  XMULTI_REF_INFO_IDX
 Reference source capabilities and current configuration for a specific priority level. More...
 
struct  XMULTI_REF_STATUS
 Status information on a single ref time source. More...
 
struct  XMULTI_REF_STATUS_IDX
 Status information on a ref time source at a specific priority level. More...
 
struct  XMULTI_REF_INSTANCES
 General info on supported XMR sources and instances. More...
 
struct  XMR_HOLDOVER_STATUS
 XMR holdover status. More...
 
struct  XMR_EXT_SRC_INFO
 
struct  XMR_EXT_SRC_INFO_IDX
 
struct  XMR_STATS
 XMR statistics for a particular source. More...
 
struct  XMR_STATS_IDX
 XMR statistics for a particular source, with index. More...
 
struct  XMR_METRICS
 
struct  XMR_METRICS_IDX
 XMR timing metrics for a particular source, with index. More...
 
struct  XMR_QL_SETTINGS
 supported limits for qualtity metrics More...
 
struct  XMR_QL_INFO
 
struct  XMR_QL_SETTINGS_IDX
 
struct  XMR_QL_INFO_IDX
 

Macros

#define _mbg_swab_xmulti_ref_id(_p)
 
#define _mbg_swab_xmulti_ref_settings(_p)
 
#define _mbg_swab_xmulti_ref_settings_idx(_p)
 
#define _mbg_swab_xmulti_ref_info(_p)
 
#define _mbg_swab_xmulti_ref_info_idx(_p)
 
#define _mbg_swab_xmulti_ref_status(_p)
 
#define _mbg_swab_xmulti_ref_status_idx(_p)
 
#define XMR_QL_TDEV_MASK   ( 0x03 << 0 )
 
#define XMR_QL_MTIE_MASK   ( 0x03 << 2 )
 
#define _GET_XMR_QL_TDEV(_x)   ( ( ( _x ) & XMR_QL_TDEV_MASK ) >> 0 )
 
#define _PUT_XMR_QL_TDEV(_x, _ql)
 
#define _GET_XMR_QL_MTIE(_x)   ( ( ( _x ) & XMR_QL_MTIE_MASK ) >> 2 )
 
#define _PUT_XMR_QL_MTIE(_x, _ql)
 
#define MBG_XMRS_STATUS_STRS
 XMRS status bit name strings. More...
 
#define XMULTI_REF_STATUS_INVALID
 
#define _mbg_swab_xmulti_ref_instances(_p)
 
#define _mbg_swab_xmr_holdover_intv(_p)   _mbg_swab32( _p )
 
#define XMR_PRIO_LVL_UNSPEC   -1
 A code used to indicate that a input source table index is unspecified. More...
 
#define _mbg_swab_xmr_holdover_status(_p)
 
#define XMR_HOLDOVER_STATUS_MODE_NAMES
 String initializers for XMR holdover status mode. More...
 
#define _mbg_swab_xmr_ext_src_info(_p)
 
#define _mbg_swab_xmr_ext_src_info_idx(_p)
 
#define _mbg_swab_xmr_stats(_p)
 
#define DEFAULT_XMR_STATS_FLAG_NAMES
 String initializers for XMR Stats Flags. More...
 
#define _mbg_swab_xmr_stats_idx(_p)
 
#define MAX_XMR_METRICS   20
 
#define _mbg_swab_xmr_metrics(_p)
 
#define _fpu32_to_double_fac(_x)   ( 1.0 / ( 4294967296.0 * ( _x ) ) )
 
#define _mbg_swab_xmr_metrics_idx(_p)
 
#define ITU_LIMIT_SHORT_STRS
 String initializers for ITU limit masks. More...
 

Typedefs

typedef uint32_t XMR_HOLDOVER_INTV
 XMR holdover interval, or elapsed holdover time, in [s]. More...
 

Enumerations

enum  XMR_SETTINGS_FLAG_BITS {
  XMRSF_BIT_AUTO_BIAS_MASTER, XMRSF_BIT_AUTO_BIAS_SLAVE, XMRSF_BIT_ASYMMETRY_STEP_DETECTION, XMRSF_BIT_IS_TRUSTED_SRC,
  XMRSF_BIT_USE_TRUSTED_SRC, XMRSF_BIT_IS_TIME_OF_DAY_SRC, XMRSF_BIT_IS_PHASE_SRC, N_XMRSF_BITS
}
 Bit masks used to define XMR_SETTINGS_FLAG_MSKS. More...
 
enum  XMR_SETTINGS_FLAG_MSKS {
  XMRSF_MSK_AUTO_BIAS_MASTER = ( 1UL << XMRSF_BIT_AUTO_BIAS_MASTER ), XMRSF_MSK_AUTO_BIAS_SLAVE = ( 1UL << XMRSF_BIT_AUTO_BIAS_SLAVE ), XMRSF_MSK_ASYMMETRY_STEP_DETECTION = ( 1UL << XMRSF_BIT_ASYMMETRY_STEP_DETECTION ), XMRSF_MSK_IS_TRUSTED_SRC = ( 1UL << XMRSF_BIT_IS_TRUSTED_SRC ),
  XMRSF_MSK_USE_TRUSTED_SRC = ( 1UL << XMRSF_BIT_USE_TRUSTED_SRC ), XMRSF_MSK_IS_TIME_OF_DAY_SRC = ( 1UL << XMRSF_BIT_IS_TIME_OF_DAY_SRC ), XMRSF_MSK_IS_PHASE_SRC = ( 1UL << XMRSF_BIT_IS_PHASE_SRC )
}
 Bit masks used with XMULTI_REF_SETTINGS::flags and XMR_EXT_SRC_INFO::supp_flags. More...
 
enum  XMR_QL {
  XMR_QL_UNKNOWN, XMR_QL_GREEN, XMR_QL_YELLOW, XMR_QL_RED,
  N_XMR_QL
}
 ::TODO More...
 
enum  XMR_REF_STATUS_BITS {
  XMRS_BIT_NOT_SUPP, XMRS_BIT_NO_CONN, XMRS_BIT_NO_SIGNAL, XMRS_BIT_IS_MASTER,
  XMRS_BIT_IS_LOCKED, XMRS_BIT_IS_ACCURATE, XMRS_BIT_NOT_SETTLED, XMRS_BIT_NOT_PHASE_LOCKED,
  XMRS_BIT_NUM_SRC_EXC, XMRS_BIT_IS_EXTERNAL, XMRS_BIT_LOW_JITTER, XMRS_BIT_ITU_LIMIT_VIOLATED,
  XMRS_BIT_TRS_LIMIT_VIOLATED, N_XMRS_BITS
}
 XMULTI_REF status bits. More...
 
enum  XMR_INST_FLAGS {
  XMRIF_BIT_MRF_NONE_SUPP, XMRIF_BIT_HOLDOVER_STATUS_SUPP, XMRIF_BIT_EXT_SRC_INFO_SUPP, XMRIF_BIT_GNSS_BIAS_SUPP,
  N_XMRIF_BITS
}
 Enumeration of flag bits used with XMULTI_REF instances. More...
 
enum  XMR_INST_FLAG_BIT_MASKS { XMRIF_MSK_MRF_NONE_SUPP = ( 1UL << XMRIF_BIT_MRF_NONE_SUPP ), XMRIF_MSK_HOLDOVER_STATUS_SUPP = ( 1UL << XMRIF_BIT_HOLDOVER_STATUS_SUPP ), XMRIF_MSK_EXT_SRC_INFO_SUPP = ( 1UL << XMRIF_BIT_EXT_SRC_INFO_SUPP ), XMRIF_MSK_GNSS_BIAS_SUPP = ( 1UL << XMRIF_BIT_GNSS_BIAS_SUPP ) }
 Bit masks associated with XMR_INST_FLAGS. More...
 
enum  XMR_HOLDOVER_STATUS_MODES { XMR_HLDOVR_AUTONOMOUS, XMR_HLDOVR_PRE_AUTONOMOUS, XMR_HLDOVR_REMOTE, N_XMR_HOLDOVER_STATUS_MODES }
 XMR holdover status modes. More...
 
enum  XMR_HOLDOVER_STATUS_FLAG_BITS {
  XMR_HLDOVR_BIT_IN_HOLDOVER, XMR_HLDOVR_BIT_TRANSITION_ENBD, XMR_HLDOVR_BIT_IN_TRANSITION, XMR_HLDOVR_BIT_TIME_OFFS_VALID,
  N_XMR_HOLDOVER_STATUS_FLAG_BITS
}
 XMR holdover status flag bits. More...
 
enum  XMR_HOLDOVER_STATUS_FLAG_MASKS { XMR_HLDOVR_MSK_IN_HOLDOVER = ( 1UL << XMR_HLDOVR_BIT_IN_HOLDOVER ), XMR_HLDOVR_MSK_TRANSITION_ENBD = ( 1UL << XMR_HLDOVR_BIT_TRANSITION_ENBD ), XMR_HLDOVR_MSK_IN_TRANSITION = ( 1UL << XMR_HLDOVR_BIT_IN_TRANSITION ), XMR_HLDOVR_MSK_TIME_OFFS_VALID = ( 1UL << XMR_HLDOVR_BIT_TIME_OFFS_VALID ) }
 XMR holdover status flag masks. More...
 
enum  XMR_EXT_SRC_FEAT_FLAG_BITS { XMR_EXT_SRC_FEAT_FLAG_BIT_STATS, XMR_EXT_SRC_FEAT_FLAG_BIT_METRICS, XMR_EXT_SRC_FEAT_FLAG_BIT_COASTING, N_XMR_EXT_SRC_FEAT_FLAG_BITS }
 XMR source feature flag bits. More...
 
enum  XMR_EXT_SRC_FEAT_FLAG_MSKS { XMR_EXT_SRC_FEAT_FLAG_MSK_STATS = ( 1UL << XMR_EXT_SRC_FEAT_FLAG_BIT_STATS ), XMR_EXT_SRC_FEAT_FLAG_MSK_METRICS = ( 1UL << XMR_EXT_SRC_FEAT_FLAG_BIT_METRICS ), XMR_EXT_SRC_FEAT_FLAG_MSK_COASTING = ( 1UL << XMR_EXT_SRC_FEAT_FLAG_BIT_COASTING ) }
 XMR source feature flag bit masks. More...
 
enum  XMR_STATS_FLAGS_BITS { XMR_STATS_FLAG_BIT_STEP_DETECTED, XMR_STATS_FLAG_BIT_STEP_COMPENSATED, XMR_STATS_FLAG_BIT_AUTO_BIAS_VALID, N_XMR_STATS_FLAGS_BITS }
 Enumeration of bits used to define XMR_STATS_FLAGS_MSKS. More...
 
enum  XMR_STATS_FLAGS_MSKS { XMR_STATS_FLAG_MSK_STEP_DETECTED = ( 1UL << XMR_STATS_FLAG_BIT_STEP_DETECTED ), XMR_STATS_FLAG_MSK_STEP_COMPENSATED = ( 1UL << XMR_STATS_FLAG_BIT_STEP_COMPENSATED ), XMR_STATS_FLAG_MSK_AUTO_BIAS_VALID = ( 1UL << XMR_STATS_FLAG_BIT_AUTO_BIAS_VALID ) }
 Flag bit masks used with XMR_STATS::flags. More...
 
enum  ITU_LIMITS {
  ITU_LIMIT_G811_PRC, ITU_LIMIT_G823_SSU, ITU_LIMIT_G823_SEC, ITU_LIMIT_G8272_PRTC,
  ITU_LIMIT_G82721_EPRTC, N_ITU_LIMITS
}
 Enumeration of ITU limit masks. More...
 
enum  ITU_LIMIT_MASKS {
  MSK_ITU_LIMIT_G811_PRC = ( 1UL << ITU_LIMIT_G811_PRC ), MSK_ITU_LIMIT_G823_SSU = ( 1UL << ITU_LIMIT_G823_SSU ), MSK_ITU_LIMIT_G823_SEC = ( 1UL << ITU_LIMIT_G823_SEC ), MSK_ITU_LIMIT_G8272_PRTC = ( 1UL << ITU_LIMIT_G8272_PRTC ),
  MSK_ITU_LIMIT_G82721_EPRTC = ( 1UL << ITU_LIMIT_G82721_EPRTC )
}
 Enumeration of ITU limit masks. More...
 
#define XMRS_MSK_NOT_SUPP   ( 1UL << XMRS_BIT_NOT_SUPP )
 Bit masks associated with XMR_REF_STATUS_BITS. More...
 
#define XMRS_MSK_NO_CONN   ( 1UL << XMRS_BIT_NO_CONN )
 see XMRS_BIT_NO_CONN More...
 
#define XMRS_MSK_NO_SIGNAL   ( 1UL << XMRS_BIT_NO_SIGNAL )
 see XMRS_BIT_NO_SIGNAL More...
 
#define XMRS_MSK_IS_MASTER   ( 1UL << XMRS_BIT_IS_MASTER )
 see XMRS_BIT_IS_MASTER More...
 
#define XMRS_MSK_IS_LOCKED   ( 1UL << XMRS_BIT_IS_LOCKED )
 see XMRS_BIT_IS_LOCKED More...
 
#define XMRS_MSK_IS_ACCURATE   ( 1UL << XMRS_BIT_IS_ACCURATE )
 see XMRS_BIT_IS_ACCURATE More...
 
#define XMRS_MSK_NOT_SETTLED   ( 1UL << XMRS_BIT_NOT_SETTLED )
 see XMRS_BIT_NOT_SETTLED More...
 
#define XMRS_MSK_NOT_PHASE_LOCKED   ( 1UL << XMRS_BIT_NOT_PHASE_LOCKED )
 see XMRS_BIT_NOT_PHASE_LOCKED More...
 
#define XMRS_MSK_NUM_SRC_EXC   ( 1UL << XMRS_BIT_NUM_SRC_EXC )
 see XMRS_BIT_NUM_SRC_EXC More...
 
#define XMRS_MSK_IS_EXTERNAL   ( 1UL << XMRS_BIT_IS_EXTERNAL )
 see XMRS_BIT_IS_EXTERNAL More...
 
#define XMRS_MSK_LOW_JITTER   ( 1UL << XMRS_BIT_LOW_JITTER )
 see XMRS_BIT_LOW_JITTER More...
 
#define XMRS_MSK_ITU_LIMIT_VIOLATED   ( 1UL << XMRS_BIT_ITU_LIMIT_VIOLATED )
 see XMRS_BIT_ITU_LIMIT_VIOLATED More...
 
#define XMRS_MSK_TRS_LIMIT_VIOLATED   ( 1UL << XMRS_BIT_TRS_LIMIT_VIOLATED )
 see XMRS_BIT_TRS_LIMIT_VIOLATED More...
 

Detailed Description

If the GPS_HAS_XMULTI_REF feature is set in RECEIVER_INFO::features then the XMULTI_REF (extended multi ref, XMR) feature and API are supported and have to be used in favor of the older multi ref API (see Definitions used with the old multi ref API).

Devices supporting the XMULTI_REF feature provide a number of priority levels addressed by the priority index, starting at 0 for highest priority. A single reference time source from the set of supported sources can be assigned to each priority level.

These structures are used to configure the individual time source for each priority level, and retrieve the status of the time source at each priority level.

If GPS_HAS_XMRS_MULT_INSTC is also set in RECEIVER_INFO::features then XMULTI_REF_INSTANCES can be used to find out which types of input source are supported (XMULTI_REF_INSTANCES::n_inst array entries != 0), and how many priority levels are supported to which an input source can be assigned (XMULTI_REF_INSTANCES::n_xmr_settings).

If XMRIF_MSK_HOLDOVER_STATUS_SUPP is set in XMULTI_REF_INSTANCES::flags then XMR_HOLDOVER_STATUS can be used to monitor the switching between different time sources when they become available or unavailable.

If an XMR time source at a high priority level becomes unavailable the XMR control function tries to find and switch to a different time source at a lower level of the priority list, which is still available.

On the other hand, if a time source at a higher priority level becomes available again, the XMR control function switches over to the time source at the higher priority even if the current time source is still available.

If the accuracy of the time source at the next priority level is better than the accuracy of the time source at the current priority level then switching can be done immediately. However, if the next time source is worse than the current one it makes more sense to switch only after a certain holdover interval.

The holdover interval is computed so that the time error due to the expected drift of the previously disciplined time base grows until it reaches the accuracy level of the next available reference time source.

Only if the time source at the current priority level is still unavailable when the holdover interval expires the reference time source is switched to the time source at the next available priority level.

Macro Definition Documentation

◆ _fpu32_to_double_fac

#define _fpu32_to_double_fac (   _x)    ( 1.0 / ( 4294967296.0 * ( _x ) ) )

Definition at line 7459 of file gpsdefs.h.

◆ _GET_XMR_QL_MTIE

#define _GET_XMR_QL_MTIE (   _x)    ( ( ( _x ) & XMR_QL_MTIE_MASK ) >> 2 )

Definition at line 6933 of file gpsdefs.h.

◆ _GET_XMR_QL_TDEV

#define _GET_XMR_QL_TDEV (   _x)    ( ( ( _x ) & XMR_QL_TDEV_MASK ) >> 0 )

Definition at line 6926 of file gpsdefs.h.

◆ _mbg_swab_xmr_ext_src_info

#define _mbg_swab_xmr_ext_src_info (   _p)
Value:
do \
{ \
_mbg_swab16( &(_p)->supp_flags ); \
_mbg_swab16( &(_p)->feat_flags ); \
_mbg_swab32( &(_p)->reserved_0 ); \
} while ( 0 )

Definition at line 7285 of file gpsdefs.h.

◆ _mbg_swab_xmr_ext_src_info_idx

#define _mbg_swab_xmr_ext_src_info_idx (   _p)
Value:
do \
{ \
_mbg_swab16( &(_p)->idx ); \
_mbg_swab_xmr_ext_src_info( &(_p)->info ); \
} while ( 0 )

Definition at line 7302 of file gpsdefs.h.

Referenced by mbgextio_get_xmr_ext_src_info_idx().

◆ _mbg_swab_xmr_holdover_intv

#define _mbg_swab_xmr_holdover_intv (   _p)    _mbg_swab32( _p )

◆ _mbg_swab_xmr_holdover_status

#define _mbg_swab_xmr_holdover_status (   _p)
Value:
do \
{ \
_mbg_swab8( &(_p)->mode ); \
_mbg_swab8( &(_p)->curr_prio ); \
_mbg_swab8( &(_p)->nxt_prio ); \
_mbg_swab8( &(_p)->remote_watchdog ); \
_mbg_swab32( &(_p)->time_offset_ns ); \
_mbg_swab_xmr_holdover_intv( &(_p)->elapsed ); \
_mbg_swab_xmr_holdover_intv( &(_p)->interval ); \
_mbg_swab32( &(_p)->flags ); \
} while ( 0 )
int mode
Definition: ntp_shm.h:65

Definition at line 7170 of file gpsdefs.h.

Referenced by mbg_get_xmr_holdover_status(), and mbgextio_get_xmr_holdover_status().

◆ _mbg_swab_xmr_metrics

#define _mbg_swab_xmr_metrics (   _p)
Value:
do \
{ \
int i; \
_mbg_swab32( &(_p)->timestamp ); \
_mbg_swab32( &(_p)->flags ); \
_mbg_swab8( &(_p)->mtie_scale ); \
_mbg_swab8( &(_p)->tdev_scale ); \
_mbg_swab16( &(_p)->reserved_0 ); \
_mbg_swab32( &(_p)->reserved_1 ); \
_mbg_swab32( &(_p)->reserved_2 ); \
\
for ( i = 0; i < MAX_XMR_METRICS; i++ ) \
_mbg_swab32( &(_p)->mtie[i] ); \
\
for ( i = 0; i < MAX_XMR_METRICS; i++ ) \
_mbg_swab32( &(_p)->tdev[i] ); \
\
} while ( 0 )
#define MAX_XMR_METRICS
Definition: gpsdefs.h:7419
#define _mbg_swab32(_p)
Definition: mbg_arch.h:174

Definition at line 7435 of file gpsdefs.h.

◆ _mbg_swab_xmr_metrics_idx

#define _mbg_swab_xmr_metrics_idx (   _p)
Value:
do \
{ \
_mbg_swab16( &(_p)->idx ); \
_mbg_swab_xmr_metrics( &(_p)->metrics ); \
} while ( 0 )

Definition at line 7475 of file gpsdefs.h.

Referenced by mbgextio_get_xmr_ext_source_metrics_idx().

◆ _mbg_swab_xmr_stats

#define _mbg_swab_xmr_stats (   _p)
Value:
do \
{ \
_mbg_swab32( &(_p)->timestamp ); \
_mbg_swab_nano_time( &(_p)->last_mue ); \
_mbg_swab_nano_time( &(_p)->last_sigma ); \
_mbg_swab_nano_time( &(_p)->last_max ); \
_mbg_swab_nano_time( &(_p)->last_min ); \
_mbg_swab_nano_time( &(_p)->reserved_0 ); \
_mbg_swab_nano_time( &(_p)->step_comp_val ); \
_mbg_swab_nano_time( &(_p)->auto_bias ); \
_mbg_swab32( &(_p)->reserved_1 ); \
_mbg_swab32( &(_p)->reserved_2 ); \
_mbg_swab32( &(_p)->flags ); \
} while ( 0 )

Definition at line 7337 of file gpsdefs.h.

◆ _mbg_swab_xmr_stats_idx

#define _mbg_swab_xmr_stats_idx (   _p)
Value:
do \
{ \
_mbg_swab16( &(_p)->idx ); \
_mbg_swab_xmr_stats( &(_p)->stats ); \
} while ( 0 )

Definition at line 7410 of file gpsdefs.h.

Referenced by mbgextio_get_xmr_ext_source_stats_idx().

◆ _mbg_swab_xmulti_ref_id

#define _mbg_swab_xmulti_ref_id (   _p)
Value:
do \
{ \
_mbg_swab8( &(_p)->type ); \
_mbg_swab8( &(_p)->instance ); \
} while ( 0 )

Definition at line 6708 of file gpsdefs.h.

◆ _mbg_swab_xmulti_ref_info

#define _mbg_swab_xmulti_ref_info (   _p)
Value:
do \
{ \
_mbg_swab_xmulti_ref_settings( &(_p)->settings ); \
_mbg_swab32( &(_p)->supp_ref ); \
_mbg_swab8( &(_p)->n_supp_ref ); \
_mbg_swab8( &(_p)->n_prio ); \
_mbg_swab16( &(_p)->flags ); \
} while ( 0 )

Definition at line 6824 of file gpsdefs.h.

◆ _mbg_swab_xmulti_ref_info_idx

#define _mbg_swab_xmulti_ref_info_idx (   _p)
Value:
do \
{ \
_mbg_swab16( &(_p)->idx ); \
_mbg_swab_xmulti_ref_info( &(_p)->info ); \
} while ( 0 )

Definition at line 6846 of file gpsdefs.h.

Referenced by mbg_get_gps_all_xmr_info(), and mbgextio_get_xmr_info_idx().

◆ _mbg_swab_xmulti_ref_instances

#define _mbg_swab_xmulti_ref_instances (   _p)
Value:
do \
{ \
_mbg_swab32( &(_p)->flags ); \
_mbg_swab16( &(_p)->n_xmr_settings ); \
} while ( 0 )

Definition at line 7064 of file gpsdefs.h.

Referenced by mbg_get_xmr_instances(), and mbgextio_get_xmr_instances().

◆ _mbg_swab_xmulti_ref_settings

#define _mbg_swab_xmulti_ref_settings (   _p)
Value:
do \
{ \
_mbg_swab_xmulti_ref_id( &(_p)->id ); \
_mbg_swab16( &(_p)->flags ); \
_mbg_swab_nano_time( &(_p)->bias ); \
_mbg_swab_nano_time( &(_p)->precision ); \
_mbg_swab32( &(_p)->reserved ); \
} while ( 0 )
int precision
Definition: ntp_shm.h:80

Definition at line 6730 of file gpsdefs.h.

◆ _mbg_swab_xmulti_ref_settings_idx

#define _mbg_swab_xmulti_ref_settings_idx (   _p)
Value:
do \
{ \
_mbg_swab16( &(_p)->idx ); \
_mbg_swab_xmulti_ref_settings( &(_p)->settings ); \
} while ( 0 )

Definition at line 6756 of file gpsdefs.h.

Referenced by mbg_set_gps_xmr_settings_idx(), and mbgextio_set_xmr_settings_idx().

◆ _mbg_swab_xmulti_ref_status

#define _mbg_swab_xmulti_ref_status (   _p)
Value:
do \
{ \
_mbg_swab_xmulti_ref_id( &(_p)->id ); \
_mbg_swab16( &(_p)->status ); \
_mbg_swab_nano_time( &(_p)->offset ); \
_mbg_swab16( &(_p)->flags ); \
_mbg_swab8( &(_p)->ssm ); \
_mbg_swab8( &(_p)->soc ); \
} while ( 0 )

Definition at line 6869 of file gpsdefs.h.

◆ _mbg_swab_xmulti_ref_status_idx

#define _mbg_swab_xmulti_ref_status_idx (   _p)
Value:
do \
{ \
_mbg_swab16( &(_p)->idx ); \
_mbg_swab_xmulti_ref_status( &(_p)->status ); \
} while ( 0 )

Definition at line 6892 of file gpsdefs.h.

Referenced by mbg_get_gps_all_xmr_status(), and mbgextio_get_xmr_status_idx().

◆ _PUT_XMR_QL_MTIE

#define _PUT_XMR_QL_MTIE (   _x,
  _ql 
)
Value:
do { \
( _x ) = ( ( _x ) & ~XMR_QL_MTIE_MASK ) | ( ( ( _ql ) << 2 ) & XMR_QL_MTIE_MASK ); \
} while ( 0 )
#define XMR_QL_MTIE_MASK
Definition: gpsdefs.h:6924

Definition at line 6934 of file gpsdefs.h.

◆ _PUT_XMR_QL_TDEV

#define _PUT_XMR_QL_TDEV (   _x,
  _ql 
)
Value:
do { \
( _x ) = ( ( _x ) & ~XMR_QL_TDEV_MASK ) | ( ( ( _ql ) << 0 ) & XMR_QL_TDEV_MASK ); \
} while ( 0 )
#define XMR_QL_TDEV_MASK
Definition: gpsdefs.h:6923

Definition at line 6927 of file gpsdefs.h.

◆ DEFAULT_XMR_STATS_FLAG_NAMES

#define DEFAULT_XMR_STATS_FLAG_NAMES
Value:
{ \
"Step Detected", \
"Step Compensated", \
"Auto BIAS valid" \
}

String initializers for XMR Stats Flags.

See also
XMR_STATS_FLAGS_MSKS

Definition at line 7389 of file gpsdefs.h.

◆ ITU_LIMIT_SHORT_STRS

#define ITU_LIMIT_SHORT_STRS
Value:
{ \
"G811 (PRC)", \
"G823 (SSU)", \
"G823 (SEC)", \
"G8272 (PRTC)", \
"G82721 (ePRTC)" \
}

String initializers for ITU limit masks.

Used for detection of XMR_METRICS mask violation.

See also
ITU_LIMITS
XMR_METRICS

Definition at line 7531 of file gpsdefs.h.

◆ MAX_XMR_METRICS

#define MAX_XMR_METRICS   20

Definition at line 7419 of file gpsdefs.h.

◆ MBG_XMRS_STATUS_STRS

#define MBG_XMRS_STATUS_STRS
Value:
{ \
"Ref type not supported", \
"No connection", \
"No signal", \
"Is master", \
"Is locked", \
"Is accurate", \
"Not settled", \
"Phase not locked", \
"Number sources exceeds limit", \
"Is external", \
"Low jitter", \
"ITU Limit violated", \
"TRS Limit violated" \
}

XMRS status bit name strings.

See also
XMR_REF_STATUS_BITS

Definition at line 6996 of file gpsdefs.h.

◆ XMR_HOLDOVER_STATUS_MODE_NAMES

#define XMR_HOLDOVER_STATUS_MODE_NAMES
Value:
{ \
"Autonomous", \
"Pre-Autonomous", \
"Remote" \
}

String initializers for XMR holdover status mode.

See also
XMR_HOLDOVER_STATUS_MODES

Definition at line 7207 of file gpsdefs.h.

◆ XMR_PRIO_LVL_UNSPEC

#define XMR_PRIO_LVL_UNSPEC   -1

A code used to indicate that a input source table index is unspecified.

Definition at line 7126 of file gpsdefs.h.

◆ XMR_QL_MTIE_MASK

#define XMR_QL_MTIE_MASK   ( 0x03 << 2 )

Definition at line 6924 of file gpsdefs.h.

◆ XMR_QL_TDEV_MASK

#define XMR_QL_TDEV_MASK   ( 0x03 << 0 )

Definition at line 6923 of file gpsdefs.h.

◆ XMRS_MSK_IS_ACCURATE

#define XMRS_MSK_IS_ACCURATE   ( 1UL << XMRS_BIT_IS_ACCURATE )

see XMRS_BIT_IS_ACCURATE

Definition at line 6978 of file gpsdefs.h.

◆ XMRS_MSK_IS_EXTERNAL

#define XMRS_MSK_IS_EXTERNAL   ( 1UL << XMRS_BIT_IS_EXTERNAL )

see XMRS_BIT_IS_EXTERNAL

Definition at line 6982 of file gpsdefs.h.

◆ XMRS_MSK_IS_LOCKED

#define XMRS_MSK_IS_LOCKED   ( 1UL << XMRS_BIT_IS_LOCKED )

see XMRS_BIT_IS_LOCKED

Definition at line 6977 of file gpsdefs.h.

◆ XMRS_MSK_IS_MASTER

#define XMRS_MSK_IS_MASTER   ( 1UL << XMRS_BIT_IS_MASTER )

see XMRS_BIT_IS_MASTER

Definition at line 6976 of file gpsdefs.h.

◆ XMRS_MSK_ITU_LIMIT_VIOLATED

#define XMRS_MSK_ITU_LIMIT_VIOLATED   ( 1UL << XMRS_BIT_ITU_LIMIT_VIOLATED )

see XMRS_BIT_ITU_LIMIT_VIOLATED

Definition at line 6984 of file gpsdefs.h.

◆ XMRS_MSK_LOW_JITTER

#define XMRS_MSK_LOW_JITTER   ( 1UL << XMRS_BIT_LOW_JITTER )

see XMRS_BIT_LOW_JITTER

Definition at line 6983 of file gpsdefs.h.

◆ XMRS_MSK_NO_CONN

#define XMRS_MSK_NO_CONN   ( 1UL << XMRS_BIT_NO_CONN )

see XMRS_BIT_NO_CONN

Definition at line 6974 of file gpsdefs.h.

◆ XMRS_MSK_NO_SIGNAL

#define XMRS_MSK_NO_SIGNAL   ( 1UL << XMRS_BIT_NO_SIGNAL )

see XMRS_BIT_NO_SIGNAL

Definition at line 6975 of file gpsdefs.h.

◆ XMRS_MSK_NOT_PHASE_LOCKED

#define XMRS_MSK_NOT_PHASE_LOCKED   ( 1UL << XMRS_BIT_NOT_PHASE_LOCKED )

see XMRS_BIT_NOT_PHASE_LOCKED

Definition at line 6980 of file gpsdefs.h.

◆ XMRS_MSK_NOT_SETTLED

#define XMRS_MSK_NOT_SETTLED   ( 1UL << XMRS_BIT_NOT_SETTLED )

see XMRS_BIT_NOT_SETTLED

Definition at line 6979 of file gpsdefs.h.

◆ XMRS_MSK_NOT_SUPP

#define XMRS_MSK_NOT_SUPP   ( 1UL << XMRS_BIT_NOT_SUPP )

Bit masks associated with XMR_REF_STATUS_BITS.

Used with XMULTI_REF_STATUS::status.

See also
XMR_REF_STATUS_BITS

see XMRS_BIT_NOT_SUPP

Definition at line 6973 of file gpsdefs.h.

◆ XMRS_MSK_NUM_SRC_EXC

#define XMRS_MSK_NUM_SRC_EXC   ( 1UL << XMRS_BIT_NUM_SRC_EXC )

see XMRS_BIT_NUM_SRC_EXC

Definition at line 6981 of file gpsdefs.h.

◆ XMRS_MSK_TRS_LIMIT_VIOLATED

#define XMRS_MSK_TRS_LIMIT_VIOLATED   ( 1UL << XMRS_BIT_TRS_LIMIT_VIOLATED )

see XMRS_BIT_TRS_LIMIT_VIOLATED

Definition at line 6985 of file gpsdefs.h.

◆ XMULTI_REF_STATUS_INVALID

#define XMULTI_REF_STATUS_INVALID
Value:
{ \
{ (uint8_t) MULTI_REF_NONE, 0 }, /* id; instance 0 ? */ \
{ 0 }, /* offset */ \
0 /* reserved */ \
}
#define XMRS_MSK_NO_SIGNAL
see XMRS_BIT_NO_SIGNAL
Definition: gpsdefs.h:6975
unsigned char uint8_t
Definition: words.h:210
#define XMRS_MSK_NO_CONN
see XMRS_BIT_NO_CONN
Definition: gpsdefs.h:6974

Definition at line 7019 of file gpsdefs.h.

Typedef Documentation

◆ XMR_HOLDOVER_INTV

typedef uint32_t XMR_HOLDOVER_INTV

XMR holdover interval, or elapsed holdover time, in [s].

Definition at line 7116 of file gpsdefs.h.

Enumeration Type Documentation

◆ ITU_LIMIT_MASKS

Enumeration of ITU limit masks.

Used for detection of XMR_METRICS mask violation.

See also
ITU_LIMITS
XMR_METRICS
Enumerator
MSK_ITU_LIMIT_G811_PRC 
MSK_ITU_LIMIT_G823_SSU 
MSK_ITU_LIMIT_G823_SEC 
MSK_ITU_LIMIT_G8272_PRTC 
MSK_ITU_LIMIT_G82721_EPRTC 

Definition at line 7512 of file gpsdefs.h.

◆ ITU_LIMITS

enum ITU_LIMITS

Enumeration of ITU limit masks.

Used for detection of XMR_METRICS mask violation.

See also
ITU_LIMIT_MASKS
XMR_METRICS
Enumerator
ITU_LIMIT_G811_PRC 
ITU_LIMIT_G823_SSU 
ITU_LIMIT_G823_SEC 
ITU_LIMIT_G8272_PRTC 
ITU_LIMIT_G82721_EPRTC 
N_ITU_LIMITS 

Definition at line 7492 of file gpsdefs.h.

◆ XMR_EXT_SRC_FEAT_FLAG_BITS

XMR source feature flag bits.

Used to define XMR_EXT_SRC_FEAT_FLAG_MSKS

Enumerator
XMR_EXT_SRC_FEAT_FLAG_BIT_STATS 

XMR source provides XMR_STATS.

XMR_EXT_SRC_FEAT_FLAG_BIT_METRICS 

XMR source provides XMR_METRICS.

XMR_EXT_SRC_FEAT_FLAG_BIT_COASTING 

XMR source provides coasting mode.

N_XMR_EXT_SRC_FEAT_FLAG_BITS 

Definition at line 7251 of file gpsdefs.h.

◆ XMR_EXT_SRC_FEAT_FLAG_MSKS

XMR source feature flag bit masks.

Used with XMR_EXT_SRC_INFO::feat_flags.

See also
XMR_EXT_SRC_FEAT_FLAG_BITS
Enumerator
XMR_EXT_SRC_FEAT_FLAG_MSK_STATS 

see XMR_EXT_SRC_FEAT_FLAG_BIT_STATS

XMR_EXT_SRC_FEAT_FLAG_MSK_METRICS 

see XMR_EXT_SRC_FEAT_FLAG_BIT_METRICS

XMR_EXT_SRC_FEAT_FLAG_MSK_COASTING 

see XMR_EXT_SRC_FEAT_FLAG_BIT_COASTING

Definition at line 7268 of file gpsdefs.h.

◆ XMR_HOLDOVER_STATUS_FLAG_BITS

XMR holdover status flag bits.

Used to define XMR_HOLDOVER_STATUS_FLAG_MASKS.

Enumerator
XMR_HLDOVR_BIT_IN_HOLDOVER 

the device is currently in holdover mode

XMR_HLDOVR_BIT_TRANSITION_ENBD 

timebase is in transition (being slewed) after sources have been switched

XMR_HLDOVR_BIT_IN_TRANSITION 

transition is currently active, slewing in progress

XMR_HLDOVR_BIT_TIME_OFFS_VALID 

values in field XMR_HOLDOVER_STATUS::time_offset_ns are valid

N_XMR_HOLDOVER_STATUS_FLAG_BITS 

the number of known status flags

Definition at line 7221 of file gpsdefs.h.

◆ XMR_HOLDOVER_STATUS_FLAG_MASKS

XMR holdover status flag masks.

Used with XMR_HOLDOVER_STATUS::flags.

Enumerator
XMR_HLDOVR_MSK_IN_HOLDOVER 

see XMR_HLDOVR_BIT_IN_HOLDOVER

XMR_HLDOVR_MSK_TRANSITION_ENBD 

see XMR_HLDOVR_BIT_TRANSITION_ENBD

XMR_HLDOVR_MSK_IN_TRANSITION 

see XMR_HLDOVR_BIT_IN_TRANSITION

XMR_HLDOVR_MSK_TIME_OFFS_VALID 

see XMR_HLDOVR_BIT_TIME_OFFS_VALID

Definition at line 7236 of file gpsdefs.h.

◆ XMR_HOLDOVER_STATUS_MODES

XMR holdover status modes.

Used with XMR_HOLDOVER_STATUS::mode.

See also
XMR_HOLDOVER_STATUS_MODE_NAMES
Enumerator
XMR_HLDOVR_AUTONOMOUS 

autonomous mode, XMR sources are selected automatically by the device

XMR_HLDOVR_PRE_AUTONOMOUS 

going to switch to autonomous mode when XMR_HOLDOVER_STATUS::remote_watchdog reaches 0

XMR_HLDOVR_REMOTE 

remote mode, XMR switching done by external command/control

N_XMR_HOLDOVER_STATUS_MODES 

the number of known modes

Definition at line 7193 of file gpsdefs.h.

◆ XMR_INST_FLAG_BIT_MASKS

Bit masks associated with XMR_INST_FLAGS.

Used with XMULTI_REF_INSTANCES::flags.

See also
XMR_INST_FLAGS
Enumerator
XMRIF_MSK_MRF_NONE_SUPP 

see XMRIF_BIT_MRF_NONE_SUPP

XMRIF_MSK_HOLDOVER_STATUS_SUPP 

see XMRIF_BIT_HOLDOVER_STATUS_SUPP

XMRIF_MSK_EXT_SRC_INFO_SUPP 

see XMRIF_BIT_EXT_SRC_INFO_SUPP

XMRIF_MSK_GNSS_BIAS_SUPP 

see XMRIF_BIT_GNSS_BIAS_SUPP

Definition at line 7103 of file gpsdefs.h.

◆ XMR_INST_FLAGS

Enumeration of flag bits used with XMULTI_REF instances.

See also
XMR_INST_FLAG_BIT_MASKS
Enumerator
XMRIF_BIT_MRF_NONE_SUPP 

This flag indicates that configuration programs may set XMULTI_REF_ID::type to MULTI_REF_NONE in XMULTI_REF_SETTINGS::id for unused priority levels, and that this will be reflected in XMULTI_REF_STATUS::id accordingly. With some older firmware versions this was not supported.

XMRIF_BIT_HOLDOVER_STATUS_SUPP 

XMR_HOLDOVER_STATUS and associated types supported

XMRIF_BIT_EXT_SRC_INFO_SUPP 

XMR_EXT_SRC_INFO structure supported

XMRIF_BIT_GNSS_BIAS_SUPP 

MULTI_REF_GPS or MULTI_REF_GRC can use XMULTI_REF_SETTINGS::bias

N_XMRIF_BITS 

number of known flag bits

Definition at line 7078 of file gpsdefs.h.

◆ XMR_QL

enum XMR_QL

::TODO

Used with the ::... field of XMULTI_REF_STATUS::flags

See also
XMULTI_REF_STATUS::flags
XMR_QL_TDEV_MASK
_GET_XMR_QL_TDEV
_PUT_XMR_QL_TDEV
XMR_QL_MTIE_MASK
_GET_XMR_QL_MTIE
_PUT_XMR_QL_MTIE
Enumerator
XMR_QL_UNKNOWN 
XMR_QL_GREEN 
XMR_QL_YELLOW 
XMR_QL_RED 
N_XMR_QL 

Definition at line 6914 of file gpsdefs.h.

◆ XMR_REF_STATUS_BITS

XMULTI_REF status bits.

Enumerator
XMRS_BIT_NOT_SUPP 

ref type cfg'd for this level is not supported

XMRS_BIT_NO_CONN 

input signal is disconnected

XMRS_BIT_NO_SIGNAL 

no input signal

XMRS_BIT_IS_MASTER 

reference is master source

XMRS_BIT_IS_LOCKED 

locked to input signal

XMRS_BIT_IS_ACCURATE 

oscillator control has reached full accuracy

XMRS_BIT_NOT_SETTLED 

reference time signal not settled

XMRS_BIT_NOT_PHASE_LOCKED 

oscillator not phase locked to PPS

XMRS_BIT_NUM_SRC_EXC 

number of available sources exceeds what can be handled

XMRS_BIT_IS_EXTERNAL 

this ref source is on extension card

XMRS_BIT_LOW_JITTER 

this ref source has low jitter

XMRS_BIT_ITU_LIMIT_VIOLATED 

ITU limits violated (valid if device has XMR_METRICS)

XMRS_BIT_TRS_LIMIT_VIOLATED 

Trusted source offset limit violated (valid if device has XMRSF_MSK_USE_TRUSTED_SRC)

N_XMRS_BITS 

number of know status bits

Definition at line 6944 of file gpsdefs.h.

◆ XMR_SETTINGS_FLAG_BITS

Bit masks used to define XMR_SETTINGS_FLAG_MSKS.

Enumerator
XMRSF_BIT_AUTO_BIAS_MASTER 

src is allowed to operate as zero asymmetry master

XMRSF_BIT_AUTO_BIAS_SLAVE 

accept static bias correction from zero asymmetry master

XMRSF_BIT_ASYMMETRY_STEP_DETECTION 

static bias auto correction in case of step

XMRSF_BIT_IS_TRUSTED_SRC 

src can be used as a trusted src for spoofing detection

XMRSF_BIT_USE_TRUSTED_SRC 

use a trusted source for consistency check and spoofing detection

XMRSF_BIT_IS_TIME_OF_DAY_SRC 

src can be used for time of day synchronization

XMRSF_BIT_IS_PHASE_SRC 

src can be used for phase synchronization

N_XMRSF_BITS 

number of known flag bits

Definition at line 6768 of file gpsdefs.h.

◆ XMR_SETTINGS_FLAG_MSKS

Bit masks used with XMULTI_REF_SETTINGS::flags and XMR_EXT_SRC_INFO::supp_flags.

Enumerator
XMRSF_MSK_AUTO_BIAS_MASTER 

see XMRSF_BIT_AUTO_BIAS_MASTER

XMRSF_MSK_AUTO_BIAS_SLAVE 

see XMRSF_BIT_AUTO_BIAS_SLAVE

XMRSF_MSK_ASYMMETRY_STEP_DETECTION 

see XMRSF_BIT_ASYMMETRY_STEP_DETECTION

XMRSF_MSK_IS_TRUSTED_SRC 

see XMRSF_BIT_IS_TRUSTED_SRC

XMRSF_MSK_USE_TRUSTED_SRC 

see XMRSF_BIT_USE_TRUSTED_SRC

XMRSF_MSK_IS_TIME_OF_DAY_SRC 

see XMRSF_BIT_IS_TIME_OF_DAY_SRC

XMRSF_MSK_IS_PHASE_SRC 

see XMRSF_BIT_IS_PHASE_SRC

Definition at line 6784 of file gpsdefs.h.

◆ XMR_STATS_FLAGS_BITS

Enumeration of bits used to define XMR_STATS_FLAGS_MSKS.

See also
XMR_STATS_FLAGS_MSKS
Enumerator
XMR_STATS_FLAG_BIT_STEP_DETECTED 

A time step was detected at the input source.

XMR_STATS_FLAG_BIT_STEP_COMPENSATED 

A time step was compensated at the input source.

XMR_STATS_FLAG_BIT_AUTO_BIAS_VALID 

The value in XMR_STATS::auto_bias is valid.

N_XMR_STATS_FLAGS_BITS 

Definition at line 7360 of file gpsdefs.h.

◆ XMR_STATS_FLAGS_MSKS

Flag bit masks used with XMR_STATS::flags.

See also
XMR_STATS_FLAGS_BITS
Enumerator
XMR_STATS_FLAG_MSK_STEP_DETECTED 

see XMR_STATS_FLAG_BIT_STEP_DETECTED

XMR_STATS_FLAG_MSK_STEP_COMPENSATED 

see XMR_STATS_FLAG_BIT_STEP_COMPENSATED

XMR_STATS_FLAG_MSK_AUTO_BIAS_VALID 

see XMR_STATS_FLAG_BIT_AUTO_BIAS_VALID

Definition at line 7375 of file gpsdefs.h.