59 #define MBG_FIRST_COPYRIGHT_YEAR 2001 60 #define MBG_LAST_COPYRIGHT_YEAR 0 // use default 62 static const char *
pname =
"mbgshowsignal";
71 static time_t prv_sys_t;
87 if ( sys_t != prv_sys_t )
99 printf(
"\rMod: %c", ( status_port &
PCPS_ST_MOD ) ?
'*' :
'_' );
109 printf(
" Signal: %u%% ", signal * 100 /
PCPS_SIG_MAX );
125 int do_force_read = 0;
133 "support monitoring signal modulation" );
141 printf(
"\nMonitoring signal modulation" );
144 printf(
" (forced)" );
168 "This program displays the modulation signal of cards which receive\n" 169 "a slowly modulated input signal, e.g. the longwave signal from DCF77.\n" 180 int main(
int argc,
char *argv[] )
188 while ( ( c = getopt( argc, argv,
"Fh?" ) ) != -1 )
Requested action completed successfully.
bool mbg_cond_err_msg(int rc, const char *what)
Check if a value is an error code and print an associated error message.
int main(int argc, char *argv[])
uint8_t PCPS_STATUS_PORT
Type of the status register port.
_MBG_API_ATTR int _MBG_API mbg_get_time(MBG_DEV_HANDLE dh, PCPS_TIME *p)
Read a PCPS_TIME structure returning the current date/time/status.
Unable to handle requested action, usage printed.
#define mbg_rc_is_success(_rc)
static MBG_DEV_HANDLER_FNC do_mbgshowsignal
#define PCPS_ST_MOD
the raw demodulated DCF77 signal
static const char * pname
bool mbg_cond_err_msg_info(int rc, const char *what, const char *info)
Check if a value is an general or a "not supported" error code and print an associated message...
static int show_modulation(MBG_DEV_HANDLE dh)
#define MBG_SUCCESS
Error codes used with Meinberg devices and drivers.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_mod
Check if a device provides a modulation signal.
#define MBG_LAST_COPYRIGHT_YEAR
_MBG_API_ATTR int _MBG_API mbg_get_status_port(MBG_DEV_HANDLE dh, PCPS_STATUS_PORT *p)
Read the current state of the on-board PCPS_STATUS_PORT.
Action failed for specified device.
PCPS_SIG_VAL signal
signal strength, see PCPS_SIG_VAL_DEFS
Local calendar date and time, plus sync status.
#define MBG_ERR_NOT_SUPP_BY_DEV
Command or feature not supported by device.
#define MBG_FIRST_COPYRIGHT_YEAR
#define mbg_rc_is_error(_rc)
MBG_CHK_SUPP_FNC mbg_chk_dev_has_pzf
Check if a device supports demodulation of the DCF77 PZF code.