mbgtools-lx  4.2.8
Definitions used with SHS devices

Data Structures

struct  SHS_SETTINGS
 Current configuration of an SHS controller. More...
 
struct  SHS_INFO
 Current SHS settings and general SHS capabilities. More...
 
struct  SHS_STATUS
 Current SHS status. More...
 

Macros

#define _mbg_swab_shs_settings(_p)
 
#define _mbg_swab_shs_info(_p)
 
#define _mbg_swab_shs_status(_p)
 

Enumerations

enum  SHS_STATES {
  SHS_STATE_DISABLED, SHS_STATE_OK, SHS_STATE_WARNING, SHS_STATE_ERROR,
  SHS_STATE_FATAL, N_SHS_STATES
}
 SHS configuration flag bits. More...
 
enum  SHS_FLAG_BITS { SHS_FLAG_BIT_DISB_SERIAL, SHS_FLAG_BIT_DISB_PPS, SHS_FLAG_BIT_DISB_10MHZ, N_SHS_FLAG_BITS }
 SHS flag bits. More...
 
enum  SHS_FLAG_MASKS { SHS_FLAG_DISB_SERIAL = ( 1UL << SHS_FLAG_BIT_DISB_SERIAL ), SHS_FLAG_DISB_PPS = ( 1UL << SHS_FLAG_BIT_DISB_PPS ), SHS_FLAG_DISB_10MHZ = ( 1UL << SHS_FLAG_BIT_DISB_10MHZ ) }
 SHS flag masks. More...
 

Detailed Description

An SHS (Secure Hybrid System) device compares the times from 2 sources and eventually sets an alarm (warning and/or error) flag if the difference between the 2 time sources exceeds a configurable limit.

These structures and associated definitions are used to query the SHS capabilities, configure the SHS device according to its capabilities, and query the SHS status.

The structures and associated API calls are only supported if the GPS_HAS_SHS bit is set in RECEIVER_INFO::features.

The SHS_INFO structure can be read to retrieve the capabilities and current settings of the device. The SHS_SETTINGS structure can then be set up according to the capabilities, and be written back to configure the device.

If SHS_SETTINGS::err_limit and/or SHS_SETTINGS::warn_limit are not 0 then the SHS device checks if the time difference between the 2 clocks exceeds these limits and sets SHS_STATUS::shs_state as appropriate.

If indicated by SHS_INFO::supp_flags the SHS device can also take certain actions if the time difference exceeds the error limit. If this happens then the same flags are set in SHS_STATUS::flags to indicate the action has been taken.

Macro Definition Documentation

◆ _mbg_swab_shs_info

#define _mbg_swab_shs_info (   _p)
Value:
do \
{ \
_mbg_swab_shs_settings( &(_p)->settings ); \
_mbg_swab_nano_time( &(_p)->max_limit ); \
_mbg_swab32( &(_p)->reserved ); \
_mbg_swab32( &(_p)->flags ); \
} while ( 0 )

Definition at line 17733 of file gpsdefs.h.

◆ _mbg_swab_shs_settings

#define _mbg_swab_shs_settings (   _p)
Value:
do \
{ \
_mbg_swab_nano_time( &(_p)->err_limit ); \
_mbg_swab_nano_time( &(_p)->warn_limit ); \
_mbg_swab32( &(_p)->reserved ); \
_mbg_swab32( &(_p)->flags ); \
} while ( 0 )
static double warn_limit
Definition: mbgcmptime.c:64

Definition at line 17707 of file gpsdefs.h.

◆ _mbg_swab_shs_status

#define _mbg_swab_shs_status (   _p)
Value:
do \
{ \
_mbg_swab_nano_time( &(_p)->time_diff ); \
_mbg_swab32( &(_p)->clk_status_1 ); \
_mbg_swab32( &(_p)->clk_status_2 ); \
_mbg_swab16( &(_p)->reserved_2 ); \
_mbg_swab32( &(_p)->flags ); \
} while ( 0 )

Definition at line 17759 of file gpsdefs.h.

Enumeration Type Documentation

◆ SHS_FLAG_BITS

SHS flag bits.

See also
SHS_FLAG_MASKS
Enumerator
SHS_FLAG_BIT_DISB_SERIAL 

disable serial output in state SHS_STATE_ERROR

SHS_FLAG_BIT_DISB_PPS 

disable PPS output in state SHS_STATE_ERROR

SHS_FLAG_BIT_DISB_10MHZ 

disable 10 MHz output in state SHS_STATE_ERROR

N_SHS_FLAG_BITS 

Definition at line 17793 of file gpsdefs.h.

◆ SHS_FLAG_MASKS

SHS flag masks.

With SHS_INFO::supp_flags these flags indicate what is supported by the SHS controller, e.g. what action can be taken automatically. Each bit set in SHS_INFO::supp_flags can be set by a configuration tool in SHS_SETTINGS::flags to enable the associated feature. If a corresponding bit is set in SHS_STATUS::flags this means the associated feature has been enabled, e.g. an action has been taken.

See also
SHS_FLAG_BITS
Enumerator
SHS_FLAG_DISB_SERIAL 

see SHS_FLAG_BIT_DISB_SERIAL

SHS_FLAG_DISB_PPS 

see SHS_FLAG_BIT_DISB_PPS

SHS_FLAG_DISB_10MHZ 

see SHS_FLAG_BIT_DISB_10MHZ

Definition at line 17814 of file gpsdefs.h.

◆ SHS_STATES

enum SHS_STATES

SHS configuration flag bits.

Codes used with SHS_STATUS::shs_state

Enumerator
SHS_STATE_DISABLED 

time difference not checked, eventually no limits configured

SHS_STATE_OK 

time difference OK, below warning limit

SHS_STATE_WARNING 

time difference exceeds warning limit

SHS_STATE_ERROR 

time difference exceeds error limit

SHS_STATE_FATAL 

one or both time sources disconnected

N_SHS_STATES 

Definition at line 17776 of file gpsdefs.h.