319 #if defined( MBG_TGT_DOS_PM ) 320 #include <mbg_dpmi.h> 324 #if !MBG_TGT_USE_IOCTL 336 #if defined( MBG_TGT_WIN32 ) 338 #include <mbgsvctl.h> 339 #include <mbgnames.h> 348 #elif defined( MBG_TGT_POSIX ) && !defined( MBG_TGT_QNX_NTO ) 358 #else // other target OSs which access the hardware directly 360 #if defined( MBG_TGT_QNX_NTO ) 362 #include <sys/neutrino.h> 366 #include <pcps_dos.h> 368 #define pcps_read_safe _pcps_read 369 #define pcps_write_safe pcps_write 370 #define pcps_read_gps_safe pcps_read_gps 371 #define pcps_write_gps_safe pcps_write_gps 373 #define _pcps_write_byte_safe _pcps_write_byte 374 #define _pcps_read_var_safe _pcps_read_var 375 #define _pcps_write_var_safe _pcps_write_var 376 #define _pcps_read_gps_var_safe _pcps_read_gps_var 377 #define _pcps_write_gps_var_safe _pcps_write_gps_var 380 #endif // end of target specific code 383 #if !defined( _MBG_SUPP_VAR_ACC_SIZE ) 388 #define _MBG_SUPP_VAR_ACC_SIZE 1 392 #if !defined( _mbgdevio_chk_cond ) 396 #define _mbgdevio_chk_cond( _cond ) _nop_macro_fnc() 401 #define _mbgdevio_read_chk( _dh, _cmd, _ioctl, _p, _sz, _cond ) \ 404 _mbgdevio_chk_cond( _cond ); \ 405 rc = _do_mbgdevio_read( _dh, _cmd, _ioctl, _p, _sz ); \ 408 #define _mbgdevio_read_var_chk( _dh, _cmd, _ioctl, _p, _cond ) \ 411 _mbgdevio_chk_cond( _cond ); \ 412 rc = _mbgdevio_read_var( _dh, _cmd, _ioctl, _p ); \ 415 #define _mbgdevio_write_var_chk( _dh, _cmd, _ioctl, _p, _cond ) \ 418 _mbgdevio_chk_cond( _cond ); \ 419 rc = _mbgdevio_write_var( _dh, _cmd, _ioctl, _p ); \ 422 #define _mbgdevio_write_cmd_chk( _dh, _cmd, _ioctl, _cond ) \ 425 _mbgdevio_chk_cond( _cond ); \ 426 rc = _mbgdevio_write_cmd( _dh, _cmd, _ioctl ); \ 429 #define _mbgdevio_read_gps_chk( _dh, _cmd, _ioctl, _p, _sz, _cond ) \ 432 _mbgdevio_chk_cond( _cond ); \ 433 rc = _do_mbgdevio_read_gps( _dh, _cmd, _ioctl, _p, _sz ); \ 436 #define _mbgdevio_read_gps_var_chk( _dh, _cmd, _ioctl, _p, _cond ) \ 439 _mbgdevio_chk_cond( _cond ); \ 440 rc = _mbgdevio_read_gps_var( _dh, _cmd, _ioctl, _p ); \ 443 #define _mbgdevio_write_gps_var_chk( _dh, _cmd, _ioctl, _p, _cond ) \ 446 _mbgdevio_chk_cond( _cond ); \ 447 rc = _mbgdevio_write_gps_var( _dh, _cmd, _ioctl, _p ); \ 471 #if defined( _MBGIOCTL_H ) 480 &req,
sizeof( req ), 0 );
484 printf(
"feat ioctl %lu:%lu ret: %i --> %i\n",
485 (
ulong) feat_type, (
ulong) feat_num, rc, rc2 );
551 #if defined( _MBGIOCTL_H ) 585 #define _do_query_cond( _dh, _cond, _ioctl ) \ 586 do_query_cond( _dh, _ioctl ) 590 #define _do_query_cond( _dh, _cond, _ioctl ) \ 591 _cond( _dh ) ? MBG_SUCCESS : MBG_ERR_NOT_SUPP_BY_DEV 3201 int32_t *hns_latency )
3203 #if defined( MBG_TGT_WIN32 ) || defined( MBG_TGT_POSIX ) 3212 #if DEBUG && defined( MBG_TGT_LINUX ) && defined( MBG_ARCH_X86 ) 3213 printf(
"comp_lat: %08llX.%08llX %llX - %llX = %lli",
3214 (
unsigned long long) ts->
sec,
3215 (
unsigned long long) ts->
frac,
3216 (
unsigned long long) *p_cyc_ts,
3217 (
unsigned long long) *p_cyc_ontime,
3218 (
unsigned long long) cyc_latency
3226 if ( cyc_latency < 0 )
3228 cyc_latency += ( (
uint64_t) -1 ) >> 1;
3230 #if DEBUG && defined( MBG_TGT_LINUX ) 3231 printf(
"->%lli (%llX)",
3232 (
unsigned long long) cyc_latency,
3233 (
unsigned long long) ( ( (
uint64_t) -1 ) >> 1 )
3240 frac_latency = (*p_cyc_freq) ? ( cyc_latency * ( ( (
int64_t) 1 ) << 32 ) / *p_cyc_freq ) : 0;
3244 comp_frac = ts->
frac - frac_latency;
3245 ts->
frac = (uint32_t) comp_frac;
3246 ts->
sec += (uint32_t) ( comp_frac >> 32 );
3248 #if DEBUG && defined( MBG_TGT_LINUX ) 3249 printf(
" frac_lat: %llX comp_frac: %08llX.%08llX",
3250 (
unsigned long long) frac_latency,
3251 (
unsigned long long) ts->
sec,
3252 (
unsigned long long) ts->
frac 3256 if ( hns_latency && *p_cyc_freq )
3261 tmp_hns_latency = cyc_latency * 10000000 / *p_cyc_freq;
3264 #define MAX_HNS_LATENCY 0x7FFFFFFF // int32_t 3265 #define MIN_HNS_LATENCY ( -MAX_HNS_LATENCY - 1 ) 3273 *hns_latency = (int32_t) tmp_hns_latency;
3276 #if DEBUG && defined( MBG_TGT_LINUX ) 3323 #if MBG_TGT_HAS_DEV_FN_BASE 3357 #if defined( MBG_TGT_WIN32 ) 3359 const char *device_path = mbg_svc_get_device_path( dev_idx );
3363 #elif MBG_TGT_HAS_DEV_FN 3373 #if defined( _PCPSDRVR_H ) 3412 #if defined( MBG_TGT_WIN32 ) 3414 if ( dev_fn == NULL )
3416 SetLastError( ERROR_INVALID_PARAMETER );
3422 GENERIC_READ | GENERIC_WRITE,
3432 FILE_FLAG_OVERLAPPED,
3436 #elif defined( MBG_TGT_POSIX ) && !defined( MBG_TGT_QNX_NTO ) 3438 if ( dev_fn == NULL )
3444 return open( dev_fn, O_RDWR );
3448 errno = ( dev_fn == NULL ) ? EFAULT : ENODEV;
3505 #if defined( _PCPSDRVR_H ) 3507 #if defined( MBG_TGT_QNX_NTO ) 3510 if ( ThreadCtl( _NTO_TCTL_IO, NULL ) == -1 )
3512 fprintf( stderr,
"** ThreadCtl() failed to request I/O privileges: %s\n\n", strerror( errno ) );
3517 #if defined( MBG_TGT_DOS ) && MBG_USE_DOS_TSR 3521 pcps_detect_any_tsr();
3522 prv_busy = pcps_tsr_set_busy_flag( 1 );
3524 pcps_tsr_set_busy_flag( prv_busy );
3532 #elif defined( MBG_TGT_WIN32 ) 3534 return mbg_svc_find_devices();
3536 #elif defined( MBG_TGT_POSIX ) 3563 #if MBG_TGT_HAS_DEV_FN 3578 #if defined( MBG_TGT_WIN32 ) 3579 mbg_svc_free_device_list( list );
3599 #endif // MBG_TGT_HAS_DEV_FN 3603 #if MBG_TGT_HAS_DEV_FN 3625 #if defined( MBG_TGT_WIN32 ) 3627 return mbg_svc_find_devices_with_hw_id( p_list, max_devs );
3629 #elif defined( MBG_TGT_POSIX ) 3646 size_t sz = strlen( dev_fn ) + 1;
3648 if ( list_head == NULL )
3684 *p_list = list_head;
3696 #endif // MBG_TGT_HAS_DEV_FN 3700 #if MBG_TGT_HAS_DEV_FN 3716 memset( p, 0,
sizeof( *p ) );
3732 #endif // MBG_TGT_HAS_DEV_FN 3736 #if MBG_TGT_HAS_DEV_FN 3767 #endif // MBG_TGT_HAS_DEV_FN 3788 const char *type_name,
const char *sernum )
3792 for ( i = 0; i < n_dev; i++ )
3794 const PCPS_DEV *p_dev = &dev_array[i];
3799 if ( sernum && strcmp(
_pcps_sernum( p_dev ), sernum ) )
3833 const char *type_name,
const char *sernum,
3834 int selection_mode )
3900 #if MBG_TGT_HAS_DEV_FN 3917 for ( dev_fn_pos = dev_fn_list_head; dev_fn_pos; dev_fn_pos = dev_fn_pos->
next )
3922 if ( list_head == NULL )
3948 if ( ++n_dev_name > n_dev_fn )
3955 *p_list = list_head;
4017 char *type_name,
size_t type_name_size,
4018 char *sernum,
size_t sernum_size )
4020 size_t dev_name_len = 0;
4028 dev_name_len = strlen( dev_name );
4046 if ( i == ( type_name_size - 1 ) )
4049 type_name[i] = ( c >=
'a' && c <=
'z' ) ? ( c - 0x20 ) : c;
4070 if ( i == ( sernum_size - 1 ) )
4073 if ( ( c < '0' || c >
'9' ) && ( c !=
'?' ) )
4121 sernum,
sizeof( sernum ) );
4123 #if MBG_TGT_HAS_DEV_FN 4136 for ( i = 0, pos = list_head; pos && pos->
dev_fn_ptr; pos = pos->
next )
4149 sernum, selection_mode );
4160 #if defined( _PCPSDRVR_H ) 4163 for ( i = 0; i <
n_ddevs; i++ )
4167 sernum, selection_mode );
4194 #if defined( MBG_TGT_WIN32 ) 4195 CloseHandle( *dev_handle );
4196 #elif defined( MBG_TGT_POSIX ) && !defined( MBG_TGT_QNX_NTO ) 4197 close( *dev_handle );
4218 #if defined( _MBGIOCTL_H ) 4244 #if defined( _MBGIOCTL_H ) 4275 #if defined( _MBGIOCTL_H ) 4383 const void *p,
int size )
4420 const void *p,
int size )
4449 const void *in_p,
int in_sz,
4450 void *out_p,
int out_sz )
4454 #if !defined( _MBGIOCTL_H ) 4588 #if defined( MBG_TGT_WIN32 ) 4656 #if defined( MBG_ARCH_BIG_ENDIAN ) 4861 #if defined( MBG_ARCH_BIG_ENDIAN ) 4927 #if defined( MBG_ARCH_BIG_ENDIAN ) 4991 #if defined( MBG_ARCH_BIG_ENDIAN ) 5068 #if defined( MBG_ARCH_BIG_ENDIAN ) 5478 #if defined( MBG_ARCH_BIG_ENDIAN ) 5611 #if defined( MBG_ARCH_BIG_ENDIAN ) 5679 #if defined( MBG_ARCH_BIG_ENDIAN ) 5816 #if defined( MBG_ARCH_BIG_ENDIAN ) 5874 #if defined( MBG_ARCH_BIG_ENDIAN ) 5941 for ( i = 0; i <
N_XYZ; i++ )
5951 xyz,
sizeof(
XYZ ) );
5982 for ( i = 0; i <
N_LLA; i++ )
6058 #if defined( MBG_ARCH_BIG_ENDIAN ) 6131 #if _MBG_SUPP_VAR_ACC_SIZE 6147 #if defined( MBG_ARCH_BIG_ENDIAN ) 6191 #if _MBG_SUPP_VAR_ACC_SIZE 6207 #if defined( MBG_ARCH_BIG_ENDIAN ) 6252 #if defined( MBG_ARCH_BIG_ENDIAN ) 6336 if ( p_dev == NULL )
6387 #if defined( _MBGIOCTL_H ) 6397 + offsetof(
PCI_ASIC, raw_version ) );
6424 #if defined( _MBGIOCTL_H ) 6437 + offsetof(
PCI_ASIC, features ) );
6505 #if defined( MBG_ARCH_BIG_ENDIAN ) 6580 #if defined( MBG_ARCH_BIG_ENDIAN ) 6634 #if !defined( _MBGIOCTL_H ) 6686 #if !defined( _MBGIOCTL_H ) 6740 int32_t *hns_latency )
6791 #if !defined( _MBGIOCTL_H ) 6799 #define _PCPS_CMD pcps_cmd 6801 #define _PCPS_CMD PCPS_GET_IRIG_TX_INFO 6836 #if !defined( _MBGIOCTL_H ) 6840 #if defined( MBG_ARCH_BIG_ENDIAN ) 6846 #if !defined( _MBGIOCTL_H ) 6854 #define _PCPS_CMD pcps_cmd 6856 #define _PCPS_CMD PCPS_SET_IRIG_TX_SETTINGS 6924 #if defined( MBG_ARCH_BIG_ENDIAN ) 6984 #if defined( _MBGIOCTL_H ) 7019 int32_t *hns_latency )
7069 #if defined( _MBGIOCTL_H ) 7115 #if _MBG_SUPP_VAR_ACC_SIZE 7131 #if defined( MBG_ARCH_BIG_ENDIAN ) 7173 #if defined( MBG_ARCH_BIG_ENDIAN ) 7240 #if defined( _MBGIOCTL_H ) 7364 #if defined( MBG_ARCH_BIG_ENDIAN ) 7462 #if defined( MBG_ARCH_BIG_ENDIAN ) 7533 #if _MBG_SUPP_VAR_ACC_SIZE 7546 #if defined( MBG_ARCH_BIG_ENDIAN ) 7586 #if defined( MBG_ARCH_BIG_ENDIAN ) 7628 #if defined( _MBGIOCTL_H ) 7661 #if defined( _MBGIOCTL_H ) 7757 #if defined( MBG_ARCH_BIG_ENDIAN ) 7997 #if defined( MBG_ARCH_BIG_ENDIAN ) 8036 #if _MBG_SUPP_VAR_ACC_SIZE 8039 n_supp *
sizeof( gsii[0] ),
8043 n_supp *
sizeof( gsii[0] ) );
8046 #if defined( MBG_ARCH_BIG_ENDIAN ) 8050 for ( i = 0; i < n_supp; i++ )
8121 uint32_t n_supp = p_gcl->
num_io;
8123 #if _MBG_SUPP_VAR_ACC_SIZE 8126 n_supp *
sizeof( gii[0] ),
8130 n_supp *
sizeof( gii[0] ) );
8133 #if defined( MBG_ARCH_BIG_ENDIAN ) 8137 for ( i = 0; i < n_supp; i++ )
8176 #if defined( MBG_ARCH_BIG_ENDIAN ) 8218 #if _MBG_SUPP_VAR_ACC_SIZE 8221 n_supp *
sizeof( gsi[0] ),
8225 n_supp *
sizeof( gsi[0] ) );
8228 #if defined( MBG_ARCH_BIG_ENDIAN ) 8232 for ( i = 0; i < n_supp; i++ )
8298 #if _MBG_SUPP_VAR_ACC_SIZE 8301 n_supp *
sizeof( xmrsi[0] ),
8305 n_supp *
sizeof( xmrsi[0] ) );
8308 #if defined( MBG_ARCH_BIG_ENDIAN ) 8312 for ( i = 0; i < n_supp; i++ )
8350 #if _MBG_SUPP_VAR_ACC_SIZE 8353 n_supp *
sizeof( xmrii[0] ),
8357 n_supp *
sizeof( xmrii[0] ) );
8360 #if defined( MBG_ARCH_BIG_ENDIAN ) 8364 for ( i = 0; i < n_supp; i++ )
8403 #if defined( MBG_ARCH_BIG_ENDIAN ) 8472 #if defined( MBG_TGT_LINUX ) // TODO Eventually generally for POSIX? 8474 if ( sched_getaffinity( pid,
sizeof( *p ), p ) == 0 )
8479 #elif defined( MBG_TGT_WIN32 ) 8483 if ( GetProcessAffinityMask( pid, p, &system_affinity_mask ) )
8515 #if defined( MBG_TGT_LINUX ) // TODO Eventually generally for POSIX? 8517 if ( sched_setaffinity( pid,
sizeof( *p ), p ) == 0 )
8522 #elif defined( MBG_TGT_WIN32 ) 8524 if ( SetProcessAffinityMask( pid, *p ) )
8565 #if MBGDEVIO_USE_THREAD_API 8586 #if defined( MBG_TGT_LINUX ) // TODO Eventually generally for POSIX? 8588 if ( pthread_create( &p_ti->
thread_id, NULL, fnc, arg ) == 0 )
8593 #elif defined( MBG_TGT_WIN32 ) 8596 DWORD thread_id = 0;
8598 p_ti->exit_request = CreateEvent( NULL, FALSE, FALSE, NULL );
8600 if ( p_ti->exit_request == NULL )
8603 h = CreateThread( NULL, 0, fnc, arg, 0, &thread_id );
8607 CloseHandle( p_ti->exit_request );
8646 #if defined( MBG_TGT_LINUX ) // TODO Eventually generally for POSIX? 8650 if ( pthread_join( p_ti->
thread_id, NULL ) == 0 )
8655 #elif defined( MBG_TGT_WIN32 ) 8657 if ( SetEvent( p_ti->exit_request ) &&
8658 WaitForSingleObject( p_ti->
thread_id, 10000L ) == 0 )
8660 CloseHandle( p_ti->exit_request );
8661 p_ti->exit_request = NULL;
8703 #if defined( MBG_TGT_LINUX ) // TODO Eventually generally for POSIX? 8705 if ( usleep( sleep_ms * 1000 ) == 0 )
8710 #elif defined( MBG_TGT_WIN32 ) 8712 DWORD dw = WaitForSingleObject( p_ti->exit_request, sleep_ms );
8735 #if MBGDEVIO_HAVE_THREAD_AFFINITY 8757 #if defined( MBG_TGT_LINUX ) // TODO Eventually generally for POSIX? 8759 if ( pthread_setaffinity_np( tid,
sizeof( *p ), p ) == 0 )
8764 #elif defined( MBG_TGT_WIN32 ) 8768 if ( prv_thread_affinity )
8820 memset( &prv_xhrt_vars, 0,
sizeof( prv_xhrt_vars ) );
8844 p->
vars = xhrt_vars;
8859 prv_xhrt_vars = xhrt_vars;
8905 memset( p_pti, 0,
sizeof( *p_pti ) );
8985 xhrt_vars = p->
vars;
9001 *p_vars = xhrt_vars;
9003 return ioctl_status;
9038 int rc = mbg_get_xhrt_data( p, &tstamp64, &xhrt_vars );
9044 uint64_to_pcps_time_stamp( &p_hrt->
tstamp, tstamp64 );
9057 #if defined( MBG_TGT_WIN32 ) 9088 int rc = mbg_get_xhrt_data( p, &tstamp64, NULL );
9094 mbg_pcps_tstamp64_to_filetime( p_ft, &tstamp64 );
9138 *p_freq_hz = freq_hz;
9140 return ioctl_status;
9144 #endif // defined MBGDEVIO_USE_THREAD_API 9163 #if defined( _MBGIOCTL_H ) 9170 #if defined( MBG_TGT_LINUX ) 9179 double delta_cycles;
9196 delta_t = pcps_time_stamp_to_uint64( &htc2.
t.
tstamp ) - pcps_time_stamp_to_uint64( &htc1.
t.
tstamp );
9231 #if defined MBG_TGT_WIN32 9249 #if defined( MBG_TGT_WIN32 ) 9251 #if defined( _USRDLL ) 9253 BOOL APIENTRY DllMain( HANDLE hModule,
9254 DWORD ul_reason_for_call,
9257 if ( ul_reason_for_call == DLL_PROCESS_ATTACH )
9258 mbg_svc_register_event_source( MBG_APP_EVTLOG_NAME_MBGDEVIO_DLL );
9263 #endif // defined( _USRDLL ) 9265 #endif // defined( MBG_TGT_WIN32 ) _MBG_API_ATTR int _MBG_API mbg_get_gps_all_xmr_status(MBG_DEV_HANDLE dh, XMULTI_REF_STATUS_IDX xmrsi[], const XMULTI_REF_INSTANCES *p_xmri)
Read the status of all XMR sources.
A generic thread info structure.
_MBG_API_ATTR int _MBG_API mbg_set_utc_parm(MBG_DEV_HANDLE dh, const UTC *p)
Write a UTC parameter structure to a device.
_MBG_API_ATTR int _MBG_API mbg_get_gps_all_str_type_info(MBG_DEV_HANDLE dh, STR_TYPE_INFO_IDX stii[], const RECEIVER_INFO *p_ri)
Read a STR_TYPE_INFO_IDX array of supported string types.
A structure to used to read the status of the PTP protocol stack.
_MBG_API_ATTR int _MBG_API mbg_get_gps_pos(MBG_DEV_HANDLE dh, POS *p)
Read the current geographic position from a GPS device.
uint16_t TR_DISTANCE
Receiver distance from transmitter [km].
_MBG_API_ATTR int _MBG_API mbg_get_ucap_event(MBG_DEV_HANDLE dh, PCPS_HR_TIME *p)
Retrieve a single time capture event from the on-board FIFO buffer.
#define IOCTL_GET_PCPS_TZCODE
#define IOCTL_GET_FAST_HR_TIMESTAMP_CYCLES
_MBG_API_ATTR int _MBG_API mbg_dev_is_irig_rx(MBG_DEV_HANDLE dh, int *p)
Check if a device provides a configurable IRIG input.
Configuration settings for a specific PTP unicast master.
#define IOCTL_DEV_HAS_PCI_ASIC_VERSION
(r/w) UTC, UTC corr. param., only if PCPS_HAS_UTC_PARM
Number of event log entries that can be stored and yet have been saved.
uint8_t PCPS_TZCODE
Type of variable to hold a TZ code.
uint32_t num_io
number of supported GPIO ports
_MBG_API_ATTR int _MBG_API mbg_find_devices(void)
Get the number of devices installed on the computer.
#define _mbg_crit_sect_leave
#define _mbg_swab_mbg_gpio_status_idx(_p)
_MBG_API_ATTR int _MBG_API mbg_set_ref_offs(MBG_DEV_HANDLE dh, const MBG_REF_OFFS *p)
Write the UTC offset configuration of the reference time to a device.
Configuration settings of a specific serial port.
uint8_t n_str_type
max num of string types supported by any port
#define IOCTL_GET_GPS_ALL_PORT_INFO
double A1
+- Clock Correction Coefficient 1 [sec/sec]
_MBG_API_ATTR int _MBG_API mbg_set_gps_cmd(MBG_DEV_HANDLE dh, const GPS_CMD *p)
Send one of the PC_GPS_COMMANDS to a GPS receiver device.
_MBG_API_ATTR int _MBG_API mbg_get_xmr_holdover_status(MBG_DEV_HANDLE dh, XMR_HOLDOVER_STATUS *p, const XMULTI_REF_INSTANCES *p_xmri)
Read the current XMR holdover interval from a device.
High resolution device time, system time, and associated cycles counts.
(-/w) POUT_SETTINGS_IDX, settings for one programmable output
#define PCPS_GET_SERIAL
(r-) Read serial settings as PCPS_SERIAL, deprecated by PC_GPS_ALL_PORT_INFO
_MBG_API_ATTR int _MBG_API mbg_save_all_irig_rx_settings(MBG_DEV_HANDLE dh, const PCPS_DEV *pdev, const IRIG_SETTINGS *p_irig_settings, const MBG_REF_OFFS *p_ref_offs, const MBG_OPT_SETTINGS *p_opt_settings)
Write all IRIG input configuration settings to a device.
#define IOCTL_SET_GPS_POS_LLA
_MBG_API_ATTR int _MBG_API mbg_get_irig_tx_info(MBG_DEV_HANDLE dh, IRIG_INFO *p)
Read the current IRIG output settings plus the supported settings.
_MBG_API_ATTR int _MBG_API mbg_dev_has_gps_data(MBG_DEV_HANDLE dh, int *p)
Check if a device supports large configuration data structures.
#define IOCTL_GET_MBG_OPT_INFO
MBG_CHK_SUPP_FNC mbg_chk_dev_has_cab_len
Check if a device supports configuration of antenna cable length.
_MBG_API_ATTR int _MBG_API mbg_get_gps_all_gnss_sat_info(MBG_DEV_HANDLE dh, GNSS_SAT_INFO_IDX gsii[], const MBG_GNSS_MODE_INFO *p_mi)
Read a GNSS_SAT_INFO_IDX array of satellite status information.
_MBG_API_ATTR int _MBG_API mbg_set_ptp_uc_master_settings_idx(MBG_DEV_HANDLE dh, const PTP_UC_MASTER_SETTINGS_IDX *p)
Write PTP/IEEE1588 unicast configuration settings to a device.
MBG_CHK_SUPP_FNC mbg_chk_dev_is_msf
Check if a device is a MSF receiver.
#define _mbgdevio_write_gps(_dh, _cmd, _ioctl, _p, _sz)
(r/w) TTM, current time, deprecated by PCPS_GIVE_HR_TIME
_MBG_API_ATTR int _MBG_API mbg_get_gps_ant_cable_len(MBG_DEV_HANDLE dh, ANT_CABLE_LEN *p)
Read the configured antenna cable length from a device.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_event_time
_MBG_API_ATTR int _MBG_API mbg_get_raw_irig_data(MBG_DEV_HANDLE dh, MBG_RAW_IRIG_DATA *p)
Read raw IRIG data from an IRIG receiver.
int mbg_thread_create(MBG_THREAD_INFO *p_ti, MBG_THREAD_FNC fnc, void *arg)
Create a new execution thread for the current process.
(r/w) ENABLE_FLAGS, when to enable serial, pulses, and synth, only if GPS_MODEL_HAS_ENABLE_FLAGS ...
uint64_t pcps_hr_tstamp64
Time stamp read from a device.
_MBG_API_ATTR int _MBG_API mbg_set_gps_pout_settings_idx(MBG_DEV_HANDLE dh, const POUT_SETTINGS_IDX *p)
Write the configuration for a single programmable pulse output.
#define _pcps_ddev_has_asic_features(_p)
_MBG_API_ATTR int _MBG_API mbg_get_gps_ucap(MBG_DEV_HANDLE dh, TTM *p)
Read a time capture event from the on-board FIFO buffer using a TTM structure.
Settings of an IPv4-only network interface.
char * strncpy_safe(char *dst, const char *src, size_t max_len)
A portable, safe implementation of strncpy()
int mbg_thread_set_affinity(MBG_THREAD_INFO *p_ti, int *p)
Set the CPU affinity of a single thread.
GPS UTC correction parameters.
MBG_CHK_SUPP_FNC mbg_chk_dev_is_mca
Check if the device is connected via the MCA bus.
#define GPS_HAS_GPIO
see GPS_FEAT_GPIO
uint16_t n_supp_master
number of unicast masters which can be specified
(r/-) PTP_UC_MASTER_CFG_LIMITS, only if PTP_CFG_MSK_SUPPORT_PTP_UNICAST
#define IOCTL_SET_GPS_POS_XYZ
#define IOCTL_SET_GPS_UTC_PARM
A structure used to configure a PTP port.
static __mbg_inline void mbg_chk_tstamp64_leap_sec(uint64_t *tstamp64, PCPS_TIME_STATUS_X *status)
#define MBG_ERR_INTR
interrupted function call
POUT_SETTINGS pout_settings
MBG_CHK_SUPP_FNC mbg_chk_dev_has_tzdl
Check if a device supports timezone configuration using the TZDL structure.
_MBG_API_ATTR int _MBG_API mbg_set_time_scale_settings(MBG_DEV_HANDLE dh, const MBG_TIME_SCALE_SETTINGS *p)
Write the time scale configuration to a device.
The structure behind the MBG_DEV_NAME_LIST_ENTRY type.
A The structure used to store the configuration of two serial ports.
#define IOCTL_GET_GPS_POS
#define _mbg_swab_mbg_gpio_cfg_limits(_p)
#define _pcps_ddev_has_sync_time(_p)
_MBG_API_ATTR int _MBG_API mbg_get_lan_if_info(MBG_DEV_HANDLE dh, LAN_IF_INFO *p)
Read LAN interface information from a device.
Time scale configuration settings plus capabilities.
_MBG_API_ATTR int _MBG_API mbg_generic_read_gps(MBG_DEV_HANDLE dh, int cmd, void *p, int size)
PCPS_IRQ_STAT_INFO irq_stat_info
#define PCPS_CLR_UCAP_BUFF
(-w) No param., clear on-board capture FIFO, only if _pcps_has_ucap
PCPS_BUS_FLAGS bus_flags
see PCPS_BUS_FLAG_MASKS
feat_num field contains one of the GPS_FEATURE_BITS
#define IOCTL_SET_PCPS_TIME
#define IOCTL_GET_PCPS_UCAP_EVENT
#define _mbg_cpu_clear(_ps)
#define IOCTL_SET_GPS_ENABLE_FLAGS
#define _pcps_ddev_has_cab_len(_p)
_MBG_API_ATTR int _MBG_API mbg_dev_has_irig_tx(MBG_DEV_HANDLE dh, int *p)
Check if a device provides a configurable IRIG output.
uint16_t idx
port index, 0..RECEIVER_INFO::n_com_ports-1
_MBG_API_ATTR int _MBG_API mbg_set_gps_enable_flags(MBG_DEV_HANDLE dh, const ENABLE_FLAGS *p)
Write an ;;ENABLE_FLAGS structure to configure when outputs shall be enabled.
#define IOCTL_GET_PCPS_DEV
Status information on a ref time source at a specific priority level.
_MBG_API_ATTR int _MBG_API mbg_set_serial(MBG_DEV_HANDLE dh, const PCPS_SERIAL *p)
Write the serial port configuration to an old type of device.
_MBG_API_ATTR int _MBG_API mbg_get_time_scale_info(MBG_DEV_HANDLE dh, MBG_TIME_SCALE_INFO *p)
Read the current time scale settings and which time scales are supported.
#define PCPS_GIVE_SYNC_TIME
(r-) Read last sync time as PCPS_TIME, only if _pcps_has_sync_time
_MBG_API_ATTR int _MBG_API mbg_set_opt_settings(MBG_DEV_HANDLE dh, const MBG_OPT_SETTINGS *p)
Write a MBG_OPT_SETTINGS structure containing optional device settings.
(-/w) MBG_GPIO_SETTINGS_IDX, settings for a specific port, only if GPS_HAS_GPIO
#define IOCTL_GET_IRIG_CTRL_BITS
(r/-) XMR_HOLDOVER_STATUS, only if XMRIF_MSK_HOLDOVER_STATUS_SUPP
#define _mbg_swab_mbg_opt_info(_p)
_MBG_API_ATTR int _MBG_API mbg_get_irig_rx_info(MBG_DEV_HANDLE dh, IRIG_INFO *p)
Read the current IRIG input settings plus capabilities.
#define _mbg_swab_mbg_gnss_mode_settings(_p)
#define IOCTL_GET_PCPS_IRIG_RX_INFO
A structure used to control a poll thread function.
#define IOCTL_SET_GPS_CMD
#define _mbg_swab_xmulti_ref_instances(_p)
#define IOCTL_GET_FAST_HR_TIMESTAMP
#define _mbg_swab_gnss_sat_info_idx(_p)
use the next device available on the system
#define _mbg_swab_pcps_hr_time_cycles(_p)
#define _pcps_ddev_io_base_mapped(_p, _n)
Current IRIG settings and supported codes.
#define IOCTL_GET_CYCLES_FREQUENCY
Configuration settings of a serial port.
_MBG_API_ATTR int _MBG_API mbg_get_tr_distance(MBG_DEV_HANDLE dh, TR_DISTANCE *p)
Read configurable "distance from transmitter" parameter from a device.
static __mbg_inline void mbg_get_pc_cycles(MBG_PC_CYCLES *p)
A structure used to configure optional settings.
PCPS_SECONDS sec
seconds since 1970, usually UTC scale
_MBG_API_ATTR int _MBG_API mbg_dev_has_corr_info(MBG_DEV_HANDLE dh, int *p)
Check if a device supports reading correlation info.
_MBG_API_ATTR int _MBG_API mbg_dev_has_ref_offs(MBG_DEV_HANDLE dh, int *p)
Check if a device provides a configurable ref time offset.
#define MBG_DEV_NAME_FMT
A string format specifier for MBG_DEV_NAME.
#define _mbg_swab_xmulti_ref_status_idx(_p)
_MBG_API_ATTR int _MBG_API mbg_dev_has_irig_time(MBG_DEV_HANDLE dh, int *p)
Check if a device supports the mbg_get_irig_time call.
MBG_CHK_SUPP_FNC _pcps_ddev_is_wwvb
Supports DAC control via PCI or USB bus API.
static __mbg_inline int num_bits_set(long val)
Count the number of bits which are not 0.
_MBG_API_ATTR int _MBG_API mbg_generic_write(MBG_DEV_HANDLE dh, int cmd, const void *p, int size)
#define IOCTL_GET_XMR_HOLDOVER_STATUS
_MBG_API_ATTR int _MBG_API mbg_get_all_irig_rx_info(MBG_DEV_HANDLE dh, const PCPS_DEV *pdev, IRIG_INFO *p_irig_info, MBG_REF_OFFS *p_ref_offs, MBG_OPT_INFO *p_opt_info)
Read all IRIG input configuration information from a device.
#define _pcps_ddev_requires_irig_workaround(_d)
_MBG_API_ATTR int _MBG_API mbg_get_gps_receiver_info(MBG_DEV_HANDLE dh, RECEIVER_INFO *p)
Read the RECEIVER_INFO structure from a device.
_MBG_API_ATTR int _MBG_API mbg_get_utc_parm(MBG_DEV_HANDLE dh, UTC *p)
Read a UTC parameter structure from a device.
_MBG_API_ATTR int _MBG_API mbg_dev_has_cab_len(MBG_DEV_HANDLE dh, int *p)
Check if a device supports configuration of antenna cable length.
#define MBGDEVIO_COMPAT_VERSION
#define _mbgdevio_gen_io(_dh, _type, _in_p, _in_sz, _out_p, _out_sz)
_MBG_API_ATTR int _MBG_API mbg_dev_has_tz(MBG_DEV_HANDLE dh, int *p)
Check if a device supports any kind of timezone configuration.
#define _pcps_ddev_has_debug_status(_p)
#define MBG_THREAD_FNC_RET_VAL
#define IOCTL_GET_GPS_TZDL
uint8_t PCPS_STATUS_PORT
Type of the status register port.
#define _int_from_size_t(_n)
_MBG_API_ATTR int _MBG_API mbg_dev_has_generic_io(MBG_DEV_HANDLE dh, int *p)
Check if a device supports the mbg_generic_io API call.
_MBG_API_ATTR int _MBG_API mbg_clr_ucap_buff(MBG_DEV_HANDLE dh)
Clear a device's on-board time capture FIFO buffer.
_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.
#define _mbgdevio_read_gps_chk(_dh, _cmd, _ioctl, _p, _sz, _cond)
#define IOCTL_SET_PCPS_IRIG_RX_SETTINGS
MBG_CHK_SUPP_FNC mbg_chk_dev_has_ptp
Check if a device supports PTP configuration/status calls.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_irig
Check if a device provides either an IRIG input or output.
feat_num field contains one of the PCPS_FEATURE_BITS
_MBG_API_ATTR int _MBG_API mbg_get_hr_time_cycles(MBG_DEV_HANDLE dh, PCPS_HR_TIME_CYCLES *p)
Read the current high resolution time plus the associated PC cycles from a device.
_MBG_API_ATTR int _MBG_API mbg_set_current_process_affinity_to_cpu(int cpu_num)
Set the CPU affinity of a process for a single CPU only.
#define _mbg_crit_sect_enter
Current settings and general capabilities of a specific unicast master.
int sn_cpy_str_safe(char *dst, size_t max_len, const char *src)
A function to copy a string safely, returning the number of characters copied.
_MBG_API_ATTR int _MBG_API mbg_get_hr_time(MBG_DEV_HANDLE dh, PCPS_HR_TIME *p)
Read the card's current time with high resolution, including status.
uint32_t flags
see XMR_INST_FLAG_BIT_MASKS
_MBG_API_ATTR int _MBG_API mbg_set_tzcode(MBG_DEV_HANDLE dh, const PCPS_TZCODE *p)
Write time zone/daylight saving configuration code to a device.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_asic_features
Check if a device supports the mbg_get_asic_features call.
#define mbg_rc_is_success(_rc)
MBG_CHK_SUPP_FNC mbg_chk_dev_has_gpio
Check if a device provides GPIO signal inputs and/or outputs.
_MBG_API_ATTR int _MBG_API mbg_get_fast_hr_timestamp(MBG_DEV_HANDLE dh, PCPS_TIME_STAMP *p)
Read a high resolution PCPS_TIME_STAMP structure via memory mapped access.
(-/w) PORT_SETTINGS_IDX, settings for specified serial port, only if RECEIVER_INFO::n_com_ports > 0 ...
uint8_t PCPS_SERIAL
Legacy definitions used to configure a device's serial port.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_ptp_unicast
Check if a device supports PTP unicast feature/configuration.
#define PCPS_GET_SYNTH_STATE
(r-) Read SYNTH_STATE, only if _pcps_has_synth
uint16_t GPS_CMD
The type of a GPS command code.
MBG_CHK_SUPP_FNC mbg_chk_dev_is_gps
Check if a device is a GPS receiver.
#define IOCTL_GET_GPS_STAT_INFO
#define PCPS_SET_SERIAL
(-w) Write serial settings as PCPS_SERIAL, deprecated by PC_GPS_PORT_SETTINGS_IDX, returns MBG_ERR_CFG on error
#define IOCTL_GET_ALL_XMR_INFO
_MBG_API_ATTR int _MBG_API mbg_get_gps_all_gpio_info(MBG_DEV_HANDLE dh, MBG_GPIO_INFO_IDX gii[], const MBG_GPIO_CFG_LIMITS *p_gcl)
Get all GPIO settings and capabilities.
#define _mbg_swab_ant_info(_p)
#define IOCTL_SET_GPS_PORT_PARM
_MBG_API_ATTR int _MBG_API mbg_get_ip4_settings(MBG_DEV_HANDLE dh, IP4_SETTINGS *p)
Read LAN IPv4 settings from a device.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_ucap
Check if a device supports the mbg_get_ucap_entries and mbg_get_ucap_event calls. ...
#define _mbgdevio_read_var_chk(_dh, _cmd, _ioctl, _p, _cond)
_MBG_API_ATTR int _MBG_API mbg_dev_has_asic_version(MBG_DEV_HANDLE dh, int *p)
Check if a device supports the mbg_get_asic_version call.
#define _pcps_ddev_has_generic_io(_p)
#define PCPS_SET_IRIG_RX_SETTINGS
(-w) Write IRIG_SETTINGS, only if _pcps_is_irig_rx, returns MBG_ERR_CFG on error
#define _pcps_ddev_has_pcps_tzdl(_p)
MBG_CHK_SUPP_FNC mbg_chk_dev_is_pci
Check if the device is connected via the PCI bus.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_hr_time
Check if a device supports the mbg_get_hr_time... functions.
(r/-) n * MBG_GPIO_INFO_IDX, all GPIO info, only if GPS_HAS_GPIO
General GPIO config info to be read from a device.
#define IOCTL_GET_PCPS_STATUS_PORT
uint8_t n_com_ports
number of on-board serial ports
Time read from a device plus associated system cycles count.
#define _mbg_swab_corr_info(_p)
_MBG_API_ATTR int _MBG_API mbg_get_time_cycles(MBG_DEV_HANDLE dh, PCPS_TIME_CYCLES *p)
Read the current time plus the associated PC cycles from a device.
#define _pcps_ddev_is_irig_rx(_p)
_NO_MBG_API_ATTR int _MBG_API chk_dev_receiver_info(const RECEIVER_INFO *p)
_MBG_API_ATTR int _MBG_API mbg_get_next_evt_log_entry(MBG_DEV_HANDLE dh, MBG_EVT_LOG_ENTRY *p)
Read the next event log entry from a device.
#define _mbg_swab_mbg_time_scale_settings(_p)
#define _mbgdevio_write_gps_var(_dh, _cmd, _ioctl, _p)
_MBG_API_ATTR int _MBG_API mbg_dev_fn_from_dev_idx(char *s, int max_len, int dev_idx)
Create a device file name associated with an index number.
#define IOCTL_SET_REF_OFFS
_MBG_API_ATTR MBG_DEV_HANDLE _MBG_API mbg_open_device_by_name(const MBG_DEV_NAME srch_name, int selection_mode)
Return a handle to a device with a particular device name.
#define IOCTL_SET_IP4_SETTINGS
_MBG_API_ATTR int _MBG_API mbg_set_ptp_cfg_settings(MBG_DEV_HANDLE dh, const PTP_CFG_SETTINGS *p)
Write PTP/IEEE1588 configuration settings to a device.
_MBG_API_ATTR MBG_PC_CYCLES_FREQUENCY _MBG_API mbg_get_default_cycles_frequency(void)
Retrieve the system's default cycles counter frequency.
(-/w) XYZ, current position in ECEF coordinates, only if GPS_MODEL_HAS_POS_XYZ
#define IOCTL_GET_GPS_ANT_CABLE_LEN
_MBG_API_ATTR int _MBG_API mbg_dev_has_raw_irig_data(MBG_DEV_HANDLE dh, int *p)
Check if a device supports the mbg_get_raw_irig_data call.
_MBG_API_ATTR int _MBG_API mbgdevio_check_version(int header_version)
Check if the DLL/shared library is compatible with a given version.
High resolution time stamp plus associated system cycles count.
(r/w) TZDL, time zone / daylight saving, only if GPS_MODEL_HAS_TZDL
#define IOCTL_SET_GNSS_MODE_SETTINGS
#define _mbgdevio_gen_read_gps(_dh, _cmd, _p, _sz)
(r/w) ANT_CABLE_LEN, length of antenna cable, only if GPS_MODEL_HAS_ANT_CABLE_LEN ...
#define IOCTL_CLR_EVT_LOG
Status of the time capture FIFO buffer.
_MBG_API_ATTR int _MBG_API mbg_get_asic_features(MBG_DEV_HANDLE dh, PCI_ASIC_FEATURES *p)
Read the features of the on-board PCI/PCIe interface ASIC.
static int chk_bus_flags(MBG_DEV_HANDLE dh, int bus_flag_mask)
Check if device is a specific bus type.
#define _mbg_swab_irig_ctrl_bits(_p)
Configuration settings for a single programmable pulse output.
_MBG_API_ATTR int _MBG_API mbg_set_gps_xmr_settings_idx(MBG_DEV_HANDLE dh, const XMULTI_REF_SETTINGS_IDX *p)
Write a single XMR setting to a device.
#define _mbg_swab_mbg_time_info_tstamp(_p)
(r/-) BVAR_STAT, status of buffered variables, only if GPS_MODEL_HAS_BVAR_STAT
#define _mbg_swab_bvar_stat(_p)
_MBG_API_ATTR int _MBG_API mbg_dev_has_asic_features(MBG_DEV_HANDLE dh, int *p)
Check if a device supports the mbg_get_asic_features call.
uint16_t BVAR_STAT
Status flags of battery buffered data.
_MBG_API_ATTR int _MBG_API mbg_get_fast_hr_timestamp_comp(MBG_DEV_HANDLE dh, PCPS_TIME_STAMP *p, int32_t *hns_latency)
Read a high resolution timestamp and compensate the latency of the call.
_MBG_API_ATTR int _MBG_API mbg_get_fast_hr_timestamp_cycles(MBG_DEV_HANDLE dh, PCPS_TIME_STAMP_CYCLES *p)
Read a high resolution PCPS_TIME_STAMP_CYCLES structure via memory mapped access. ...
MBG_CHK_SUPP_FNC mbg_chk_dev_is_gnss
Check if a device supports GNSS configuration.
(-/w) LLA, current position in geographic coordinates, only if GPS_MODEL_HAS_POS_LLA ...
see XMRIF_BIT_HOLDOVER_STATUS_SUPP
Time scale configuration settings.
#define _mbg_swab_mbg_evt_log_entry(_p)
#define IOCTL_CHK_DEV_FEAT
_MBG_API_ATTR void _MBG_API mbg_split_dev_name(const MBG_DEV_NAME dev_name, char *type_name, size_t type_name_size, char *sernum, size_t sernum_size)
Split an MBG_DEV_NAME into the 'type name' and 'serial number' components.
#define _pcps_has_receiver_info(_d)
#define GPS_HAS_PTP_UNICAST
see GPS_FEAT_PTP_UNICAST
_MBG_API_ATTR int _MBG_API mbg_get_synth(MBG_DEV_HANDLE dh, SYNTH *p)
Read the current frequency synthesizer settings from a device.
_MBG_API_ATTR int _MBG_API mbg_dev_has_xmr(MBG_DEV_HANDLE dh, int *p)
Check if a device provides extended multi ref (XMR) inputs.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_utc_parm
Check if a device support reading/writing of UTC parameters.
PCPS_TIME_STAMP tstamp
High resolution time stamp (UTC)
_MBG_API_ATTR int _MBG_API mbg_dev_is_lwr(MBG_DEV_HANDLE dh, int *p)
Check if a device is any long wave signal receiver.
#define PCPS_SET_TZCODE
(-w) Write PCPS_TZCODE, only if _pcps_has_tzcode, returns MBG_ERR_CFG on error
#define _mbg_swab_ptp_uc_master_info_idx(_p)
#define IOCTL_GET_DEBUG_STATUS
#define _pcps_ddev_has_ref_offs(_p)
#define PCPS_NUM_EVT_LOG_ENTRIES
(r-) Read MBG_NUM_EVT_LOG_ENTRIES, only if _pcps_has_evt_log
#define IOCTL_GET_PTP_CFG_INFO
int32_t utc_offs
UTC offs [sec] (loc_time = tstamp + utc_offs)
static int lookup_dev_idx_ex(const PCPS_DEV *dev_array, int n_dev, const char *type_name, const char *sernum, int selection_mode)
Lookup a specific device in an array, depending on a match code.
Specification of a local time zone.
uint16_t n_xmr_settings
number of XMULTI_REF_INFO_IDX or XMULTI_REF_STATUS_IDX which can be retrieved
_MBG_API_ATTR int _MBG_API mbg_dev_has_gpio(MBG_DEV_HANDLE dh, int *p)
Check if a device provides GPIO signal inputs and/or outputs.
_MBG_API_ATTR int _MBG_API mbg_get_ptp_cfg_info(MBG_DEV_HANDLE dh, PTP_CFG_INFO *p)
Read PTP/IEEE1588 config info and current settings from a device.
double A0
+- Clock Correction Coefficient 0 [sec]
int mbg_get_xhrt_cycles_frequency(MBG_XHRT_INFO *p, MBG_PC_CYCLES_FREQUENCY *p_freq_hz)
Retrieve the frequency of the system's cycles counter.
_MBG_API_ATTR int _MBG_API mbg_dev_has_ucap(MBG_DEV_HANDLE dh, int *p)
Check if a device supports the mbg_get_ucap_entries and mbg_get_ucap_event calls. ...
(r/-) IP4_SETTINGS, LAN interface state, only if PCPS_HAS_LAN_INTF
A structure holding a time stamp / cycles count pair.
A GPIO port's current settings and limits, plus port index.
#define PCPS_GIVE_UCAP_ENTRIES
(r-) Read PCPS_UCAP_ENTRIES, only if _pcps_has_ucap
#define IOCTL_GET_ALL_GNSS_SAT_INFO
#define IOCTL_GET_PCPS_TIME_SEC_CHANGE
_MBG_API_ATTR int _MBG_API mbg_set_time(MBG_DEV_HANDLE dh, const PCPS_STIME *p)
Set the device's on-board clock to a given date and time.
uint16_t n_devs
the number of devices handled by the driver
uint16_t model_code
identifier for receiver model, see GPS_MODEL_CODES
PCPS_TIME_STATUS_X status
status bits, see PCPS_TIME_STATUS_FLAGS
#define PCPS_FIRST_EVT_LOG_ENTRY
(r-) Read first (oldest) MBG_EVT_LOG_ENTRY, only if _pcps_has_evt_log
#define IOCTL_GET_GPS_ENABLE_FLAGS
#define _pcps_ddev_has_ptp_unicast(_p)
current second is leap second
MBG_CHK_SUPP_FNC mbg_chk_dev_has_corr_info
Check if a device supports reading correlation info.
#define IOCTL_SET_PCPS_SERIAL
#define IOCTL_GET_IRIG_TIME
_MBG_API_ATTR int _MBG_API mbg_get_time_info_hrt(MBG_DEV_HANDLE dh, MBG_TIME_INFO_HRT *p)
Read both system time and associated device time from the kernel driver.
Information on a specific supported string format.
#define _mbg_swab_xmr_holdover_status(_p)
#define _mbg_swab_pcps_hr_time(_p)
_MBG_API_ATTR int _MBG_API mbg_dev_has_serial_hs(MBG_DEV_HANDLE dh, int *p)
#define MBG_ERR_LIB_NOT_COMPATIBLE
Installed shared library version not compatible with version used at build time.
#define IOCTL_GET_TIME_INFO_TSTAMP
Reference source configuration for a specific priority level.
(-/w) GPS_CMD, send one of the PC_GPS_COMMANDS
_MBG_API_ATTR int _MBG_API mbg_dev_has_tr_distance(MBG_DEV_HANDLE dh, int *p)
Check if a device supports configurable distance from transmitter.
_MBG_API_ATTR int _MBG_API mbg_set_process_affinity(MBG_PROCESS_ID pid, MBG_CPU_SET *p)
Set the CPU affinity of a process.
#define _mbgdevio_gen_read(_dh, _cmd, _p, _sz)
#define IOCTL_GET_GPS_ANT_INFO
Register layout of a PCI ASIC.
#define _setup_default_receiver_info_dcf(_p, _pdev)
Initialize a RECEIVER_INFO structure for legacy DCF77 receivers.
#define _mbg_swab_pout_settings_idx_on_set(_p)
Date time and status used with the PCPS_SET_TIME command.
_MBG_API_ATTR int _MBG_API mbg_dev_has_fast_hr_timestamp(MBG_DEV_HANDLE dh, int *p)
Check if a device supports the mbg_get_fast_hr_timestamp_...() calls.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_tr_distance
Check if a device supports configurable distance from transmitter.
IRIG or similar time code, see http://www.meinberg.de/english/info/irig.htm.
use only exactly the excat matching device, otherwise fail
MBG_CHK_SUPP_FNC mbg_chk_dev_is_tcr
Check if a device provides a configurable IRIG input.
_MBG_API_ATTR int _MBG_API mbg_dev_has_ptp_unicast(MBG_DEV_HANDLE dh, int *p)
Check if a device supports PTP unicast feature/configuration.
MBG_DEV_NAME_LIST_ENTRY * next
A status structure provided by the time polling thread function.
#define IOCTL_SET_PTP_CFG_SETTINGS
_MBG_API_ATTR int _MBG_API mbg_get_gps_port_parm(MBG_DEV_HANDLE dh, PORT_PARM *p)
Read a PORT_PARM structure with a device's serial port configuration.
uint16_t ANT_CABLE_LEN
A data type used to configure the length of an antenna cable [m].
_MBG_API_ATTR int _MBG_API mbg_get_tzcode(MBG_DEV_HANDLE dh, PCPS_TZCODE *p)
Read time zone/daylight saving configuration code from a device.
_MBG_API_ATTR int _MBG_API mbg_get_default_cycles_frequency_from_dev(MBG_DEV_HANDLE dh, MBG_PC_CYCLES_FREQUENCY *p)
Retrieve the system's default cycles counter frequency from the kernel driver.
#define _pcps_has_ref_offs(_d)
#define _pcps_ddev_has_corr_info(_p)
#define IOCTL_GET_REF_OFFS
_MBG_API_ATTR int _MBG_API mbg_get_device_info(MBG_DEV_HANDLE dh, PCPS_DEV *p)
Read detailed device information.
_MBG_API_ATTR MBG_DEV_HANDLE _MBG_API mbg_open_device(int dev_idx)
Open a device by index number.
A structure to used to query the current configuration and capabilities of a PTP port.
_MBG_API_ATTR int _MBG_API mbg_dev_has_opt_flags(MBG_DEV_HANDLE dh, int *p)
Check if a device supports the MBG_OPT_INFO/MBG_OPT_SETTINGS.
#define _mbg_swab_mbg_gpio_info_idx(_p, _recv)
_MBG_API_ATTR int _MBG_API mbg_get_process_affinity(MBG_PROCESS_ID pid, MBG_CPU_SET *p)
Read the CPU affinity of a process.
#define IOCTL_PCPS_CLR_UCAP_BUFF
#define IOCTL_GET_CORR_INFO
double XYZ[N_XYZ]
A position in cartesian coordinates.
#define IOCTL_GET_PCPS_UCAP_ENTRIES
#define _mbg_swab_lan_if_info(_p)
_MBG_API_ATTR int _MBG_API mbg_dev_has_irig(MBG_DEV_HANDLE dh, int *p)
Check if a device provides either an IRIG input or output.
_MBG_API_ATTR int _MBG_API mbg_chk_dev_is_wwvb(MBG_DEV_HANDLE dh)
Check if a device is a WWVB receiver.
(r/w) MBG_GNSS_MODE_INFO / MBG_GNSS_MODE_SETTINGS, only if PCPS_IS_GNSS
A structure used to report the synthesizer state.
MBG_CHK_SUPP_FNC mbg_chk_dev_is_isa
Check if the device is connected via the ISA bus.
_MBG_API_ATTR int _MBG_API mbg_get_irig_time(MBG_DEV_HANDLE dh, PCPS_IRIG_TIME *p)
Read the IRIG time and day-of-year number from an IRIG receiver.
#define _mbg_swab_ttm(_p)
int do_chk_dev_feat_deprecated(MBG_DEV_HANDLE dh, MBG_CHK_SUPP_FNC *fnc, int *p)
A generic function to implement Deprecated mbgdevio functions to check if a particular feature is sup...
High resolution device time stamp, system time, and associated cycles counts.
#define _mbgdevio_write_var(_dh, _cmd, _ioctl, _p)
#define IOCTL_GET_PCI_ASIC_VERSION
A structure used to transmit information on date and time.
#define GPS_HAS_XMULTI_REF
see GPS_FEAT_XMULTI_REF
_MBG_API_ATTR int _MBG_API mbg_get_serial(MBG_DEV_HANDLE dh, PCPS_SERIAL *p)
Read the serial port configuration from an old type of device.
(-/w) XMULTI_REF_SETTINGS_IDX, idx 0..XMULTI_REF_INSTANCES::n_xmr_settings-1, only if GPS_HAS_XMULTI_...
#define IOCTL_SET_GPS_TZDL
#define PCPS_BUS_ISA
IBM compatible PC/AT ISA bus.
#define PCPS_SET_TR_DISTANCE
(-w) Write TR_DISTANCE, only if _pcps_has_tr_distance
#define _mbg_crit_sect_init
_MBG_API_ATTR int _MBG_API mbg_dev_has_event_time(MBG_DEV_HANDLE dh, int *p)
Check if a device supports setting an event time.
_MBG_API_ATTR int _MBG_API mbg_get_gps_all_port_info(MBG_DEV_HANDLE dh, PORT_INFO_IDX pii[], const RECEIVER_INFO *p_ri)
Read a PORT_INFO_IDX array of supported serial port configurations.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_irig_time
Check if a device supports the mbg_get_irig_time call.
_MBG_API_ATTR int _MBG_API mbg_set_gps_gnss_mode_settings(MBG_DEV_HANDLE dh, const MBG_GNSS_MODE_SETTINGS *p_ms)
Write the GNSS mode configuration to a device.
#define _pcps_ddev_has_hr_time(_p)
MBG_CHK_SUPP_FNC mbg_chk_dev_has_ref_offs
Check if a device provides a configurable ref time offset.
(r/-) n * MBG_GPIO_STATUS_IDX, where n == MBG_GPIO_CFG_LIMITS::num_io, only if MBG_GPIO_CFG_LIMIT_FLA...
#define PCPS_GIVE_UCAP_EVENT
(r-) Return oldest event as PCPS_HR_TIME, only if _pcps_has_ucap
(r/-) XMULTI_REF_INSTANCES, only if GPS_HAS_XMULTI_REF and GPS_HAS_XMRS_MULT_INSTC ...
#define PCPS_GIVE_TIME
Command codes used to communicate with bus level devices.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_lan_intf
Check if a device supports simple LAN interface API calls.
#define _mbg_swab_synth(_p)
A GPIO port's current settings, plus port index.
PCPS_FRAC_32 frac
binary fractions of second, see PCPS_FRAC_32
#define PCPS_GET_TR_DISTANCE
(r-) Read TR_DISTANCE, only if _pcps_has_tr_distance
_MBG_API_ATTR int _MBG_API mbg_dev_has_receiver_info(MBG_DEV_HANDLE dh, int *p)
Check if a device supports the RECEIVER_INFO structure and related calls.
(r/w) PTP_CFG_SETTINGS / PTP_CFG_INFO, only if PCPS_HAS_PTP
#define _pcps_has_opt_flags(_d)
MBG_CHK_SUPP_FNC mbg_chk_dev_has_pcps_tzdl
Check if a device supports timezone configuration using the PCPS_TZDL structure.
#define IOCTL_GET_PCPS_SYNC_TIME
_MBG_API_ATTR int _MBG_API mbg_dev_has_ptp(MBG_DEV_HANDLE dh, int *p)
Check if a device supports PTP configuration/status calls.
Limits to be considered when specifying PTP unicast masters.
The structure behind the MBG_DEV_FN_LIST_ENTRY type.
#define IOCTL_DEV_HAS_SIGNAL
uint32_t PCI_ASIC_FEATURES
A data type to hold the PCI ASIC feature flags mask.
_MBG_API_ATTR int _MBG_API mbg_set_gps_pos_xyz(MBG_DEV_HANDLE dh, const XYZ p)
Set the GPS receiver position using XYZ coordinates.
char PCPS_SN_STR[(16+1)]
A buffer for a serial number string, including terminating 0.
_MBG_API_ATTR int _MBG_API mbg_get_synth_state(MBG_DEV_HANDLE dh, SYNTH_STATE *p)
Read the current status of the on-board frequency synthesizer.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_gps_data
Check if a device supports large configuration data structures.
#define IOCTL_DEV_HAS_IRIG
#define IOCTL_GET_GPIO_CFG_LIMITS
#define _mbgdevio_write_gps_var_chk(_dh, _cmd, _ioctl, _p, _cond)
_MBG_API_ATTR int _MBG_API mbg_get_gps_stat_info(MBG_DEV_HANDLE dh, STAT_INFO *p)
Read the extended GPS receiver status from a device.
#define _pcps_ddev_has_xmr(_p)
int MBG_CHK_SUPP_FNC(MBG_DEV_HANDLE dh)
The type of functions to check if a feature is supported.
#define _mbg_swab_stat_info(_p)
PCPS_TIME_STAMP tstamp
High resolution time stamp (UTC)
#define _pcps_ddev_can_clr_ucap_buff(_p)
#define IOCTL_DEV_HAS_MOD
_MBG_API_ATTR int _MBG_API mbg_get_sync_time(MBG_DEV_HANDLE dh, PCPS_TIME *p)
Read the time when the device has last recently synchronized.
#define IOCTL_GET_GPS_BVAR_STAT
_MBG_API_ATTR int _MBG_API mbg_get_ptp_uc_master_cfg_limits(MBG_DEV_HANDLE dh, PTP_UC_MASTER_CFG_LIMITS *p)
Read PTP/IEEE1588 unicast master configuration limits from a device.
#define _mbgdevio_gen_write_gps(_dh, _cmd, _p, _sz)
_MBG_API_ATTR int _MBG_API mbg_get_ptp_state(MBG_DEV_HANDLE dh, PTP_STATE *p)
Read PTP/IEEE1588 status from a device.
Configuration settings for a specific programmable pulse output.
#define _mbg_swab_double(_p)
(r/w) IP4_SETTINGS, LAN interface configuration, only if PCPS_HAS_LAN_INTF
A structure used to configure optional settings.
_MBG_API_ATTR int _MBG_API mbg_dev_has_tzdl(MBG_DEV_HANDLE dh, int *p)
Check if a device supports timezone configuration using the TZDL structure.
#define _mbg_swab_ip4_settings(_p)
uint32_t flags
see MBG_GPIO_CFG_LIMIT_FLAG_MASKS
int16_t MBG_REF_OFFS
A data type used to configure the ref offset.
Request buffer used to query a device feature.
#define _mbg_swab_mbg_gnss_mode_info(_p)
#define IOCTL_GET_SYNTH_STATE
#define PCPS_SET_SYNTH
(-w) Write SYNTH, only if _pcps_has_synth, returns MBG_ERR_CFG on error
_MBG_API_ATTR int _MBG_API mbg_get_gps_gnss_mode_info(MBG_DEV_HANDLE dh, MBG_GNSS_MODE_INFO *p_mi)
Read the current GNSS mode info including current settings.
#define _mbg_swab_mbg_opt_settings(_p)
_MBG_API_ATTR int _MBG_API mbg_dev_has_synth(MBG_DEV_HANDLE dh, int *p)
Check if a device provides a programmable frequency synthesizer.
#define _mbgdevio_write_var_chk(_dh, _cmd, _ioctl, _p, _cond)
#define IOCTL_SET_GPS_POUT_SETTINGS_IDX
#define _pcps_ddev_is_gnss(_p)
#define _pcps_ddev_has_gpio(_p)
#define _mbg_swab_mbg_num_evt_log_entries(_p)
#define _mbg_swab_pcps_irig_time(_p)
_MBG_API_ATTR int _MBG_API mbg_dev_can_clr_ucap_buff(MBG_DEV_HANDLE dh, int *p)
Check if a device supports the mbg_clr_ucap_buff call.
int mbg_thread_stop(MBG_THREAD_INFO *p_ti)
Stop a thread which has been created by mbg_thread_create.
#define IOCTL_GET_ALL_PTP_UC_MASTER_INFO
#define _mbg_swab_ptp_state(_p)
#define IOCTL_GET_GNSS_MODE_INFO
General info on supported XMR sources and instances.
_MBG_API_ATTR int _MBG_API mbg_dev_has_hr_time(MBG_DEV_HANDLE dh, int *p)
Check if a device supports the HR_TIME functions.
char MBG_DEV_NAME[10+(16+1)+1]
A string buffer for a unique device ID.
(r/-) PTP_STATE, only if PCPS_HAS_PTP
_MBG_API_ATTR int _MBG_API mbg_set_gps_tzdl(MBG_DEV_HANDLE dh, const TZDL *p)
Write the card's time zone/daylight saving parameters.
_MBG_API_ATTR int _MBG_API mbg_get_gps_all_gpio_status(MBG_DEV_HANDLE dh, MBG_GPIO_STATUS_IDX gsi[], const MBG_GPIO_CFG_LIMITS *p_gcl)
Read the status of all GPIO signal ports.
#define _pcps_ddev_has_serial_hs(_p)
_MBG_API_ATTR int _MBG_API mbg_dev_is_dcf(MBG_DEV_HANDLE dh, int *p)
Check if a device is a DCF77 receiver.
static int lookup_dev_idx(const PCPS_DEV *dev_array, int n_dev, const char *type_name, const char *sernum)
Lookup a specific device in an array of PCPS_DEV structures.
_MBG_API_ATTR int _MBG_API mbg_set_event_time(MBG_DEV_HANDLE dh, const PCPS_TIME_STAMP *p)
(r/-) n * PORT_INFO_IDX, settings and capabilities of all serial ports, only if RECEIVER_INFO::n_com_...
MBG_CHK_SUPP_FNC mbg_chk_dev_has_debug_status
Check if a device provides a debug status word to be read.
(r/-) POS, position XYZ, LLA, and DMS combined, only if GPS_MODEL_HAS_POS
#define PCPS_BUS_PCI_MBGPEX
_MBG_API_ATTR int _MBG_API mbg_get_gps_all_pout_info(MBG_DEV_HANDLE dh, POUT_INFO_IDX pii[], const RECEIVER_INFO *p_ri)
Read current configuraton and features provided by the programmable pulse outputs.
(r/-) n * GNSS_SAT_INFO_IDX, satellite info, only if PCPS_IS_GNSS
DCF77 long wave signal (Germany), see http://www.meinberg.de/english/info/dcf77.htm.
MBG_CHK_SUPP_FNC mbg_chk_dev_can_clr_ucap_buff
Check if a device supports the mbg_clr_ucap_buff call.
#define _mbg_swab_mbg_gpio_settings_idx(_p, _recv)
_MBG_API_ATTR int _MBG_API mbg_get_first_evt_log_entry(MBG_DEV_HANDLE dh, MBG_EVT_LOG_ENTRY *p)
Read the first (oldest) event log entry from a device.
#define _pcps_ddev_has_ucap(_p)
(r/-) MBG_GPIO_CFG_LIMITS, only if GPS_HAS_GPIO
#define IOCTL_GET_GPS_TIME
#define _mbg_swab_irig_info(_p)
#define _mbg_swab_pcps_time_stamp(_p)
#define _mbg_swab_port_parm(_p)
MBG_CHK_SUPP_FNC mbg_chk_dev_has_serial_hs
_MBG_API_ATTR int _MBG_API mbg_dev_is_wwvb(MBG_DEV_HANDLE dh, int *p)
Check if a device is a WWVB receiver.
_MBG_API_ATTR int _MBG_API mbg_get_gps_bvar_stat(MBG_DEV_HANDLE dh, BVAR_STAT *p)
Retrieve the status of the battery buffered GPS variables.
#define IOCTL_SET_GPIO_SETTINGS_IDX
#define _mbg_swab_gps_cmd(_p)
JJY long wave signal (Japan)
#define PCPS_SET_OPT_SETTINGS
(-w) Write MBG_OPT_SETTINGS, only if _pcps_has_opt_flags, returns MBG_ERR_CFG on error ...
#define IOCTL_GET_PCI_ASIC_FEATURES
MBG_CHK_SUPP_FNC mbg_chk_dev_has_raw_irig_data
Check if a device supports the mbg_get_raw_irig_data call.
One of several sets of satellite information for a particular GNSS type.
#define _mbgdevio_chk_cond(_cond)
#define _mbgdevio_read_var(_dh, _cmd, _ioctl, _p)
#define PCPS_GET_REF_OFFS
(r-) Read MBG_REF_OFFS, only if _pcps_has_ref_offs
_MBG_API_ATTR int _MBG_API mbg_get_irq_stat_info(MBG_DEV_HANDLE dh, PCPS_IRQ_STAT_INFO *p)
Read a device's IRQ status information.
int pcps_chk_dev_feat(PCPS_DDEV *p_ddev, uint feat_type, uint feat_num)
Check if a specific feature of a specific feature type is supported.
#define IOCTL_GET_PCPS_IRIG_TX_INFO
#define PCPS_GIVE_IRIG_TIME
(r-) Read raw IRIG time as PCPS_IRIG_TIME, only if _pcps_has_irig_time
#define PCPS_SET_TIME
(-w) Set on-board time, see PCPS_STIME. Returns MBG_ERR_STIME on error.
(r/-) RECEIVER_INFO, rcvr model info, only if PCPS_HAS_RECEIVER_INFO
#define _pcps_ddev_has_irig(_p)
_MBG_API_ATTR int _MBG_API mbg_set_synth(MBG_DEV_HANDLE dh, const SYNTH *p)
Write frequency synthesizer configuration settings to a device.
Time zone / daylight saving parameters.
#define _mbg_swab_str_type_info_idx(_p)
PORT_SETTINGS port_settings
#define _mbgdevio_read_gps_var(_dh, _cmd, _ioctl, _p)
#define MBG_FRAC32_UNITS_PER_SEC
Constant used to convert e.g. PCPS_TIME_STAMP::frac values.
(r/-) LAN_IF_INFO, LAN interface info, only if PCPS_HAS_LAN_INTF
#define MBG_SUCCESS
Error codes used with Meinberg devices and drivers.
#define _mbg_swab_enable_flags(_p)
#define _mbg_swab_mbg_time_info_hrt(_p)
#define _mbg_swab_xmulti_ref_info_idx(_p)
_MBG_API_ATTR int _MBG_API mbg_get_num_evt_log_entries(MBG_DEV_HANDLE dh, MBG_NUM_EVT_LOG_ENTRIES *p)
Read details about a device's on-board event log buffer.
#define PCPS_GET_IRIG_RX_INFO
(r-) Read IRIG_INFO, only if _pcps_is_irig_rx
_MBG_API_ATTR int _MBG_API mbg_generic_io(MBG_DEV_HANDLE dh, int type, const void *in_p, int in_sz, void *out_p, int out_sz)
#define _mbg_swab_pout_info_idx_on_get(_p)
_MBG_API_ATTR int _MBG_API mbg_get_gps_tzdl(MBG_DEV_HANDLE dh, TZDL *p)
Read the card's time zone/daylight saving parameters.
_MBG_API_ATTR int _MBG_API mbg_get_drvr_info(MBG_DEV_HANDLE dh, PCPS_DRVR_INFO *p)
Read information about the driver handling a given device.
uint32_t PCPS_IRQ_STAT_INFO
#define IOCTL_SET_PTP_UC_MASTER_SETTINGS_IDX
Synthesizer configuration parameters.
#define _pcps_ddev_has_signal(_p)
MBG_CHK_SUPP_FNC mbg_chk_dev_has_irig_tx
Check if a device provides a configurable IRIG output.
#define _mbg_cpu_set(_i, _ps)
MBG_CHK_SUPP_FNC mbg_chk_dev_has_fast_hr_timestamp
Check if a device supports the mbg_get_fast_hr_timestamp... calls.
#define _mbgdevio_gen_write(_dh, _cmd, _p, _sz)
MBG_CHK_SUPP_FNC mbg_chk_dev_has_mod
Check if a device provides a modulation signal.
_MBG_API_ATTR void _MBG_API mbg_close_device(MBG_DEV_HANDLE *dev_handle)
Close a device handle and set the handle value to MBG_INVALID_DEV_HANDLE.
#define _pcps_ddev_has_fast_hr_timestamp(_p)
Reference source capabilities and current configuration for a specific priority level.
int mbg_thread_sleep_interruptible(MBG_THREAD_INFO *p_ti, ulong sleep_ms)
Let the current thread sleep for a certain interval.
(r/w) MBG_TIME_SCALE_SETTINGS / MBG_TIME_SCALE_INFO, only if PCPS_HAS_TIME_SCALE
#define PCPS_GET_IRIG_TX_INFO
(r-) Read IRIG_INFO, only if _pcps_has_irig_tx
_MBG_API_ATTR int _MBG_API mbg_clr_evt_log(MBG_DEV_HANDLE dh)
Clear the device's on-board event log.
#define PCPS_BUS_MCA
IBM PS/2 micro channel.
_MBG_API_ATTR int _MBG_API mbg_dev_has_irig_ctrl_bits(MBG_DEV_HANDLE dh, int *p)
Check if a device supports the mbg_get_irig_ctrl_bits call.
_MBG_API_ATTR int _MBG_API mbg_setup_receiver_info(MBG_DEV_HANDLE dh, const PCPS_DEV *p_dev, RECEIVER_INFO *p)
Set up a RECEIVER_INFO structure for a device.
static MBG_PC_CYCLES_FREQUENCY pc_cycles_frequency
_MBG_API_ATTR int _MBG_API mbg_get_gpio_cfg_limits(MBG_DEV_HANDLE dh, MBG_GPIO_CFG_LIMITS *p)
Read common GPIO configuration limits.
A geographic position represented in different formats.
_MBG_API_ATTR int _MBG_API mbg_dev_has_utc_parm(MBG_DEV_HANDLE dh, int *p)
Check if a device support reading/writing of UTC parameters.
MSF long wave signal (UK)
_MBG_API_ATTR void _MBG_API mbg_free_device_name_list(MBG_DEV_NAME_LIST_ENTRY *list)
Free the memory allocated for a list of MBG_DEV_NAME_LIST_ENTRY entries.
void MBG_THREAD_FNC(void *)
A generic type of a thread function.
#define _pcps_ddev_has_synth(_p)
A buffer used to read raw IRIG data bits from an IRIG receiver.
Status information on a specific GPIO port.
#define _mbg_swab_ant_cable_len(_p)
_MBG_API_ATTR int _MBG_API mbg_dev_has_mod(MBG_DEV_HANDLE dh, int *p)
Check if a device provides a modulation signal.
_MBG_API_ATTR int _MBG_API mbg_dev_is_msf(MBG_DEV_HANDLE dh, int *p)
Check if a device is a MSF receiver.
#define _pcps_ddev_has_tzcode(_p)
#define IOCTL_GET_ALL_GPIO_INFO
MBG_CHK_SUPP_FNC mbg_chk_dev_has_xmr
Check if a device provides eXtended Multi Ref (XMR) inputs.
_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.
MBG_CHK_SUPP_FNC mbg_chk_dev_is_usb
Check if the device is connected via the USB bus.
#define IOCTL_SET_GPS_ANT_CABLE_LEN
#define _mbg_swab_port_settings_idx(_p)
const char mbg_dev_fn_fmt[]
MBG_CHK_SUPP_FNC mbg_chk_dev_has_time_scale
Check if a device supports configurable time scales.
(r/-) n * PTP_UC_MASTER_INFO_IDX, only if PTP_CFG_MSK_SUPPORT_PTP_UNICAST
uint64_t MBG_PC_CYCLES_FREQUENCY
MBG_CHK_SUPP_FNC mbg_chk_dev_is_pci_express
Check if the device is connected via the PCI Express bus.
#define IOCTL_GET_IP4_STATE
_MBG_API_ATTR int _MBG_API mbg_set_gps_pout_settings(MBG_DEV_HANDLE dh, const POUT_SETTINGS *p, int idx)
Write the configuration for a single programmable pulse output.
_MBG_API_ATTR int _MBG_API mbg_set_ip4_settings(MBG_DEV_HANDLE dh, const IP4_SETTINGS *p)
Write LAN IPv4 settings to a device.
#define _pcps_ddev_has_tz(_p)
GPS satellite system, see http://www.meinberg.de/english/info/gps.htm.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_receiver_info
Check if a device supports the RECEIVER_INFO structure and related calls.
PZF correlation status info.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_opt_flags
Check if a device supports the MBG_OPT_INFO/MBG_OPT_SETTINGS.
static __mbg_inline MBG_PC_CYCLES mbg_delta_pc_cycles(const MBG_PC_CYCLES *p1, const MBG_PC_CYCLES *p2)
_MBG_API_ATTR int _MBG_API mbg_dev_is_gps(MBG_DEV_HANDLE dh, int *p)
Check if a device is a GPS receiver.
#define _mbg_inp32_to_cpu(_dev, _rsrc_idx, _port_addr)
MBG_CHK_SUPP_FNC mbg_chk_dev_has_signal
Check if a device provides the level of its inputs signal.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_tz
Check if a device supports any kind of timezone configuration.
#define _mbg_swab_tr_distance(_p)
#define IOCTL_GET_PCPS_HR_TIME
#define PCPS_GET_OPT_INFO
(r-) Read MBG_OPT_INFO, only if _pcps_has_opt_flags
MBG_CHK_SUPP_FNC mbg_chk_dev_has_generic_io
Check if a device supports the mbg_generic_io API call.
_MBG_API_ATTR MBG_DEV_HANDLE _MBG_API mbg_open_device_by_hw_id(const char *dev_fn)
Open a device specified by a device file name.
#define _mbg_swab_irig_settings(_p)
#define IOCTL_GET_XMR_INSTANCES
#define _mbg_swab_ptp_cfg_settings(_p)
MBG_CHK_SUPP_FNC mbg_chk_dev_is_lwr
Check if a device is any long wave signal receiver.
static __mbg_inline uint8_t _pcps_ddev_read_status_port(const PCPS_DDEV *pddev)
_MBG_API_ATTR int _MBG_API mbg_set_gps_pos_lla(MBG_DEV_HANDLE dh, const LLA p)
Set the GPS receiver position using LLA coordinates.
#define IOCTL_SET_TR_DISTANCE
#define IOCTL_SET_GPS_TIME_SCALE_SETTINGS
#define _setup_default_receiver_info_gps(_p)
Initialize a RECEIVER_INFO structure for legacy GPS receivers.
_MBG_API_ATTR int _MBG_API mbg_dev_has_evt_log(MBG_DEV_HANDLE dh, int *p)
Check if a device provides an on-board event log.
#define _mbg_swab_ptp_uc_master_cfg_limits(_p)
static int mbg_comp_hr_latency(PCPS_TIME_STAMP *ts, const MBG_PC_CYCLES *p_cyc_ts, const MBG_PC_CYCLES *p_cyc_ontime, const MBG_PC_CYCLES_FREQUENCY *p_cyc_freq, int32_t *hns_latency)
Update a PCPS_TIME_STAMP to compensate the latency of an API call.
_MBG_API_ATTR int _MBG_API mbg_get_debug_status(MBG_DEV_HANDLE dh, MBG_DEBUG_STATUS *p)
Read a debug status word from a device.
#define _mbgdevio_cnv_ret_val(_v)
High resolution time including status and local time offset.
#define PCPS_GET_RAW_IRIG_DATA
(r-) Read MBG_RAW_IRIG_DATA, only if _pcps_has_raw_irig_data
High resolution time plus associated system cycles count.
int mbg_get_xhrt_time_as_pcps_hr_time(MBG_XHRT_INFO *p, PCPS_HR_TIME *p_hrt)
Retrieve an extrapolated time stamp in PCPS_HR_TIME format.
#define _pcps_ddev_can_set_time(_p)
_MBG_API_ATTR int _MBG_API mbg_generic_write_gps(MBG_DEV_HANDLE dh, int cmd, const void *p, int size)
(r/w) PORT_PARM, param. of the serial ports, deprecated by PC_GPS_ALL_PORT_INFO
#define _pcps_ddev_has_asic_version(_p)
#define MBG_INVALID_DEV_HANDLE
Satellite receiver status information.
#define IOCTL_SET_PCPS_TZCODE
void swap_double(double *p)
Swap the bytes of a single variable of type "double".
#define _mbg_swab_tzdl(_p)
_MBG_API_ATTR int _MBG_API mbg_dev_has_signal(MBG_DEV_HANDLE dh, int *p)
Check if a device provides the level of its inputs signal.
_MBG_API_ATTR int _MBG_API mbg_dev_is_gnss(MBG_DEV_HANDLE dh, int *p)
Check if a device supports GNSS configuration.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_irig_ctrl_bits
Check if a device supports the mbg_get_irig_ctrl_bits call.
#define PCPS_GET_SYNTH
(r-) Read SYNTH, only if _pcps_has_synth
#define IOCTL_GET_GPS_ALL_POUT_INFO
Software revision information.
static int setup_dev_fn_list(MBG_DEV_FN_LIST_ENTRY **p_list, int max_devs)
Allocate and fill a list of device file names.
_MBG_API_ATTR int _MBG_API mbgdevio_get_version(void)
Get the version number of the precompiled DLL/shared object library.
#define IOCTL_GET_GPS_RECEIVER_INFO
MBG_CHK_SUPP_FNC mbg_chk_dev_has_asic_version
Check if a device supports the mbg_get_asic_version API call.
#define PCPS_SET_PCPS_TZDL
(-w) Write PCPS_TZDL, only if _pcps_has_pcps_tzdl, returns MBG_ERR_CFG on error
Current settings and general capabilities of a specific serial port.
uint32_t PCI_ASIC_VERSION
A data type to hold the PCI ASIC version code.
_MBG_API_ATTR int _MBG_API mbg_dev_has_pcps_tzdl(MBG_DEV_HANDLE dh, int *p)
Check if a device supports timezone configuration using the PCPS_TZDL structure.
#define PCPS_GET_PCPS_TZDL
(r-) Read PCPS_TZDL, only if _pcps_has_pcps_tzdl
#define _pcps_ddev_has_tr_distance(_p)
(r/-) GPS_STAT_INFO, satellite info, mode of operation, and DAC info, only if GPS_MODEL_HAS_STAT_INFO...
_MBG_API_ATTR int _MBG_API mbg_set_gps_port_parm(MBG_DEV_HANDLE dh, const PORT_PARM *p)
Write a PORT_PARM structure to configure the on-board serial ports.
_MBG_API_ATTR int _MBG_API mbg_get_ucap_entries(MBG_DEV_HANDLE dh, PCPS_UCAP_ENTRIES *p)
Read information on a device's event capture buffer.
PCPS_SIG_VAL signal
signal strength, see PCPS_SIG_VAL_DEFS, or capture input channel number
#define _mbg_get_current_process()
#define IOCTL_GET_PCPS_TIME
Local calendar date and time, plus sync status.
_MBG_API_ATTR int _MBG_API mbg_set_tr_distance(MBG_DEV_HANDLE dh, const TR_DISTANCE *p)
Write configurable "distance from transmitter" parameter to a device.
_MBG_API_ATTR int _MBG_API mbg_dev_has_lan_intf(MBG_DEV_HANDLE dh, int *p)
Check if a device supports simple LAN interface API calls.
#define IOCTL_GET_IRQ_STAT_INFO
_MBG_API_ATTR int _MBG_API mbg_dev_has_pzf(MBG_DEV_HANDLE dh, int *p)
Check if a device supports demodulation of the DCF77 PZF code.
#define IOCTL_GET_IP4_SETTINGS
#define _pcps_has_ri_ptp_unicast(_p_ri)
_MBG_API_ATTR int _MBG_API mbg_set_irig_tx_settings(MBG_DEV_HANDLE dh, const IRIG_SETTINGS *p)
Write an IRIG_SETTINGS structure to a device to configure the IRIG output.
#define IOCTL_SET_GPS_TIME
feat_num field contains one of the MBG_XFEATURE_BITS
#define IOCTL_SET_XMR_SETTINGS_IDX
#define PCPS_CLR_EVT_LOG
(-w) Write clear on-board event log, only if _pcps_has_evt_log
void _MBG_INIT_CODE_ATTR pcps_detect_devices(int isa_ports[PCPS_MAX_ISA_CARDS], int isa_irqs[PCPS_MAX_ISA_CARDS])
Detect all bus-level devices in a non-PnP system.
see MBG_GPIO_CFG_LIMIT_FLAG_BIT_STATUS_SUPP
uint16_t idx
0..RECEIVER_INFO::n_prg_out-1
A high resolution time stamp.
#define _mbg_swab_synth_state(_p)
#define IOCTL_GET_GPS_UTC_PARM
double LLA[N_LLA]
A geographic position based on latitude, longitude, and altitude.
#define _pcps_ddev_has_opt_flags(_p)
(r/-) n * XMULTI_REF_INFO_IDX, where n == XMULTI_REF_INSTANCES::n_xmr_settings, only if GPS_HAS_XMULT...
(-/w) PTP_UC_MASTER_SETTINGS_IDX, only if PTP_CFG_MSK_SUPPORT_PTP_UNICAST
#define _mbg_swab_utc_parm(_p)
WWVB long wave signal (U.S.)
_MBG_API_ATTR int _MBG_API mbg_set_gps_port_settings_idx(MBG_DEV_HANDLE dh, const PORT_SETTINGS_IDX *p)
Write the configuration for a single serial port to a device.
#define IOCTL_GET_PCPS_TZDL
Configuration settings of an IRIG input or output.
#define _pcps_ddev_has_mod(_p)
#define _pcps_type_name(_d)
#define PCPS_GET_TZCODE
(r-) Read PCPS_TZCODE, only if _pcps_has_tzcode
int snprintf_safe(char *s, size_t max_len, const char *fmt,...)
A portable, safe implementation of snprintf()
uint8_t n_prg_out
number of programmable pulse outputs
MBG_DEV_FN_LIST_ENTRY * next
#define IOCTL_GET_TIME_INFO_HRT
#define _pcps_ddev_has_utc_parm(_p)
_MBG_API_ATTR int _MBG_API mbg_get_opt_info(MBG_DEV_HANDLE dh, MBG_OPT_INFO *p)
Read a MBG_OPT_INFO structure containing optional settings, controlled by flags.
#define MBG_ERR_NOT_SUPP_BY_DEV
Command or feature not supported by device.
#define IOCTL_GET_ALL_GPIO_STATUS
#define _mbg_crit_sect_destroy
#define PCPS_NEXT_EVT_LOG_ENTRY
(r-) Read next MBG_EVT_LOG_ENTRY, only if _pcps_has_evt_log
#define PCPS_GIVE_HR_TIME
(r-) Read high res. time as PCPS_HR_TIME, only if _pcps_has_hr_time
_MBG_API_ATTR int _MBG_API mbg_get_pcps_tzdl(MBG_DEV_HANDLE dh, PCPS_TZDL *p)
Read time zone/daylight saving parameters from a device.
#define _pcps_ddev_has_event_time(_p)
#define IOCTL_SET_GPS_PORT_SETTINGS_IDX
_MBG_API_ATTR int _MBG_API mbg_get_gps_time(MBG_DEV_HANDLE dh, TTM *p)
Read the current board time using a TTM structure.
int mbg_get_xhrt_time_as_filetime(MBG_XHRT_INFO *p, int *p_ft)
Retrieve an extrapolated time stamp in FILETIME format.
#define IOCTL_GET_GPS_PORT_PARM
_MBG_API_ATTR int _MBG_API mbg_set_gps_gpio_settings_idx(MBG_DEV_HANDLE dh, const MBG_GPIO_SETTINGS_IDX *p)
Write the configuration for a single GPIO port to a device.
MBG_CHK_SUPP_FNC _pcps_ddev_is_jjy
feat_num field contains one of the PCPS_REF_TYPES
#define _mbg_swab_xmulti_ref_settings_idx(_p)
(r/w) n * XMULTI_REF_STATUS_IDX, where n == XMULTI_REF_INSTANCES::n_xmr_settings, one structure on wr...
MBG_CHK_SUPP_FNC mbg_chk_dev_has_dac_ctrl
Check if a device supports bus level DAC control commands.
#define _mbg_swab_mbg_ref_offs(_p)
#define _pcps_ddev_has_lan_intf(_p)
uint32_t MBG_IRIG_CTRL_BITS
Bit coded return type for PCPS_GET_IRIG_CTRL_BITS.
_MBG_API_ATTR int _MBG_API mbg_get_asic_version(MBG_DEV_HANDLE dh, PCI_ASIC_VERSION *p)
Read the version code of the on-board PCI/PCIe interface ASIC.
(r/-) SW_REV, software revision, deprecated by PC_GPS_RECEIVER_INFO
#define mbg_rc_is_error(_rc)
int mbg_xhrt_poll_thread_stop(MBG_POLL_THREAD_INFO *p_pti)
Stop a polling thread started by mbg_xhrt_poll_thread_create.
_MBG_API_ATTR int _MBG_API mbg_get_raw_irig_data_on_sec_change(MBG_DEV_HANDLE dh, MBG_RAW_IRIG_DATA *p)
Wait for second changeover then read raw IRIG data from an IRIG receiver.
#define _mbgdevio_read_gps_var_chk(_dh, _cmd, _ioctl, _p, _cond)
#define _mbg_swab_sw_rev(_p)
_MBG_API_ATTR int _MBG_API mbg_get_hr_time_comp(MBG_DEV_HANDLE dh, PCPS_HR_TIME *p, int32_t *hns_latency)
Read the current high resolution time, and compensate the call's latency.
_MBG_API_ATTR int _MBG_API mbg_get_gps_enable_flags(MBG_DEV_HANDLE dh, ENABLE_FLAGS *p)
Read the ENABLE_FLAGS structure controlling when outputs are to be enabled.
#define IOCTL_GET_NUM_EVT_LOG_ENTRIES
void swap_pos_doubles(POS *p)
Swap the "double" fields in a POS structure.
#define _mbg_swab_pcps_tzdl(_p)
#define _mbg_swab_pcps_ucap_entries(_p)
Device driver information.
MBG_CHK_SUPP_FNC mbg_chk_dev_is_dcf
Check if a device is a DCF77 receiver.
static int do_chk_dev_feat(MBG_DEV_HANDLE dh, uint32_t feat_type, uint32_t feat_num)
A generic function to implement mbgdevio functions used to check if a particular feature is supported...
_MBG_API_ATTR int _MBG_API mbg_get_xmr_instances(MBG_DEV_HANDLE dh, XMULTI_REF_INSTANCES *p)
Read XMULTI_REF_INSTANCES.
_MBG_API_ATTR int _MBG_API mbg_get_time_info_tstamp(MBG_DEV_HANDLE dh, MBG_TIME_INFO_TSTAMP *p)
Read both system time and associated device timestamp from the kernel driver.
#define IOCTL_GET_ALL_XMR_STATUS
static int snprint_dev_name(char *s, size_t max_len, const PCPS_DEV *p_dev)
Create a string with a unique device name.
#define _pcps_is_irig_rx(_d)
#define IOCTL_SET_PCPS_IRIG_TX_SETTINGS
Antenna status and error at reconnect information.
#define IOCTL_GET_FIRST_EVT_LOG_ENTRY
#define IOCTL_GET_TR_DISTANCE
_MBG_API_ATTR int _MBG_API mbg_set_gps_time(MBG_DEV_HANDLE dh, const TTM *p)
Set the time on a GPS receiver device.
unsigned __int64 uint64_t
MBG_PC_CYCLES_FREQUENCY freq_hz
#define _mbg_swab_ptp_cfg_info(_p)
MBG_CHK_SUPP_FNC mbg_chk_dev_has_tzcode
Check if a device supports timezone configuration using the PCPS_TZCODE type.
#define _mbg_swab_mbg_time_scale_info(_p)
PCPS_DEV dev
Device info data that can be passed to user space.
static int get_dev_info_for_dev_fn(PCPS_DEV *p, const char *dev_fn)
Open a device, retrieve the PCPS_DEV info, then close it.
#define IOCTL_GET_PCPS_DRVR_INFO
int mbg_xhrt_poll_thread_create(MBG_POLL_THREAD_INFO *p_pti, MBG_DEV_HANDLE dh, MBG_PC_CYCLES_FREQUENCY freq_hz, int sleep_ms)
Set up a MBG_POLL_THREAD_INFO structure and start a new thread.
#define IOCTL_DEV_HAS_EVENT_TIME
_MBG_API_ATTR int _MBG_API mbg_get_ip4_state(MBG_DEV_HANDLE dh, IP4_SETTINGS *p)
Read LAN IPv4 state from a device.
#define _mbgdevio_write_cmd_chk(_dh, _cmd, _ioctl, _cond)
(r/-) TTM, user capture events, deprecated by PCPS_GIVE_UCAP_EVENT
_MBG_API_ATTR MBG_DEV_HANDLE _MBG_API mbg_open_device_by_dev_fn(const char *dev_fn)
Open a device specified by a device file name.
_MBG_API_ATTR int _MBG_API mbg_dev_has_debug_status(MBG_DEV_HANDLE dh, int *p)
Check if a device provides a debug status word to be read.
_MBG_API_ATTR int _MBG_API mbg_get_ref_offs(MBG_DEV_HANDLE dh, MBG_REF_OFFS *p)
Read the UTC offset configuration of the reference time from a device.
_MBG_API_ATTR int _MBG_API mbg_get_irig_ctrl_bits(MBG_DEV_HANDLE dh, MBG_IRIG_CTRL_BITS *p)
Read the control function bits received from an incoming IRIG signal.
int64_t MBG_PC_CYCLES
Generic types to hold PC cycle counter values.
#define IOCTL_GET_GPS_TIME_SCALE_INFO
_MBG_API_ATTR int _MBG_API mbg_set_gps_port_settings(MBG_DEV_HANDLE dh, const PORT_SETTINGS *p, int idx)
Write the configuration for a single serial port to a device.
_MBG_API_ATTR int _MBG_API mbg_generic_read(MBG_DEV_HANDLE dh, int cmd, void *p, int size)
#define PCPS_GET_DEBUG_STATUS
(r-) Read MBG_DEBUG_STATUS, only if _pcps_has_debug_status
#define MBG_ERR_NOT_SUPP_ON_OS
Function is not supported on this operating system.
#define IOCTL_SET_MBG_OPT_SETTINGS
#define _pcps_ddev_has_time_scale(_p)
_MBG_API_ATTR int _MBG_API mbg_chk_dev_is_jjy(MBG_DEV_HANDLE dh)
Check if a device is a JJY receiver.
_MBG_API_ATTR int _MBG_API mbg_dev_has_time_scale(MBG_DEV_HANDLE dh, int *p)
Check if a device supports configurable time scales.
#define _mbg_swab_receiver_info(_p)
#define IOCTL_GET_GPS_ALL_STR_TYPE_INFO
(r/-) ANT_INFO, time diff at sync. after antenna had been disconn., only if GPS_MODEL_HAS_ANT_INFO ...
#define _mbg_swab_ptp_uc_master_settings_idx(_p)
_MBG_API_ATTR int _MBG_API mbg_set_pcps_tzdl(MBG_DEV_HANDLE dh, const PCPS_TZDL *p)
Write time zone/daylight saving parameters to a device.
#define PCPS_GET_CORR_INFO
(r-) Read CORR_INFO structure, only if _pcps_has_pzf
#define IOCTL_GET_LAN_IF_INFO
char dev_name[40]
Readable device name (Should be MBG_DEV_NAME, which is smaller, though)
#define PCPS_SET_IRIG_TX_SETTINGS
(-w) Write IRIG_SETTINGS, only if _pcps_has_irig_tx, returns MBG_ERR_CFG on error ...
#define PCPS_SET_EVENT_TIME
(-w) Write event time as PCPS_TIME_STAMP, only if _pcps_has_event_time
#define PCPS_BUS_PCI_PEX8311
#define IOCTL_GET_PCPS_TIME_CYCLES
A structure used to identify a device type and supported features.
static PCPS_DRVR_INFO drvr_info
PCPS_HR_TIME_CYCLES htc
Cycles count associated with the time stamp.
(r/-) n * POUT_INFO_IDX, all programmable output info
MBG_CHK_SUPP_FNC mbg_chk_dev_has_synth
Check if a device provides a programmable frequency synthesizer.
char MBG_DEV_FN[260]
A string that can take a device file name.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_pzf
Check if a device supports demodulation of the DCF77 PZF code.
#define PCPS_GET_IRIG_CTRL_BITS
(r-) Read MBG_IRIG_CTRL_BITS, only if _pcps_has_irig_ctrl_bits
_MBG_API_ATTR int _MBG_API mbg_set_gps_ant_cable_len(MBG_DEV_HANDLE dh, const ANT_CABLE_LEN *p)
Write the GPS antenna cable length configuration to a device.
#define _pcps_ddev_has_ptp(_p)
_MBG_API_ATTR int _MBG_API mbg_get_gps_ant_info(MBG_DEV_HANDLE dh, ANT_INFO *p)
Read an ANT_INFO structure to retrieve an extended GPS antenna status.
#define IOCTL_GET_GPS_SW_REV
_MBG_API_ATTR int _MBG_API mbg_get_all_ptp_uc_master_info(MBG_DEV_HANDLE dh, PTP_UC_MASTER_INFO_IDX pii[], const PTP_UC_MASTER_CFG_LIMITS *p_umsl)
Read PTP Unicast master settings and configuration options.
MBG_CHK_SUPP_FNC mbg_chk_dev_has_evt_log
Check if a device provides an on-board event log.
_MBG_API_ATTR int _MBG_API mbg_get_gps_sw_rev(MBG_DEV_HANDLE dh, SW_REV *p)
Retrieve the software revision of a GPS receiver.
#define IOCTL_SET_PCPS_TZDL
#define _pcps_ddev_has_receiver_info(_p)
#define IOCTL_GET_RAW_IRIG_DATA
int mbg_get_last_error(const char *info)
Get and translate last error after non-socket function call.
uint32_t MBG_DEBUG_STATUS
A data type used to read the board's debug status.
#define _mbg_swab_debug_status(_p)
#define PCPS_SET_REF_OFFS
(-w) Write MBG_REF_OFFS, only if _pcps_has_ref_offs, returns MBG_ERR_CFG on error ...
#define _do_query_cond(_dh, _cond, _ioctl)
uint32_t feat_num
Number and range depending on IOCTL_DEV_FEAT_REQ::feat_type value.
#define _pcps_ddev_has_irig_tx(_p)
_MBG_API_ATTR int _MBG_API mbg_find_devices_with_names(MBG_DEV_NAME_LIST_ENTRY **p_list, int max_devices)
Allocate memory and set up a list of installed and supported devices.
static __mbg_inline void mbg_get_pc_cycles_frequency(MBG_PC_CYCLES_FREQUENCY *p)
#define _mbg_swab_pos(_p)
_MBG_API_ATTR int _MBG_API mbg_get_time_sec_change(MBG_DEV_HANDLE dh, PCPS_TIME *p)
Wait until the next second change, then return current time.
Simple LAN interface information.
#define IOCTL_DEV_HAS_PCI_ASIC_FEATURES
#define _pcps_ddev_has_evt_log(_p)
#define IOCTL_GET_GPS_UCAP
#define IOCTL_PTP_UC_MASTER_CFG_LIMITS
#define IOCTL_GET_PCPS_SERIAL
_MBG_API_ATTR int _MBG_API mbg_get_corr_info(MBG_DEV_HANDLE dh, CORR_INFO *p)
Read PZF correlation info from a device.
#define IOCTL_GET_NEXT_EVT_LOG_ENTRY
_MBG_API_ATTR int _MBG_API mbg_dev_has_tzcode(MBG_DEV_HANDLE dh, int *p)
Check if a device supports timezone configuration using the PCPS_TZCODE type.
_MBG_API_ATTR int _MBG_API mbg_set_irig_rx_settings(MBG_DEV_HANDLE dh, const IRIG_SETTINGS *p)
Write an IRIG_SETTINGS structure to a device to configure an IRIG input.
uint32_t feat_type
See DEV_FEAT_TYPES.
A structure controlling when output signals are enabled.
Current settings and general capabilities of a specific programmable pulse output.
#define IOCTL_GET_PTP_STATE
#define _mbg_swab_port_info_idx(_p)
static __mbg_inline void mbg_init_pc_cycles_frequency(MBG_DEV_HANDLE dh, MBG_PC_CYCLES_FREQUENCY *p)
(r/-) n * STR_TYPE_INFO_IDX, names and capabilities of all supp. string types, only if RECEIVER_INFO:...
uint32_t supp_gnss_types
Bit masks of supported GNSS types, see MBG_GNSS_TYPE_MASKS.
#define _mbg_thread_exit(_v)
#define IOCTL_GET_PCPS_HR_TIME_CYCLES
#define IOCTL_SET_PCPS_EVENT_TIME
static void free_dev_fn_list(MBG_DEV_FN_LIST_ENTRY *list)
Free a list of device names that has been allocated before.
_MBG_API_ATTR int _MBG_API mbg_get_gps_all_xmr_info(MBG_DEV_HANDLE dh, XMULTI_REF_INFO_IDX xmrii[], const XMULTI_REF_INSTANCES *p_xmri)
Read all XMR settings and capabilities.
#define IOCTL_DEV_HAS_SERIAL_HS