mbgtools-lx
4.2.8
|
#include <mbgdevio.h>
#include <mbgutil.h>
#include <gpsutils.h>
#include <mbgerror.h>
#include <cfg_hlp.h>
#include <str_util.h>
#include <pcpsdrvr.h>
#include <pci_asic.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
Go to the source code of this file.
Macros | |
#define | _MBGDEVIO |
#define | _MBG_SUPP_VAR_ACC_SIZE 1 |
#define | _mbgdevio_chk_cond(_cond) _nop_macro_fnc() |
#define | _mbgdevio_read_chk(_dh, _cmd, _ioctl, _p, _sz, _cond) |
#define | _mbgdevio_read_var_chk(_dh, _cmd, _ioctl, _p, _cond) |
#define | _mbgdevio_write_var_chk(_dh, _cmd, _ioctl, _p, _cond) |
#define | _mbgdevio_write_cmd_chk(_dh, _cmd, _ioctl, _cond) |
#define | _mbgdevio_read_gps_chk(_dh, _cmd, _ioctl, _p, _sz, _cond) |
#define | _mbgdevio_read_gps_var_chk(_dh, _cmd, _ioctl, _p, _cond) |
#define | _mbgdevio_write_gps_var_chk(_dh, _cmd, _ioctl, _p, _cond) |
#define | _do_query_cond(_dh, _cond, _ioctl) _cond( _dh ) ? MBG_SUCCESS : MBG_ERR_NOT_SUPP_BY_DEV |
#define | MAX_HNS_LATENCY 0x7FFFFFFF |
#define | MIN_HNS_LATENCY ( -MAX_HNS_LATENCY - 1 ) |
#define | _PCPS_CMD pcps_cmd |
#define | _PCPS_CMD pcps_cmd |
Functions | |
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. More... | |
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 supported. More... | |
_MBG_API_ATTR int _MBG_API | mbgdevio_get_version (void) |
Get the version number of the precompiled DLL/shared object library. More... | |
_MBG_API_ATTR int _MBG_API | mbgdevio_check_version (int header_version) |
Check if the DLL/shared library is compatible with a given version. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_receiver_info (MBG_DEV_HANDLE dh) |
Check if a device supports the RECEIVER_INFO structure and related calls. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_gps_data (MBG_DEV_HANDLE dh) |
Check if a device supports large configuration data structures. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_generic_io (MBG_DEV_HANDLE dh) |
Check if a device supports the mbg_generic_io API call. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_asic_version (MBG_DEV_HANDLE dh) |
Check if a device supports the mbg_get_asic_version API call. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_asic_features (MBG_DEV_HANDLE dh) |
Check if a device supports the mbg_get_asic_features call. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_xmr (MBG_DEV_HANDLE dh) |
Check if a device provides eXtended Multi Ref (XMR) inputs. More... | |
static int | chk_bus_flags (MBG_DEV_HANDLE dh, int bus_flag_mask) |
Check if device is a specific bus type. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_is_isa (MBG_DEV_HANDLE dh) |
Check if the device is connected via the ISA bus. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_is_mca (MBG_DEV_HANDLE dh) |
Check if the device is connected via the MCA bus. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_is_pci (MBG_DEV_HANDLE dh) |
Check if the device is connected via the PCI bus. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_is_pci_express (MBG_DEV_HANDLE dh) |
Check if the device is connected via the PCI Express bus. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_is_usb (MBG_DEV_HANDLE dh) |
Check if the device is connected via the USB bus. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_is_gnss (MBG_DEV_HANDLE dh) |
Check if a device supports GNSS configuration. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_is_gps (MBG_DEV_HANDLE dh) |
Check if a device is a GPS receiver. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_is_dcf (MBG_DEV_HANDLE dh) |
Check if a device is a DCF77 receiver. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_pzf (MBG_DEV_HANDLE dh) |
Check if a device supports demodulation of the DCF77 PZF code. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_is_msf (MBG_DEV_HANDLE dh) |
Check if a device is a MSF receiver. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_is_wwvb (MBG_DEV_HANDLE dh) |
Check if a device is a WWVB receiver. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_is_jjy (MBG_DEV_HANDLE dh) |
Check if a device is a JJY receiver. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_is_lwr (MBG_DEV_HANDLE dh) |
Check if a device is any long wave signal receiver. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_is_tcr (MBG_DEV_HANDLE dh) |
Check if a device provides a configurable IRIG input. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_lan_intf (MBG_DEV_HANDLE dh) |
Check if a device supports simple LAN interface API calls. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_ptp (MBG_DEV_HANDLE dh) |
Check if a device supports PTP configuration/status calls. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_ptp_unicast (MBG_DEV_HANDLE dh) |
Check if a device supports PTP unicast feature/configuration. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_hr_time (MBG_DEV_HANDLE dh) |
Check if a device supports the mbg_get_hr_time... functions. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_fast_hr_timestamp (MBG_DEV_HANDLE dh) |
Check if a device supports the mbg_get_fast_hr_timestamp... calls. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_time_scale (MBG_DEV_HANDLE dh) |
Check if a device supports configurable time scales. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_event_time (MBG_DEV_HANDLE dh) |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_ucap (MBG_DEV_HANDLE dh) |
Check if a device supports the mbg_get_ucap_entries and mbg_get_ucap_event calls. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_can_clr_ucap_buff (MBG_DEV_HANDLE dh) |
Check if a device supports the mbg_clr_ucap_buff call. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_tzdl (MBG_DEV_HANDLE dh) |
Check if a device supports timezone configuration using the TZDL structure. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_pcps_tzdl (MBG_DEV_HANDLE dh) |
Check if a device supports timezone configuration using the PCPS_TZDL structure. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_tzcode (MBG_DEV_HANDLE dh) |
Check if a device supports timezone configuration using the PCPS_TZCODE type. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_tz (MBG_DEV_HANDLE dh) |
Check if a device supports any kind of timezone configuration. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_irig (MBG_DEV_HANDLE dh) |
Check if a device provides either an IRIG input or output. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_irig_tx (MBG_DEV_HANDLE dh) |
Check if a device provides a configurable IRIG output. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_irig_ctrl_bits (MBG_DEV_HANDLE dh) |
Check if a device supports the mbg_get_irig_ctrl_bits call. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_raw_irig_data (MBG_DEV_HANDLE dh) |
Check if a device supports the mbg_get_raw_irig_data call. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_irig_time (MBG_DEV_HANDLE dh) |
Check if a device supports the mbg_get_irig_time call. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_signal (MBG_DEV_HANDLE dh) |
Check if a device provides the level of its inputs signal. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_mod (MBG_DEV_HANDLE dh) |
Check if a device provides a modulation signal. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_serial_hs (MBG_DEV_HANDLE dh) |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_synth (MBG_DEV_HANDLE dh) |
Check if a device provides a programmable frequency synthesizer. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_gpio (MBG_DEV_HANDLE dh) |
Check if a device provides GPIO signal inputs and/or outputs. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_cab_len (MBG_DEV_HANDLE dh) |
Check if a device supports configuration of antenna cable length. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_ref_offs (MBG_DEV_HANDLE dh) |
Check if a device provides a configurable ref time offset. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_opt_flags (MBG_DEV_HANDLE dh) |
Check if a device supports the MBG_OPT_INFO/MBG_OPT_SETTINGS. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_utc_parm (MBG_DEV_HANDLE dh) |
Check if a device support reading/writing of UTC parameters. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_corr_info (MBG_DEV_HANDLE dh) |
Check if a device supports reading correlation info. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_tr_distance (MBG_DEV_HANDLE dh) |
Check if a device supports configurable distance from transmitter. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_debug_status (MBG_DEV_HANDLE dh) |
Check if a device provides a debug status word to be read. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_evt_log (MBG_DEV_HANDLE dh) |
Check if a device provides an on-board event log. More... | |
_MBG_API_ATTR int _MBG_API | mbg_chk_dev_has_dac_ctrl (MBG_DEV_HANDLE dh) |
Check if a device supports bus level DAC control commands. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_MBG_API_ATTR int _MBG_API | mbg_dev_is_gnss (MBG_DEV_HANDLE dh, int *p) |
Check if a device supports GNSS configuration. More... | |
_MBG_API_ATTR int _MBG_API | mbg_dev_is_gps (MBG_DEV_HANDLE dh, int *p) |
Check if a device is a GPS receiver. More... | |
_MBG_API_ATTR int _MBG_API | mbg_dev_is_dcf (MBG_DEV_HANDLE dh, int *p) |
Check if a device is a DCF77 receiver. More... | |
_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. More... | |
_MBG_API_ATTR int _MBG_API | mbg_dev_is_msf (MBG_DEV_HANDLE dh, int *p) |
Check if a device is a MSF receiver. More... | |
_MBG_API_ATTR int _MBG_API | mbg_dev_is_wwvb (MBG_DEV_HANDLE dh, int *p) |
Check if a device is a WWVB receiver. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_MBG_API_ATTR int _MBG_API | mbg_dev_has_mod (MBG_DEV_HANDLE dh, int *p) |
Check if a device provides a modulation signal. More... | |
_MBG_API_ATTR int _MBG_API | mbg_dev_has_serial_hs (MBG_DEV_HANDLE dh, int *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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
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. More... | |
_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. More... | |
_MBG_API_ATTR MBG_DEV_HANDLE _MBG_API | mbg_open_device (int dev_idx) |
Open a device by index number. More... | |
_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. More... | |
_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. More... | |
_MBG_API_ATTR int _MBG_API | mbg_find_devices (void) |
Get the number of devices installed on the computer. More... | |
static void | free_dev_fn_list (MBG_DEV_FN_LIST_ENTRY *list) |
Free a list of device names that has been allocated before. More... | |
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. More... | |
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. More... | |
static int | snprint_dev_name (char *s, size_t max_len, const PCPS_DEV *p_dev) |
Create a string with a unique device name. More... | |
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. More... | |
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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_MBG_API_ATTR int _MBG_API | mbg_get_device_info (MBG_DEV_HANDLE dh, PCPS_DEV *p) |
Read detailed device information. More... | |
_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. More... | |
_MBG_API_ATTR int _MBG_API | mbg_generic_read (MBG_DEV_HANDLE dh, int cmd, void *p, int size) |
_MBG_API_ATTR int _MBG_API | mbg_generic_read_gps (MBG_DEV_HANDLE dh, int cmd, void *p, int size) |
_MBG_API_ATTR int _MBG_API | mbg_generic_write (MBG_DEV_HANDLE dh, int cmd, const void *p, int size) |
_MBG_API_ATTR int _MBG_API | mbg_generic_write_gps (MBG_DEV_HANDLE dh, int cmd, const void *p, int size) |
_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) |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_MBG_API_ATTR int _MBG_API | mbg_set_event_time (MBG_DEV_HANDLE dh, const PCPS_TIME_STAMP *p) |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_MBG_API_ATTR int _MBG_API | mbg_clr_ucap_buff (MBG_DEV_HANDLE dh) |
Clear a device's on-board time capture FIFO buffer. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_MBG_API_ATTR int _MBG_API | mbg_get_utc_parm (MBG_DEV_HANDLE dh, UTC *p) |
Read a UTC parameter structure from a device. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_MBG_API_ATTR int _MBG_API | mbg_get_synth (MBG_DEV_HANDLE dh, SYNTH *p) |
Read the current frequency synthesizer settings from a device. More... | |
_MBG_API_ATTR int _MBG_API | mbg_set_synth (MBG_DEV_HANDLE dh, const SYNTH *p) |
Write frequency synthesizer configuration settings to a device. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_MBG_API_ATTR int _MBG_API | mbg_get_ip4_state (MBG_DEV_HANDLE dh, IP4_SETTINGS *p) |
Read LAN IPv4 state from a device. More... | |
_MBG_API_ATTR int _MBG_API | mbg_get_ip4_settings (MBG_DEV_HANDLE dh, IP4_SETTINGS *p) |
Read LAN IPv4 settings from a device. More... | |
_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. More... | |
_MBG_API_ATTR int _MBG_API | mbg_get_ptp_state (MBG_DEV_HANDLE dh, PTP_STATE *p) |
Read PTP/IEEE1588 status from a device. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_MBG_API_ATTR int _MBG_API | mbg_get_corr_info (MBG_DEV_HANDLE dh, CORR_INFO *p) |
Read PZF correlation info from a device. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_MBG_API_ATTR int _MBG_API | mbg_clr_evt_log (MBG_DEV_HANDLE dh) |
Clear the device's on-board event log. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_MBG_API_ATTR int _MBG_API | mbg_get_xmr_instances (MBG_DEV_HANDLE dh, XMULTI_REF_INSTANCES *p) |
Read XMULTI_REF_INSTANCES. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_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. More... | |
_MBG_API_ATTR MBG_PC_CYCLES_FREQUENCY _MBG_API | mbg_get_default_cycles_frequency (void) |
Retrieve the system's default cycles counter frequency. More... | |
Variables | |
static PCPS_DRVR_INFO | drvr_info = { MBGDEVIO_VERSION, 0, "MBGDEVIO direct" } |
static MBG_PC_CYCLES_FREQUENCY | pc_cycles_frequency |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_receiver_info |
Check if a device supports the RECEIVER_INFO structure and related calls. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_gps_data |
Check if a device supports large configuration data structures. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_generic_io |
Check if a device supports the mbg_generic_io API call. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_asic_version |
Check if a device supports the mbg_get_asic_version API call. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_asic_features |
Check if a device supports the mbg_get_asic_features call. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_xmr |
Check if a device provides eXtended Multi Ref (XMR) inputs. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_is_isa |
Check if the device is connected via the ISA bus. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_is_mca |
Check if the device is connected via the MCA bus. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_is_pci |
Check if the device is connected via the PCI bus. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_is_pci_express |
Check if the device is connected via the PCI Express bus. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_is_usb |
Check if the device is connected via the USB bus. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_is_gnss |
Check if a device supports GNSS configuration. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_is_gps |
Check if a device is a GPS receiver. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_is_dcf |
Check if a device is a DCF77 receiver. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_pzf |
Check if a device supports demodulation of the DCF77 PZF code. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_is_msf |
Check if a device is a MSF receiver. More... | |
MBG_CHK_SUPP_FNC | _pcps_ddev_is_wwvb |
MBG_CHK_SUPP_FNC | _pcps_ddev_is_jjy |
MBG_CHK_SUPP_FNC | mbg_chk_dev_is_lwr |
Check if a device is any long wave signal receiver. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_is_tcr |
Check if a device provides a configurable IRIG input. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_lan_intf |
Check if a device supports simple LAN interface API calls. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_ptp |
Check if a device supports PTP configuration/status calls. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_ptp_unicast |
Check if a device supports PTP unicast feature/configuration. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_hr_time |
Check if a device supports the mbg_get_hr_time... functions. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_fast_hr_timestamp |
Check if a device supports the mbg_get_fast_hr_timestamp... calls. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_time_scale |
Check if a device supports configurable time scales. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_event_time |
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. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_can_clr_ucap_buff |
Check if a device supports the mbg_clr_ucap_buff call. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_tzdl |
Check if a device supports timezone configuration using the TZDL structure. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_pcps_tzdl |
Check if a device supports timezone configuration using the PCPS_TZDL structure. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_tzcode |
Check if a device supports timezone configuration using the PCPS_TZCODE type. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_tz |
Check if a device supports any kind of timezone configuration. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_irig |
Check if a device provides either an IRIG input or output. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_irig_tx |
Check if a device provides a configurable IRIG output. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_irig_ctrl_bits |
Check if a device supports the mbg_get_irig_ctrl_bits call. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_raw_irig_data |
Check if a device supports the mbg_get_raw_irig_data call. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_irig_time |
Check if a device supports the mbg_get_irig_time call. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_signal |
Check if a device provides the level of its inputs signal. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_mod |
Check if a device provides a modulation signal. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_serial_hs |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_synth |
Check if a device provides a programmable frequency synthesizer. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_gpio |
Check if a device provides GPIO signal inputs and/or outputs. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_cab_len |
Check if a device supports configuration of antenna cable length. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_ref_offs |
Check if a device provides a configurable ref time offset. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_opt_flags |
Check if a device supports the MBG_OPT_INFO/MBG_OPT_SETTINGS. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_utc_parm |
Check if a device support reading/writing of UTC parameters. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_corr_info |
Check if a device supports reading correlation info. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_tr_distance |
Check if a device supports configurable distance from transmitter. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_debug_status |
Check if a device provides a debug status word to be read. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_evt_log |
Check if a device provides an on-board event log. More... | |
MBG_CHK_SUPP_FNC | mbg_chk_dev_has_dac_ctrl |
Check if a device supports bus level DAC control commands. More... | |
#define _do_query_cond | ( | _dh, | |
_cond, | |||
_ioctl | |||
) | _cond( _dh ) ? MBG_SUCCESS : MBG_ERR_NOT_SUPP_BY_DEV |
Definition at line 590 of file mbgdevio.c.
Referenced by mbg_chk_dev_has_asic_features(), mbg_chk_dev_has_asic_version(), mbg_chk_dev_has_event_time(), mbg_chk_dev_has_irig(), mbg_chk_dev_has_mod(), mbg_chk_dev_has_serial_hs(), mbg_chk_dev_has_signal(), and mbg_chk_dev_has_tz().
#define _MBG_SUPP_VAR_ACC_SIZE 1 |
Definition at line 388 of file mbgdevio.c.
#define _MBGDEVIO |
Definition at line 309 of file mbgdevio.c.
#define _mbgdevio_chk_cond | ( | _cond | ) | _nop_macro_fnc() |
Definition at line 396 of file mbgdevio.c.
Referenced by mbg_generic_io().
#define _mbgdevio_read_chk | ( | _dh, | |
_cmd, | |||
_ioctl, | |||
_p, | |||
_sz, | |||
_cond | |||
) |
Definition at line 401 of file mbgdevio.c.
#define _mbgdevio_read_gps_chk | ( | _dh, | |
_cmd, | |||
_ioctl, | |||
_p, | |||
_sz, | |||
_cond | |||
) |
Definition at line 429 of file mbgdevio.c.
Referenced by mbg_get_all_ptp_uc_master_info(), mbg_get_gps_all_gnss_sat_info(), mbg_get_gps_all_gpio_info(), mbg_get_gps_all_gpio_status(), mbg_get_gps_all_port_info(), mbg_get_gps_all_pout_info(), mbg_get_gps_all_str_type_info(), mbg_get_gps_all_xmr_info(), and mbg_get_gps_all_xmr_status().
#define _mbgdevio_read_gps_var_chk | ( | _dh, | |
_cmd, | |||
_ioctl, | |||
_p, | |||
_cond | |||
) |
Definition at line 436 of file mbgdevio.c.
Referenced by mbg_get_gpio_cfg_limits(), mbg_get_gps_ant_cable_len(), mbg_get_gps_gnss_mode_info(), mbg_get_gps_receiver_info(), mbg_get_ip4_settings(), mbg_get_ip4_state(), mbg_get_lan_if_info(), mbg_get_ptp_cfg_info(), mbg_get_ptp_state(), mbg_get_ptp_uc_master_cfg_limits(), mbg_get_time_scale_info(), mbg_get_utc_parm(), mbg_get_xmr_holdover_status(), and mbg_get_xmr_instances().
#define _mbgdevio_read_var_chk | ( | _dh, | |
_cmd, | |||
_ioctl, | |||
_p, | |||
_cond | |||
) |
Definition at line 408 of file mbgdevio.c.
Referenced by mbg_get_corr_info(), mbg_get_debug_status(), mbg_get_first_evt_log_entry(), mbg_get_hr_time(), mbg_get_hr_time_cycles(), mbg_get_irig_rx_info(), mbg_get_irig_tx_info(), mbg_get_next_evt_log_entry(), mbg_get_num_evt_log_entries(), mbg_get_opt_info(), mbg_get_pcps_tzdl(), mbg_get_ref_offs(), mbg_get_sync_time(), mbg_get_synth(), mbg_get_synth_state(), mbg_get_time_info_hrt(), mbg_get_time_info_tstamp(), mbg_get_tr_distance(), mbg_get_tzcode(), mbg_get_ucap_entries(), and mbg_get_ucap_event().
#define _mbgdevio_write_cmd_chk | ( | _dh, | |
_cmd, | |||
_ioctl, | |||
_cond | |||
) |
Definition at line 422 of file mbgdevio.c.
Referenced by mbg_clr_evt_log(), and mbg_clr_ucap_buff().
#define _mbgdevio_write_gps_var_chk | ( | _dh, | |
_cmd, | |||
_ioctl, | |||
_p, | |||
_cond | |||
) |
Definition at line 443 of file mbgdevio.c.
Referenced by mbg_set_gps_ant_cable_len(), mbg_set_gps_gnss_mode_settings(), mbg_set_gps_gpio_settings_idx(), mbg_set_gps_port_settings_idx(), mbg_set_gps_pout_settings_idx(), mbg_set_gps_xmr_settings_idx(), mbg_set_ip4_settings(), mbg_set_ptp_cfg_settings(), mbg_set_ptp_uc_master_settings_idx(), mbg_set_time_scale_settings(), and mbg_set_utc_parm().
#define _mbgdevio_write_var_chk | ( | _dh, | |
_cmd, | |||
_ioctl, | |||
_p, | |||
_cond | |||
) |
Definition at line 415 of file mbgdevio.c.
Referenced by mbg_set_event_time(), mbg_set_irig_rx_settings(), mbg_set_irig_tx_settings(), mbg_set_opt_settings(), mbg_set_pcps_tzdl(), mbg_set_ref_offs(), mbg_set_synth(), mbg_set_time(), mbg_set_tr_distance(), and mbg_set_tzcode().
#define _PCPS_CMD pcps_cmd |
Referenced by mbg_get_irig_tx_info(), and mbg_set_irig_tx_settings().
#define _PCPS_CMD pcps_cmd |
#define MAX_HNS_LATENCY 0x7FFFFFFF |
Referenced by mbg_comp_hr_latency().
#define MIN_HNS_LATENCY ( -MAX_HNS_LATENCY - 1 ) |
Referenced by mbg_comp_hr_latency().
|
static |
Check if device is a specific bus type.
This function checks if the bus flags associated with the device match the requested flags. This can be used e.g. to distinguish if a device is a PCI or USB device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | bus_flag_mask | The bus flags to be tested, see PCPS_BUS_FLAG_MASKS |
Definition at line 844 of file mbgdevio.c.
References PCPS_DEV_TYPE::bus_flags, MBG_ERR_NOT_SUPP_BY_DEV, mbg_get_device_info(), mbg_rc_is_error, MBG_SUCCESS, and PCPS_DEV::type.
Referenced by mbg_chk_dev_is_isa(), mbg_chk_dev_is_mca(), mbg_chk_dev_is_pci(), and mbg_chk_dev_is_usb().
|
static |
A generic function to implement mbgdevio functions used to check if a particular feature is supported.
This function is used to implement the specific, global feature check functions that can be called by applications. See mbgdevio functions used to check if a particular feature is supported.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | feat_type | One of the defined DEV_FEAT_TYPES. |
[in] | feat_num | A feature number with range and meaning depending on the value of feat_type. |
Definition at line 469 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, IOCTL_DEV_FEAT_REQ::feat_num, IOCTL_DEV_FEAT_REQ::feat_type, IOCTL_CHK_DEV_FEAT, MBGDEVIO_RET_VAL, and pcps_chk_dev_feat().
Referenced by mbg_chk_dev_can_clr_ucap_buff(), mbg_chk_dev_has_cab_len(), mbg_chk_dev_has_dac_ctrl(), mbg_chk_dev_has_evt_log(), mbg_chk_dev_has_fast_hr_timestamp(), mbg_chk_dev_has_generic_io(), mbg_chk_dev_has_gpio(), mbg_chk_dev_has_gps_data(), mbg_chk_dev_has_hr_time(), mbg_chk_dev_has_irig_ctrl_bits(), mbg_chk_dev_has_irig_time(), mbg_chk_dev_has_irig_tx(), mbg_chk_dev_has_lan_intf(), mbg_chk_dev_has_pcps_tzdl(), mbg_chk_dev_has_ptp(), mbg_chk_dev_has_ptp_unicast(), mbg_chk_dev_has_pzf(), mbg_chk_dev_has_raw_irig_data(), mbg_chk_dev_has_receiver_info(), mbg_chk_dev_has_synth(), mbg_chk_dev_has_time_scale(), mbg_chk_dev_has_tzcode(), mbg_chk_dev_has_tzdl(), mbg_chk_dev_has_ucap(), mbg_chk_dev_has_utc_parm(), mbg_chk_dev_has_xmr(), mbg_chk_dev_is_dcf(), mbg_chk_dev_is_gnss(), mbg_chk_dev_is_gps(), mbg_chk_dev_is_jjy(), mbg_chk_dev_is_msf(), mbg_chk_dev_is_tcr(), and mbg_chk_dev_is_wwvb().
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 supported.
This function is used to implement the deprecated specific, global feature check functions that can be called by applications. See Deprecated mbgdevio functions to check if a particular feature is supported.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | fnc | Pointer to the non-deprecated function which actually does the check. |
[out] | p | Pointer to an int which is updated if the API call succeeds, i.e MBG_SUCCESS is returned. The flag is set != 0 if the requested feature is supported, else 0. |
Definition at line 523 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_read_var, MBG_ERR_NOT_SUPP_BY_DEV, mbg_rc_is_success, MBG_SUCCESS, and MBGDEVIO_RET_VAL.
Referenced by mbg_dev_can_clr_ucap_buff(), mbg_dev_has_asic_features(), mbg_dev_has_asic_version(), mbg_dev_has_cab_len(), mbg_dev_has_corr_info(), mbg_dev_has_debug_status(), mbg_dev_has_event_time(), mbg_dev_has_evt_log(), mbg_dev_has_fast_hr_timestamp(), mbg_dev_has_generic_io(), mbg_dev_has_gpio(), mbg_dev_has_gps_data(), mbg_dev_has_hr_time(), mbg_dev_has_irig(), mbg_dev_has_irig_ctrl_bits(), mbg_dev_has_irig_time(), mbg_dev_has_irig_tx(), mbg_dev_has_lan_intf(), mbg_dev_has_mod(), mbg_dev_has_opt_flags(), mbg_dev_has_pcps_tzdl(), mbg_dev_has_ptp(), mbg_dev_has_ptp_unicast(), mbg_dev_has_pzf(), mbg_dev_has_raw_irig_data(), mbg_dev_has_receiver_info(), mbg_dev_has_ref_offs(), mbg_dev_has_serial_hs(), mbg_dev_has_signal(), mbg_dev_has_synth(), mbg_dev_has_time_scale(), mbg_dev_has_tr_distance(), mbg_dev_has_tz(), mbg_dev_has_tzcode(), mbg_dev_has_tzdl(), mbg_dev_has_ucap(), mbg_dev_has_utc_parm(), mbg_dev_has_xmr(), mbg_dev_is_dcf(), mbg_dev_is_gnss(), mbg_dev_is_gps(), mbg_dev_is_irig_rx(), mbg_dev_is_lwr(), mbg_dev_is_msf(), and mbg_dev_is_wwvb().
|
static |
Free a list of device names that has been allocated before.
This function should be called to free a list that has been allocated by setup_dev_fn_list.
[out] | list | Pointer to a list to be allocated and |
Definition at line 3576 of file mbgdevio.c.
References _MBG_DEV_FN_LIST_ENTRY::dev_fn_ptr, and _MBG_DEV_FN_LIST_ENTRY::next.
Referenced by mbg_find_devices_with_names(), mbg_open_device_by_name(), and setup_dev_fn_list().
|
static |
Open a device, retrieve the PCPS_DEV info, then close it.
[out] | p | Pointer to a PCPS_DEV to be filled. |
[in] | dev_fn | The device file name of the device to be used. |
Definition at line 3711 of file mbgdevio.c.
References mbg_close_device(), mbg_get_device_info(), mbg_get_last_error(), MBG_INVALID_DEV_HANDLE, and mbg_open_device_by_dev_fn().
Referenced by mbg_find_devices_with_names(), and mbg_open_device_by_name().
|
static |
Lookup a specific device in an array of PCPS_DEV structures.
Look for a matching name, if a type name is specified, and for a matching serial number if that is also given.
[in] | dev_array | The array of PCPS_DEV structures to be searched. |
[in] | n_dev | The number of entries in dev_array . |
[in] | type_name | An optional type name to search for, may be NULL. |
[in] | sernum | An optional serial number to search for, may be NULL. |
Definition at line 3787 of file mbgdevio.c.
References _pcps_sernum, and _pcps_type_name.
Referenced by lookup_dev_idx_ex().
|
static |
Lookup a specific device in an array, depending on a match code.
The function first looks for an exact match of type name and serial number, then for a matching type name only, if selection_mode
allows, and if no matching devic model can be found at all, returns the index of the first device found, if an appropriate selection_mode
has been specified.
[in] | dev_array | The array of PCPS_DEV structures to be searched. |
[in] | n_dev | The number of entries in dev_array . |
[in] | type_name | An optional type name to search for, may be NULL. |
[in] | sernum | An optional serial number to search for, may be NULL. |
[in] | selection_mode | One of the MBG_MATCH_MODES. |
Definition at line 3832 of file mbgdevio.c.
References lookup_dev_idx(), MBG_MATCH_ANY, and MBG_MATCH_EXACTLY.
Referenced by mbg_open_device_by_name().
_MBG_API_ATTR int _MBG_API mbg_chk_dev_has_event_time | ( | MBG_DEV_HANDLE | dh | ) |
Definition at line 1438 of file mbgdevio.c.
References _do_query_cond, _pcps_ddev_has_event_time, and IOCTL_DEV_HAS_EVENT_TIME.
_MBG_API_ATTR int _MBG_API mbg_chk_dev_has_serial_hs | ( | MBG_DEV_HANDLE | dh | ) |
Definition at line 1823 of file mbgdevio.c.
References _do_query_cond, _pcps_ddev_has_serial_hs, and IOCTL_DEV_HAS_SERIAL_HS.
_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.
[in,out] | dev_handle | Pointer to a Meinberg device handle |
Definition at line 4190 of file mbgdevio.c.
References MBG_INVALID_DEV_HANDLE.
Referenced by do_mbgsvctasks(), do_mbgtcrcal(), get_dev_info_for_dev_fn(), main(), mbg_find_devices(), mbg_handle_device(), and setup_dev_fn_list().
_MBG_API_ATTR int _MBG_API mbg_clr_evt_log | ( | MBG_DEV_HANDLE | dh | ) |
Clear the device's on-board event log.
The API call mbg_chk_dev_has_evt_log checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
Definition at line 7819 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_write_cmd_chk, _pcps_ddev_has_evt_log, IOCTL_CLR_EVT_LOG, MBGDEVIO_RET_VAL, and PCPS_CLR_EVT_LOG.
_MBG_API_ATTR int _MBG_API mbg_clr_ucap_buff | ( | MBG_DEV_HANDLE | dh | ) |
Clear a device's on-board time capture FIFO buffer.
The API call mbg_chk_dev_can_clr_ucap_buff checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
Definition at line 5331 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_write_cmd_chk, _pcps_ddev_can_clr_ucap_buff, IOCTL_PCPS_CLR_UCAP_BUFF, MBGDEVIO_RET_VAL, and PCPS_CLR_UCAP_BUFF.
Referenced by do_mbggpscap().
|
static |
Update a PCPS_TIME_STAMP to compensate the latency of an API call.
[in,out] | ts | The timestamp to be updated |
[in] | p_cyc_ts | Cycles value taken when the function was called |
[in] | p_cyc_ontime | Cycles value taken when access to the device was made |
[in] | p_cyc_freq | Cycles frequency determined by the application, depending on the type of cycles counter |
[out] | hns_latency | Optional pointer to a variable to receive the computed latency, or NULL |
Definition at line 3197 of file mbgdevio.c.
References PCPS_TIME_STAMP::frac, MAX_HNS_LATENCY, mbg_delta_pc_cycles(), MBG_ERR_NOT_SUPP_ON_OS, MBG_SUCCESS, MIN_HNS_LATENCY, and PCPS_TIME_STAMP::sec.
Referenced by mbg_get_fast_hr_timestamp_comp(), and mbg_get_hr_time_comp().
_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.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to an int which is updated if the API call succeeds. The flag is set != 0 if the requested feature is supported, else 0. |
Definition at line 2668 of file mbgdevio.c.
References do_chk_dev_feat_deprecated(), and mbg_chk_dev_can_clr_ucap_buff.
_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.
Create a system-specific device file name string, e.g. "/dev/mbgclock0" under Linux and similar systems, which can be used with the open() call on systems which support this, and is also appropriate for informational messages, e.g.when referring to a specific device.
Under Windows a hardware ID string is required to open the device, and the Windows-specific function mbg_svc_get_device_path can be used get the hardware ID string associated with a specific device index for that purpose.
However, the Windows hardware ID string is not appropriate for informational messages referring to a device, so this function can be used under Windows and other target systems that don't support simple device file names to create a generic string like "device #0".
[out] | s | Pointer to the output buffer. |
[in] | max_len | Size of the output buffer. |
[in] | dev_idx | The device index number. |
Definition at line 3319 of file mbgdevio.c.
References mbg_dev_fn_fmt, and snprintf_safe().
Referenced by mbg_open_device(), mbg_open_device_by_param(), and setup_dev_fn_list().
_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.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to an int which is updated if the API call succeeds. The flag is set != 0 if the requested feature is supported, else 0. |
Definition at line 2851 of file mbgdevio.c.
References do_chk_dev_feat_deprecated(), and mbg_chk_dev_has_raw_irig_data.
_MBG_API_ATTR int _MBG_API mbg_dev_has_serial_hs | ( | MBG_DEV_HANDLE | dh, |
int * | p | ||
) |
Definition at line 2947 of file mbgdevio.c.
References do_chk_dev_feat_deprecated(), and mbg_chk_dev_has_serial_hs.
_MBG_API_ATTR int _MBG_API mbg_find_devices | ( | void | ) |
Get the number of devices installed on the computer.
The function mbg_find_devices_with_names should eventually be used preferafly. See API functions that can be used to open a device.
Definition at line 3503 of file mbgdevio.c.
References mbg_close_device(), MBG_INVALID_DEV_HANDLE, mbg_open_device(), n_ddevs, N_SUPP_DEV_BUS, pcps_detect_devices(), and pcps_isa_ports.
Referenced by chk_get_num_devices(), do_mbgsvctasks(), and mbg_open_device_by_name().
_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.
Allocate and fill a list with the names of Meinberg devices currently present in the system.
This can be used e.g. to populate a device selection dialog in a configuration program.
When the list is not used anymore it can be freed by calling mbg_free_device_name_list.
[in] | p_list | Pointer to a linked list to be allocated. |
[in] | max_devices | Maximum number of devices to be searched for (must not exceed N_SUPP_DEV_BUS). |
Definition at line 3897 of file mbgdevio.c.
References _MBG_DEV_FN_LIST_ENTRY::dev_fn_ptr, _MBG_DEV_NAME_LIST_ENTRY::dev_name, free_dev_fn_list(), get_dev_info_for_dev_fn(), mbg_free_device_name_list(), mbg_rc_is_success, _MBG_DEV_FN_LIST_ENTRY::next, _MBG_DEV_NAME_LIST_ENTRY::next, setup_dev_fn_list(), and snprint_dev_name().
Referenced by main().
_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.
The list may have been set up and allocated before by mbg_find_devices_with_names.
[in,out] | list | Linked list of MBG_DEV_NAME_LIST_ENTRY entries. |
Definition at line 3981 of file mbgdevio.c.
References _MBG_DEV_NAME_LIST_ENTRY::next.
Referenced by main(), and mbg_find_devices_with_names().
_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 | ||
) |
Definition at line 4448 of file mbgdevio.c.
References _mbgdevio_chk_cond, _mbgdevio_cnv_ret_val, _mbgdevio_gen_io, _pcps_ddev_has_generic_io, and MBGDEVIO_RET_VAL.
Referenced by mbg_get_cal_rec_irig_rx_comp(), mbg_get_gen_io_info(), and mbg_set_cal_rec_irig_rx_comp().
_MBG_API_ATTR int _MBG_API mbg_generic_read | ( | MBG_DEV_HANDLE | dh, |
int | cmd, | ||
void * | p, | ||
int | size | ||
) |
Definition at line 4311 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_gen_read, and MBGDEVIO_RET_VAL.
_MBG_API_ATTR int _MBG_API mbg_generic_read_gps | ( | MBG_DEV_HANDLE | dh, |
int | cmd, | ||
void * | p, | ||
int | size | ||
) |
Definition at line 4348 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_gen_read_gps, and MBGDEVIO_RET_VAL.
_MBG_API_ATTR int _MBG_API mbg_generic_write | ( | MBG_DEV_HANDLE | dh, |
int | cmd, | ||
const void * | p, | ||
int | size | ||
) |
Definition at line 4382 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_gen_write, and MBGDEVIO_RET_VAL.
_MBG_API_ATTR int _MBG_API mbg_generic_write_gps | ( | MBG_DEV_HANDLE | dh, |
int | cmd, | ||
const void * | p, | ||
int | size | ||
) |
Definition at line 4419 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_gen_write_gps, and MBGDEVIO_RET_VAL.
_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.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | pdev | Pointer to the device's PCPS_DEV structure //### TODO Make this obsolete |
[in] | p_irig_info | Pointer to a IRIG_SETTINGS structure to be written |
[in] | p_ref_offs | Pointer to a MBG_REF_OFFS structure to be written |
[in] | p_opt_info | Pointer to a MBG_OPT_SETTINGS structure to be written |
Definition at line 5099 of file mbgdevio.c.
References _pcps_has_opt_flags, _pcps_has_ref_offs, _pcps_is_irig_rx, MBG_ERR_NOT_SUPP_BY_DEV, mbg_get_irig_rx_info(), mbg_get_opt_info(), mbg_get_ref_offs(), and mbg_rc_is_success.
Referenced by do_mbgirigcfg().
_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.
The array passed to this function to receive the returned data must be able to hold at least PTP_UC_MASTER_CFG_LIMITS::n_supp_master elements.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | pii | Pointer to a an array of PTP_UC_MASTER_INFO_IDX structures to be filled up. |
[in] | p_umsl | Pointer to a PTP_UC_MASTER_CFG_LIMITS structure returned by mbg_get_ptp_uc_master_cfg_limits |
Definition at line 7527 of file mbgdevio.c.
References _mbg_swab_ptp_uc_master_info_idx, _mbgdevio_cnv_ret_val, _mbgdevio_gen_read_gps, _mbgdevio_read_gps_chk, _pcps_ddev_has_ptp_unicast, IOCTL_GET_ALL_PTP_UC_MASTER_INFO, MBG_ERR_NOT_SUPP_BY_DEV, mbg_rc_is_success, MBGDEVIO_RET_VAL, PTP_UC_MASTER_CFG_LIMITS::n_supp_master, and PC_GPS_ALL_PTP_UC_MASTER_INFO.
Referenced by mbg_get_all_ptp_cfg_info().
_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.
The API call mbg_chk_dev_has_asic_features checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a PCI_ASIC_FEATURES type to be filled up. |
Definition at line 6420 of file mbgdevio.c.
References _mbg_inp32_to_cpu, _mbgdevio_cnv_ret_val, _mbgdevio_read_var, _pcps_ddev_has_asic_features, _pcps_ddev_io_base_mapped, IOCTL_GET_PCI_ASIC_FEATURES, MBG_ERR_NOT_SUPP_BY_DEV, MBG_SUCCESS, and MBGDEVIO_RET_VAL.
Referenced by setup_asic_features().
_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.
The API call mbg_chk_dev_has_asic_version checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a PCI_ASIC_VERSION type to be filled up. |
Definition at line 6385 of file mbgdevio.c.
References _mbg_inp32_to_cpu, _mbgdevio_cnv_ret_val, _mbgdevio_read_var, _pcps_ddev_has_asic_version, _pcps_ddev_io_base_mapped, IOCTL_GET_PCI_ASIC_VERSION, MBG_ERR_NOT_SUPP_BY_DEV, MBG_SUCCESS, and MBGDEVIO_RET_VAL.
Referenced by mbg_get_show_dev_info(), and setup_device_type_name().
_MBG_API_ATTR int _MBG_API mbg_get_corr_info | ( | MBG_DEV_HANDLE | dh, |
CORR_INFO * | p | ||
) |
Read PZF correlation info from a device.
The API call mbg_chk_dev_has_corr_info checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a CORR_INFO structure to be filled up. |
Definition at line 7690 of file mbgdevio.c.
References _mbg_swab_corr_info, _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_has_corr_info, IOCTL_GET_CORR_INFO, MBGDEVIO_RET_VAL, and PCPS_GET_CORR_INFO.
Referenced by mbg_show_pzf_corr_info().
_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.
This is mainly supported by IRIG timecode receiver cards, and the status word is intended to provide more detailed information why a card might not synchronize to the incoming timecode signal.
See MBG_DEBUG_STATUS and related definitions for details.
The API call mbg_chk_dev_has_debug_status checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a MBG_DEBUG_STATUS variable to be filled up |
Definition at line 7790 of file mbgdevio.c.
References _mbg_swab_debug_status, _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_has_debug_status, IOCTL_GET_DEBUG_STATUS, MBGDEVIO_RET_VAL, and PCPS_GET_DEBUG_STATUS.
Referenced by show_irig_debug_status().
_MBG_API_ATTR MBG_PC_CYCLES_FREQUENCY _MBG_API mbg_get_default_cycles_frequency | ( | void | ) |
Retrieve the system's default cycles counter frequency.
Definition at line 9229 of file mbgdevio.c.
References mbg_get_pc_cycles_frequency(), and pc_cycles_frequency.
_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.
This API call can be used on systems which don't provide this information in user space.
[in] | dh | Handle of the device to which the IOCTL call is sent. |
[out] | p | Pointer of a MBG_PC_CYCLES_FREQUENCY variable to be filled up. |
Definition at line 9161 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_read_var, PCPS_HR_TIME_CYCLES::cycles, IOCTL_GET_CYCLES_FREQUENCY, mbg_chk_dev_has_hr_time, mbg_delta_pc_cycles(), MBG_ERR_NOT_SUPP_ON_OS, MBG_FRAC32_UNITS_PER_SEC, mbg_get_hr_time_cycles(), mbg_rc_is_error, mbg_rc_is_success, MBGDEVIO_RET_VAL, PCPS_HR_TIME_CYCLES::t, and PCPS_HR_TIME::tstamp.
Referenced by do_mbgcmptime(), do_mbgsvctasks(), do_mbgxhrtime(), and mbg_init_pc_cycles_frequency().
_MBG_API_ATTR int _MBG_API mbg_get_device_info | ( | MBG_DEV_HANDLE | dh, |
PCPS_DEV * | p | ||
) |
Read detailed device information.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | *p | A PCPS_DEV structure to be filled up |
Definition at line 4242 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_read_var, PCPS_DDEV_s::dev, IOCTL_GET_PCPS_DEV, MBG_SUCCESS, and MBGDEVIO_RET_VAL.
Referenced by chk_bus_flags(), do_mbgsvctasks(), get_dev_info_for_dev_fn(), main(), mbg_chk_dev_is_pci_express(), mbg_get_show_dev_info(), and mbg_setup_receiver_info().
_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.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | A PCPS_DRVR_INFO structure to be filled up. |
Definition at line 4216 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_read_var, drvr_info, IOCTL_GET_PCPS_DRVR_INFO, MBG_SUCCESS, MBGDEVIO_RET_VAL, n_ddevs, and PCPS_DRVR_INFO::n_devs.
_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.
The API call mbg_chk_dev_has_evt_log checks whether this call is supported by a device.
If no (more) event log entry is available on the device then the returned MBG_EVT_LOG_ENTRY::code is MBG_EVT_ID_NONE.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a MBG_EVT_LOG_ENTRY variable to be filled up. |
Definition at line 7886 of file mbgdevio.c.
References _mbg_swab_mbg_evt_log_entry, _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_has_evt_log, IOCTL_GET_FIRST_EVT_LOG_ENTRY, MBGDEVIO_RET_VAL, and PCPS_FIRST_EVT_LOG_ENTRY.
_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.
The API call mbg_chk_dev_has_gpio checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | A MBG_GPIO_CFG_LIMITS structure to be filled up. |
Definition at line 8082 of file mbgdevio.c.
References _mbg_swab_mbg_gpio_cfg_limits, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var_chk, _pcps_ddev_has_gpio, IOCTL_GET_GPIO_CFG_LIMITS, MBGDEVIO_RET_VAL, and PC_GPS_GPIO_CFG_LIMITS.
Referenced by mbg_get_all_ucap_info().
_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.
The function mbg_get_gps_gnss_mode_info must have been called before, and the returned MBG_GNSS_MODE_INFO structure be passed to this function.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | gsii | Pointer to a an array of satellite info structures to be filled up. |
[in] | p_mi | Pointer to a MBG_GNSS_MODE_INFO structure returned by mbg_get_gps_gnss_mode_info. |
Definition at line 8028 of file mbgdevio.c.
References _mbg_swab_gnss_sat_info_idx, _mbgdevio_cnv_ret_val, _mbgdevio_gen_read_gps, _mbgdevio_read_gps_chk, _pcps_ddev_is_gnss, IOCTL_GET_ALL_GNSS_SAT_INFO, mbg_rc_is_success, MBGDEVIO_RET_VAL, num_bits_set(), PC_GPS_ALL_GNSS_SAT_INFO, and MBG_GNSS_MODE_INFO::supp_gnss_types.
Referenced by mbg_chk_get_all_gnss_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.
The API call mbg_chk_dev_has_gpio checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | gii | An array of MBG_GPIO_STATUS_IDX structures to be filled up. |
[in] | p_gcl | Pointer to a MBG_GPIO_CFG_LIMITS structure read before. |
Definition at line 8115 of file mbgdevio.c.
References _mbg_swab_mbg_gpio_info_idx, _mbgdevio_cnv_ret_val, _mbgdevio_gen_read_gps, _mbgdevio_read_gps_chk, _pcps_ddev_has_gpio, IOCTL_GET_ALL_GPIO_INFO, mbg_rc_is_success, MBGDEVIO_RET_VAL, MBG_GPIO_CFG_LIMITS::num_io, and PC_GPS_ALL_GPIO_INFO.
Referenced by mbg_get_all_ucap_info().
_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.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | gsi | An array of MBG_GPIO_STATUS_IDX structures to be filled up. |
[in] | p_gcl | Pointer to a MBG_GPIO_CFG_LIMITS structure read before. |
Definition at line 8205 of file mbgdevio.c.
References _mbg_swab_mbg_gpio_status_idx, _mbgdevio_cnv_ret_val, _mbgdevio_gen_read_gps, _mbgdevio_read_gps_chk, _pcps_ddev_has_gpio, MBG_GPIO_CFG_LIMITS::flags, IOCTL_GET_ALL_GPIO_STATUS, MBG_ERR_NOT_SUPP_BY_DEV, MBG_GPIO_CFG_LIMIT_FLAG_MASK_STATUS_SUPP, mbg_rc_is_success, MBGDEVIO_RET_VAL, MBG_GPIO_CFG_LIMITS::num_io, and PC_GPS_ALL_GPIO_STATUS.
Referenced by mbg_get_all_ucap_info().
_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.
A valid RECEIVER_INFO associated with the device has to be passed to this function.
Note: The function mbg_get_serial_settings should be used preferably to get retrieve the current port settings and configuration options.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | pii | Pointer to a an array of port configuration information to be filled up. |
[in] | p_ri | Pointer to the RECEIVER_INFO associated with the device //### TODO Make this obsolete |
Definition at line 6185 of file mbgdevio.c.
References _mbg_swab_port_info_idx, _mbgdevio_cnv_ret_val, _mbgdevio_gen_read_gps, _mbgdevio_read_gps_chk, _pcps_ddev_has_receiver_info, GPS_MODEL_UNKNOWN, IOCTL_GET_GPS_ALL_PORT_INFO, MBG_ERR_NOT_SUPP_BY_DEV, mbg_rc_is_success, MBGDEVIO_RET_VAL, RECEIVER_INFO::model_code, RECEIVER_INFO::n_com_ports, and PC_GPS_ALL_PORT_INFO.
Referenced by mbg_get_serial_settings().
_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.
Read a POUT_INFO_IDX array of current settings and configuration options of the device's programmable pulse outputs.
A valid RECEIVER_INFO associated with the device has to be passed to this function.
The function should only be called if the RECEIVER_INFO::n_prg_out field (i.e. the number of programmable outputs on the board) is not 0.
The array passed to this function to receive the returned data must be able to hold at least RECEIVER_INFO::n_prg_out elements.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | pii | Pointer to a an array of POUT_INFO_IDX structures to be filled up |
[in] | p_ri | Pointer to the RECEIVER_INFO associated with the device //### TODO Make this obsolete |
Definition at line 7109 of file mbgdevio.c.
References _mbg_swab_pout_info_idx_on_get, _mbgdevio_cnv_ret_val, _mbgdevio_gen_read_gps, _mbgdevio_read_gps_chk, _pcps_ddev_has_receiver_info, GPS_MODEL_UNKNOWN, IOCTL_GET_GPS_ALL_POUT_INFO, MBG_ERR_NOT_SUPP_BY_DEV, mbg_rc_is_success, MBGDEVIO_RET_VAL, RECEIVER_INFO::model_code, RECEIVER_INFO::n_prg_out, and PC_GPS_ALL_POUT_INFO.
Referenced by check_get_pout_cfg().
_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 valid RECEIVER_INFO associated with the device has to be passed to this function.
Note: The function mbg_get_serial_settings should be used preferably to get retrieve the current port settings and configuration options.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | stii | Pointer to a an array of string type information to be filled up. |
[in] | p_ri | Pointer to the RECEIVER_INFO associated with the device //### TODO Make this obsolete |
Definition at line 6125 of file mbgdevio.c.
References _mbg_swab_str_type_info_idx, _mbgdevio_cnv_ret_val, _mbgdevio_gen_read_gps, _mbgdevio_read_gps_chk, _pcps_ddev_has_receiver_info, GPS_MODEL_UNKNOWN, IOCTL_GET_GPS_ALL_STR_TYPE_INFO, MBG_ERR_NOT_SUPP_BY_DEV, mbg_rc_is_success, MBGDEVIO_RET_VAL, RECEIVER_INFO::model_code, RECEIVER_INFO::n_str_type, and PC_GPS_ALL_STR_TYPE_INFO.
Referenced by mbg_get_serial_settings().
_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.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | xmrii | An array of XMULTI_REF_INFO_IDX structures to be filled up. |
[in] | p_xmri | Pointer to a XMULTI_REF_INSTANCES structure read before. |
Definition at line 8342 of file mbgdevio.c.
References _mbg_swab_xmulti_ref_info_idx, _mbgdevio_cnv_ret_val, _mbgdevio_gen_read_gps, _mbgdevio_read_gps_chk, _pcps_ddev_has_xmr, IOCTL_GET_ALL_XMR_INFO, mbg_rc_is_success, MBGDEVIO_RET_VAL, XMULTI_REF_INSTANCES::n_xmr_settings, and PC_GPS_ALL_XMR_INFO.
Referenced by mbg_get_all_ucap_info(), and mbg_get_all_xmulti_ref_info().
_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.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | xmrsi | An array of XMULTI_REF_STATUS_IDX structures to be filled up. |
[in] | p_xmri | Pointer to a XMULTI_REF_INSTANCES structure read before. |
Definition at line 8290 of file mbgdevio.c.
References _mbg_swab_xmulti_ref_status_idx, _mbgdevio_cnv_ret_val, _mbgdevio_gen_read_gps, _mbgdevio_read_gps_chk, _pcps_ddev_has_xmr, IOCTL_GET_ALL_XMR_STATUS, mbg_rc_is_success, MBGDEVIO_RET_VAL, XMULTI_REF_INSTANCES::n_xmr_settings, and PC_GPS_ALL_XMR_STATUS.
Referenced by mbg_get_all_ucap_info(), and mbg_get_all_xmulti_ref_status().
_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.
The antenna cable length parameter is used by GPS/GNSS receivers to compensate the propagation delay of the RF signal over the antenna cable, which is about 5 ns/m.
The API call mbg_chk_dev_has_cab_len checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to an ANT_CABLE_LEN structure to be filled up. |
Definition at line 6018 of file mbgdevio.c.
References _mbg_swab_ant_cable_len, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var_chk, _pcps_ddev_has_cab_len, IOCTL_GET_GPS_ANT_CABLE_LEN, MBGDEVIO_RET_VAL, and PC_GPS_ANT_CABLE_LEN.
Referenced by show_ant_cable_len().
_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.
The API call mbg_chk_dev_is_gps checks whether this call is supported by a device.
Note: Normally the current antenna connection status can also be determined by evaluation of the PCPS_TIME::signal or PCPS_HR_TIME::signal fields. The "disconnected" status reported by ANT_INFO disappears only if the antenna has been reconnected and the receiver has synchronized to the GPS satellites again.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a ANT_INFO structure to be filled up. |
Definition at line 5709 of file mbgdevio.c.
References _mbg_swab_ant_info, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var, IOCTL_GET_GPS_ANT_INFO, MBGDEVIO_RET_VAL, and PC_GPS_ANT_INFO.
_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.
GPS receivers require some navigational data set to be available to be able to decode position and time accurately. This data set is transmitted periodically by the satellites, so it can simply be collected if it's not available.
The BVAR_STAT type reports which parts of the data set are available in the receiver, and which are not.
If the available data set is not complete then the receiver stays in COLD BOOT mode until all data have been received and thus all data sets are valid.
The API call mbg_chk_dev_is_gps checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a BVAR_STAT structure to be filled up. |
Definition at line 5551 of file mbgdevio.c.
References _mbg_swab_bvar_stat, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var, IOCTL_GET_GPS_BVAR_STAT, MBGDEVIO_RET_VAL, and PC_GPS_BVAR_STAT.
_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.
The ENABLE_FLAGS structure controls whether certain signal outputs are to be enabled immediately after the device's power-up, or only after the device has synchronized to its input signal.
The function mbg_chk_dev_has_gps_data can be used to check whether this call is supported by a device.
Note: Not all of the input signals specified for the ENABLE_FLAGS structure can be modified individually. See ENABLE_FLAGS_CODES.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a ENABLE_FLAGS structure to be filled up. |
Definition at line 5776 of file mbgdevio.c.
References _mbg_swab_enable_flags, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var, IOCTL_GET_GPS_ENABLE_FLAGS, MBGDEVIO_RET_VAL, and PC_GPS_ENABLE_FLAGS.
Referenced by set_enable_flags(), and show_enable_flags().
_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.
The MBG_GNSS_MODE_INFO structure tells which GNSS systems are supported by a device, and also includes the settings currently in effect.
The API call mbg_chk_dev_is_gnss can be used to check whether this call is supported by a device.
See also the notes for mbg_chk_dev_is_gnss.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p_mi | Pointer to a MBG_GNSS_MODE_INFO structure to be filled up. |
Definition at line 7956 of file mbgdevio.c.
References _mbg_swab_mbg_gnss_mode_info, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var_chk, _pcps_ddev_is_gnss, IOCTL_GET_GNSS_MODE_INFO, MBGDEVIO_RET_VAL, and PC_GPS_GNSS_MODE.
Referenced by mbg_chk_get_all_gnss_info(), and mbg_get_gps_gnss_mode_info_chk().
_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.
The API call mbg_chk_dev_is_gps checks whether this call is supported by a device.
Note: This function is deprecated since it is only supported by a certain class of devices and can handle only up to 2 serial ports. The generic function mbg_get_serial_settings should be used instead.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a PORT_PARM structure to be filled up. |
Definition at line 5644 of file mbgdevio.c.
References _mbg_swab_port_parm, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var, IOCTL_GET_GPS_PORT_PARM, MBGDEVIO_RET_VAL, and PC_GPS_PORT_PARM.
Referenced by mbg_get_serial_settings().
_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.
The returned POS structure contains the current position in ECEF (Earth Centered, Earth Fixed) kartesian coordinates, and in geographic coordinates with different formats, using the WGS84 geographic datum.
The API call mbg_chk_dev_is_gps checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a POS structure to be filled up. |
Definition at line 5905 of file mbgdevio.c.
References _mbg_swab_pos, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var, IOCTL_GET_GPS_POS, MBGDEVIO_RET_VAL, PC_GPS_POS, and swap_pos_doubles().
Referenced by show_gps_pos().
_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.
The API call mbg_chk_dev_has_receiver_info checks whether this call is supported by a device.
Note: Applications should call mbg_setup_receiver_info preferably, which also sets up a basic RECEIVER_INFO structure for devices which don't provide that structure by themselves.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a RECEIVER_INFO structure to be filled up. |
Definition at line 6091 of file mbgdevio.c.
References _mbg_swab_receiver_info, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var_chk, _pcps_ddev_has_receiver_info, IOCTL_GET_GPS_RECEIVER_INFO, MBGDEVIO_RET_VAL, and PC_GPS_RECEIVER_INFO.
Referenced by mbg_setup_receiver_info().
_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.
The STAT_INFO structure reports the status of the GPS receiver, including mode of operation and number of visible/usable satellites.
The API call mbg_chk_dev_is_gps checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a STAT_INFO structure to be filled up. |
Definition at line 5846 of file mbgdevio.c.
References _mbg_swab_stat_info, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var, IOCTL_GET_GPS_STAT_INFO, MBGDEVIO_RET_VAL, and PC_GPS_STAT_INFO.
Referenced by mbg_chk_get_all_gnss_info().
_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.
This function is deprecated, but still supported for compatibility with older GPS cards. Normally the software revision is part of the RECEIVER_INFO structure. See mbg_setup_receiver_info which takes care of the different options.
The API call mbg_chk_dev_is_gps checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a SW_REV structure to be filled up |
Definition at line 5513 of file mbgdevio.c.
References _mbg_swab_sw_rev, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var, IOCTL_GET_GPS_SW_REV, MBGDEVIO_RET_VAL, and PC_GPS_SW_REV.
_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.
The API call mbg_chk_dev_is_gps checks whether this call is supported by a device.
Note: This API call is pretty slow, so mbg_get_hr_time or mbg_get_fast_hr_timestamp or associated calls should be used preferably.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a TTM structure to be filled up. |
Definition at line 5580 of file mbgdevio.c.
References _mbg_swab_ttm, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var, IOCTL_GET_GPS_TIME, MBGDEVIO_RET_VAL, and PC_GPS_TIME.
Referenced by show_time_and_status().
_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.
This function returns the time zone/daylight saving parameters in a TZDL structure.
The API call mbg_chk_dev_has_tzdl checks whether this call is supported by a device.
Note: In spite of the function name this call may also be supported by non-GPS cards. Other cards may support the mbg_get_tzcode or mbg_get_pcps_tzdl calls instead.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a TZDL structure to be filled up. |
Definition at line 5439 of file mbgdevio.c.
References _mbg_swab_tzdl, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var, IOCTL_GET_GPS_TZDL, MBGDEVIO_RET_VAL, and PC_GPS_TZDL.
Referenced by show_tzdl_offs().
_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.
The API call mbg_chk_dev_is_gps checks whether this call is supported by a device.
Note: This call is pretty slow and has been obsoleted by mbg_get_ucap_event which should be used preferably, if supported by the device. Anyway, this call is still supported for compatibility with older devices which don't support mbg_get_ucap_event.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a TTM structure to be filled up. |
Definition at line 5741 of file mbgdevio.c.
References _mbg_swab_ttm, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var, IOCTL_GET_GPS_UCAP, MBGDEVIO_RET_VAL, and PC_GPS_UCAP.
Referenced by do_mbggpscap(), and mbg_get_all_ucap_info().
_MBG_API_ATTR int _MBG_API mbg_get_ip4_settings | ( | MBG_DEV_HANDLE | dh, |
IP4_SETTINGS * | p | ||
) |
Read LAN IPv4 settings from a device.
The API call mbg_chk_dev_has_lan_intf checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a IP4_SETTINGS variable to be filled up. |
Definition at line 7331 of file mbgdevio.c.
References _mbg_swab_ip4_settings, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var_chk, _pcps_ddev_has_lan_intf, IOCTL_GET_IP4_SETTINGS, MBGDEVIO_RET_VAL, and PC_GPS_IP4_SETTINGS.
Referenced by mbg_get_all_net_cfg_info(), set_lan_intf(), and show_lan_intf().
_MBG_API_ATTR int _MBG_API mbg_get_ip4_state | ( | MBG_DEV_HANDLE | dh, |
IP4_SETTINGS * | p | ||
) |
Read LAN IPv4 state from a device.
The API call mbg_chk_dev_has_lan_intf checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a IP4_SETTINGS variable to be filled up. |
Definition at line 7301 of file mbgdevio.c.
References _mbg_swab_ip4_settings, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var_chk, _pcps_ddev_has_lan_intf, IOCTL_GET_IP4_STATE, MBGDEVIO_RET_VAL, and PC_GPS_IP4_STATE.
Referenced by mbg_get_all_net_status_info(), and show_lan_intf_state().
_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.
This function fills an MBG_IRIG_CTRL_BITS structure with the control function bits decoded from the incoming IRIG signal.
The meaning of these bits depends on the type of IRIG code frame format.
In some IRIG formats these bits provide some well-known information which can also be evaluated by the device. For example, in IEEE 1344 or IEEE C37.118 code the control function bits are used to provide the year number, UTC offset, DST status, leap second warning, etc.
For most IRIG code formats, however, these bits are reserved, i.e. not used at all, or application defined, depending on the configuration of the IRIG generator providing the IRIG signal.
In the latter case the application has to evaluate the received control function bits and can use this function to retrieve these bits from the receiver device.
The API call mbg_chk_dev_has_irig_ctrl_bits checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a MBG_IRIG_CTRL_BITS type to be filled up. |
Definition at line 5202 of file mbgdevio.c.
References _mbg_swab_irig_ctrl_bits, _mbgdevio_cnv_ret_val, _mbgdevio_read_var, IOCTL_GET_IRIG_CTRL_BITS, MBGDEVIO_RET_VAL, and PCPS_GET_IRIG_CTRL_BITS.
Referenced by show_irig_ctrl_bits().
_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.
The API call mbg_chk_dev_is_tcr checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | *p | An IRIG_INFO structure to be filled up |
Definition at line 5028 of file mbgdevio.c.
References _mbg_swab_irig_info, _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_is_irig_rx, IOCTL_GET_PCPS_IRIG_RX_INFO, MBGDEVIO_RET_VAL, and PCPS_GET_IRIG_RX_INFO.
Referenced by do_mbgtcrcal(), mbg_get_all_irig_rx_info(), and show_signal().
_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.
Reads a PCPS_IRIG_TIME structure with the raw IRIG day-of-year number and time decoded from the latest IRIG input frame. If the configured IRIG code also contains the year number then the year number is also returned, otherwise the returned year number is 0xFF.
The API call mbg_chk_dev_has_irig_time checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a PCPS_IRIG_TIME type to be filled up. |
Definition at line 5304 of file mbgdevio.c.
References _mbg_swab_pcps_irig_time, _mbgdevio_cnv_ret_val, _mbgdevio_read_var, IOCTL_GET_IRIG_TIME, MBGDEVIO_RET_VAL, and PCPS_GIVE_IRIG_TIME.
Referenced by show_time_and_status().
_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.
The returned IRIG_INFO structure contains the configuration of an IRIG output plus the possible settings supported by that output.
The API call mbg_chk_dev_has_irig_tx checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to an IRIG_INFO structure to be filled up. |
Definition at line 6787 of file mbgdevio.c.
References _mbg_swab_irig_info, _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _PCPS_CMD, _pcps_ddev_has_irig_tx, _pcps_ddev_requires_irig_workaround, IOCTL_GET_PCPS_IRIG_TX_INFO, MBGDEVIO_RET_VAL, PCPS_GET_IRIG_RX_INFO, and PCPS_GET_IRIG_TX_INFO.
Referenced by do_mbgirigcfg().
_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.
IRQ status information includes flags indicating whether IRQs are actually enabled, and whether IRQ support by a card is possibly unsafe due to the firmware and interface chip version.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a PCPS_IRQ_STAT_INFO variable to be filled up. |
Definition at line 7238 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_read_var, IOCTL_GET_IRQ_STAT_INFO, PCPS_DDEV_s::irq_stat_info, MBG_SUCCESS, and MBGDEVIO_RET_VAL.
Referenced by check_irq_unsafe().
_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.
The API call mbg_chk_dev_has_lan_intf checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a LAN_IF_INFO variable to be filled up. |
Definition at line 7271 of file mbgdevio.c.
References _mbg_swab_lan_if_info, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var_chk, _pcps_ddev_has_lan_intf, IOCTL_GET_LAN_IF_INFO, MBGDEVIO_RET_VAL, and PC_GPS_LAN_IF_INFO.
Referenced by mbg_get_all_net_cfg_info(), mbg_get_all_net_status_info(), and show_lan_intf_state().
_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.
The API call mbg_chk_dev_has_evt_log checks whether this call is supported by a device.
If no (more) event log entry is available on the device then the returned MBG_EVT_LOG_ENTRY::code is MBG_EVT_ID_NONE.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a MBG_EVT_LOG_ENTRY variable to be filled up. |
Definition at line 7922 of file mbgdevio.c.
References _mbg_swab_mbg_evt_log_entry, _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_has_evt_log, IOCTL_GET_NEXT_EVT_LOG_ENTRY, MBGDEVIO_RET_VAL, and PCPS_NEXT_EVT_LOG_ENTRY.
_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.
The returned MBG_NUM_EVT_LOG_ENTRIES structure tells how many event log entries can be saved on the board, and how many entries actually have been saved.
The API call mbg_chk_dev_has_evt_log checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a MBG_NUM_EVT_LOG_ENTRIES variable to be filled up. |
Definition at line 7851 of file mbgdevio.c.
References _mbg_swab_mbg_num_evt_log_entries, _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_has_evt_log, IOCTL_GET_NUM_EVT_LOG_ENTRIES, MBGDEVIO_RET_VAL, and PCPS_NUM_EVT_LOG_ENTRIES.
_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.
The MBG_OPT_INFO structure contains a mask of supported flags plus the current settings of those flags.
The API call mbg_chk_dev_has_opt_flags checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a MBG_OPT_INFO structure to be filled up |
Definition at line 4958 of file mbgdevio.c.
References _mbg_swab_mbg_opt_info, _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_has_opt_flags, IOCTL_GET_MBG_OPT_INFO, MBGDEVIO_RET_VAL, and PCPS_GET_OPT_INFO.
Referenced by mbg_get_all_irig_rx_info().
_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.
This function fills up a PCPS_TZDL structure which supports a more detailed configuration of time zone and daylight saving than the TZCODE structure.
The API call mbg_chk_dev_has_pcps_tzdl checks whether this call is supported by a device.
Other devices may support the mbg_get_tzcode or mbg_get_gps_tzdl calls instead.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a PCPS_TZDL structure to be filled up. |
Definition at line 4823 of file mbgdevio.c.
References _mbg_swab_pcps_tzdl, _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_has_pcps_tzdl, IOCTL_GET_PCPS_TZDL, MBGDEVIO_RET_VAL, and PCPS_GET_PCPS_TZDL.
_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.
This means on which of the available CPUs or CPU cores a process may be executed.
[in] | pid | The process ID. |
[out] | p | Pointer to a MBG_CPU_SET variable which contains a mask of CPUs. |
Definition at line 8470 of file mbgdevio.c.
References MBG_CPU_SET, MBG_ERR_NOT_SUPP_ON_OS, mbg_get_last_error(), and MBG_SUCCESS.
Referenced by check_set_process_affinity_mask().
_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.
The API call mbg_chk_dev_has_ptp checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a PTP_CFG_INFO variable to be filled up. |
Definition at line 7427 of file mbgdevio.c.
References _mbg_swab_ptp_cfg_info, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var_chk, _pcps_ddev_has_ptp, IOCTL_GET_PTP_CFG_INFO, MBGDEVIO_RET_VAL, and PC_GPS_PTP_CFG.
Referenced by mbg_get_all_ptp_cfg_info(), and show_ptp_state().
_MBG_API_ATTR int _MBG_API mbg_get_ptp_state | ( | MBG_DEV_HANDLE | dh, |
PTP_STATE * | p | ||
) |
Read PTP/IEEE1588 status from a device.
The API call mbg_chk_dev_has_ptp checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a PTP_STATE variable to be filled up. |
Definition at line 7396 of file mbgdevio.c.
References _mbg_swab_ptp_state, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var_chk, _pcps_ddev_has_ptp, IOCTL_GET_PTP_STATE, MBGDEVIO_RET_VAL, and PC_GPS_PTP_STATE.
Referenced by show_ptp_state().
_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.
The API call mbg_chk_dev_has_ptp_unicast checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a PTP_UC_MASTER_CFG_LIMITS variable to be filled up. |
Definition at line 7494 of file mbgdevio.c.
References _mbg_swab_ptp_uc_master_cfg_limits, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var_chk, _pcps_has_ri_ptp_unicast, _ri_addr, IOCTL_PTP_UC_MASTER_CFG_LIMITS, MBGDEVIO_RET_VAL, and PC_GPS_PTP_UC_MASTER_CFG_LIMITS.
Referenced by mbg_get_all_ptp_cfg_info().
_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.
This function reads an MBG_RAW_IRIG_DATA structure with the raw data bits received from the incoming IRIG signal. This enables an application itself to decode the information provided by the IRIG signal.
The API call mbg_chk_dev_has_raw_irig_data checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a MBG_RAW_IRIG_DATA type to be filled up |
Definition at line 5233 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_read_var, IOCTL_GET_RAW_IRIG_DATA, MBGDEVIO_RET_VAL, and PCPS_GET_RAW_IRIG_DATA.
Referenced by mbg_get_raw_irig_data_on_sec_change(), and show_raw_irig_data().
_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.
This function waits until the second of the device's on-board time rolls over, and then reads the last recent raw IRIG data from the device.
The API call mbg_chk_dev_has_raw_irig_data checks whether this call is supported by a device.
Note: The mbg_get_time_sec_change function called by this function is supported under Windows only, so this function can also be used under Windows only.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a MBG_RAW_IRIG_DATA type to be filled up. |
Definition at line 5268 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, mbg_get_raw_irig_data(), mbg_get_time_sec_change(), mbg_rc_is_success, and MBGDEVIO_RET_VAL.
_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.
This parameter is used to specify the UTC offset of an incoming reference time signal if a kind of time signal e.g. an IRIG input signal) does not provide this information.
The API call mbg_chk_dev_has_ref_offs checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a MBG_REF_OFFS value to be filled up. |
Definition at line 4893 of file mbgdevio.c.
References _mbg_swab_mbg_ref_offs, _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_has_ref_offs, IOCTL_GET_REF_OFFS, MBGDEVIO_RET_VAL, and PCPS_GET_REF_OFFS.
Referenced by mbg_get_all_irig_rx_info(), show_signal(), and show_time_and_status().
_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.
The macro _pcps_has_serial checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a PCPS_SERIAL structure to be filled up |
Definition at line 4687 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_read_var, IOCTL_GET_PCPS_SERIAL, MBGDEVIO_RET_VAL, and PCPS_GET_SERIAL.
Referenced by mbg_get_serial_settings().
_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.
This function is useful to read the device's status port which also includes the PCPS_ST_MOD bit reflecting the time code modulation of long wave receivers.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | A PCPS_STATUS_PORT value to be filled up |
Definition at line 4273 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_read_var, _pcps_ddev_read_status_port(), IOCTL_GET_PCPS_STATUS_PORT, MBG_SUCCESS, and MBGDEVIO_RET_VAL.
Referenced by show_modulation().
_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.
Fills a PCPS_TIME structure with the date/time/status reporting when the device was synchronized the last time to its time source, e.g. the DCF77 signal, the GPS satellites, or similar.
The macro _pcps_has_sync_time checks whether this call is supported by a device.
Note: If that information is not available on the board then the value of the returned PCPS_TIME::sec field is set to 0xFF. The macro _pcps_time_is_read can be used to check whether the returned information is valid, or "not set".
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a PCPS_TIME structure to be filled up |
Definition at line 4555 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_has_sync_time, IOCTL_GET_PCPS_SYNC_TIME, MBGDEVIO_RET_VAL, and PCPS_GIVE_SYNC_TIME.
Referenced by show_sync_time().
_MBG_API_ATTR int _MBG_API mbg_get_synth | ( | MBG_DEV_HANDLE | dh, |
SYNTH * | p | ||
) |
Read the current frequency synthesizer settings from a device.
Read a SYNTH structure containing the configuration of an optional on-board programmable frequency synthesizer.
The API call mbg_chk_dev_has_synth checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a SYNTH structure to be filled up. |
Definition at line 6889 of file mbgdevio.c.
References _mbg_swab_synth, _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_has_synth, IOCTL_GET_SYNTH, MBGDEVIO_RET_VAL, and PCPS_GET_SYNTH.
Referenced by show_synth().
_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.
The API call mbg_chk_dev_has_synth checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a SYNTH_STATE structure to be filled up. |
Definition at line 6954 of file mbgdevio.c.
References _mbg_swab_synth_state, _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_has_synth, IOCTL_GET_SYNTH_STATE, MBGDEVIO_RET_VAL, and PCPS_GET_SYNTH_STATE.
_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.
The kernel driver reads the current system time plus a HR time structure from a card immediately after each other. The returned info structure also contains some cycles counts to be able to determine the execution times required to read those time stamps.
The advantage of this call compared to mbg_get_time_info_tstamp is that this call also returns the card's status. On the other hand, reading the HR time from the card may block e.g. if another application accesses the board.
This call makes a mbg_get_hr_time_cycles call internally so the API call mbg_chk_dev_has_hr_time can be used to check whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a MBG_TIME_INFO_HRT structure to be filled up |
Definition at line 7626 of file mbgdevio.c.
References _mbg_swab_mbg_time_info_hrt, _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_has_hr_time, IOCTL_GET_TIME_INFO_HRT, MBG_ERR_NOT_SUPP_ON_OS, and MBGDEVIO_RET_VAL.
Referenced by mbg_chk_time_info().
_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.
This call is similar to mbg_get_time_info_hrt except that a mbg_get_fast_hr_timestamp_cycles call is made internally, so the API call mbg_chk_dev_has_fast_hr_timestamp can be used to check whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a MBG_TIME_INFO_TSTAMP structure to be filled up. |
Definition at line 7659 of file mbgdevio.c.
References _mbg_swab_mbg_time_info_tstamp, _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_has_fast_hr_timestamp, IOCTL_GET_TIME_INFO_TSTAMP, MBG_ERR_NOT_SUPP_ON_OS, and MBGDEVIO_RET_VAL.
Referenced by mbg_chk_time_info().
_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.
The MBG_TIME_SCALE_INFO structure tells which time scale settings are supported by a device, and which time scale is currently configured.
The API call mbg_chk_dev_has_time_scale checks whether this call is supported by a device.
See also the notes for mbg_chk_dev_has_time_scale.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a MBG_TIME_SCALE_INFO structure to be filled up. |
Definition at line 6466 of file mbgdevio.c.
References _mbg_swab_mbg_time_scale_info, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var_chk, _pcps_ddev_has_time_scale, IOCTL_GET_GPS_TIME_SCALE_INFO, MBGDEVIO_RET_VAL, and PC_GPS_TIME_SCALE.
Referenced by get_n_time_scale(), set_time_scale(), and show_time_scale().
_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.
The distance from transmitter parameter is used to compensate the RF propagation delay, mostly with long wave receivers.
The API call mbg_chk_dev_has_tr_distance checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a TR_DISTANCE variable to be filled up. |
Definition at line 7722 of file mbgdevio.c.
References _mbg_swab_tr_distance, _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_has_tr_distance, IOCTL_GET_TR_DISTANCE, MBGDEVIO_RET_VAL, and PCPS_GET_TR_DISTANCE.
_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.
The APIs using TZCODE are only supported by some simpler cards and allow just a very basic configuration.
The API call mbg_chk_dev_has_tzcode checks whether this call is supported by a device.
Other devices may support the mbg_get_pcps_tzdl or mbg_get_gps_tzdl calls instead which allow for a more detailed configuration of the time zone and daylight saving settings.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a PCPS_TZCODE structure to be filled up. |
Definition at line 4751 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_has_tzcode, IOCTL_GET_PCPS_TZCODE, MBGDEVIO_RET_VAL, and PCPS_GET_TZCODE.
_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.
Reads a PCPS_UCAP_ENTRIES structure with the number of user capture events actually stored in the FIFO buffer, and the maximum number of events that can be held by the buffer.
The API call mbg_chk_dev_has_ucap checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a PCPS_UCAP_ENTRIES structure to be filled up |
Definition at line 5362 of file mbgdevio.c.
References _mbg_swab_pcps_ucap_entries, _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_has_ucap, IOCTL_GET_PCPS_UCAP_ENTRIES, MBGDEVIO_RET_VAL, and PCPS_GIVE_UCAP_ENTRIES.
Referenced by do_mbggpscap().
_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.
The capture event is returned in a PCPS_HR_TIME structure. The oldest entry in the FIFO is retrieved and then removed from the FIFO.
If no capture event is available in the FIFO buffer then both the seconds and the fractions of the returned timestamp are 0.
The API call mbg_chk_dev_has_ucap checks whether this call is supported by a device.
Note: This call is very much faster than the older mbg_get_gps_ucap call which is obsolete but still supported for compatibility with older cards.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a PCPS_HR_TIME structure to be filled up. |
Definition at line 5401 of file mbgdevio.c.
References _mbg_swab_pcps_hr_time, _mbgdevio_cnv_ret_val, _mbgdevio_read_var_chk, _pcps_ddev_has_ucap, IOCTL_GET_PCPS_UCAP_EVENT, MBGDEVIO_RET_VAL, and PCPS_GIVE_UCAP_EVENT.
Referenced by do_mbggpscap().
_MBG_API_ATTR int _MBG_API mbg_get_utc_parm | ( | MBG_DEV_HANDLE | dh, |
UTC * | p | ||
) |
Read a UTC parameter structure from a device.
The API call mbg_chk_dev_has_utc_parm checks whether this call is supported by a device.
See also the notes for mbg_chk_dev_has_utc_parm.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a UTC structure to be filled up. |
Definition at line 6536 of file mbgdevio.c.
References _mbg_swab_utc_parm, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var_chk, _pcps_ddev_has_utc_parm, UTC::A0, UTC::A1, IOCTL_GET_GPS_UTC_PARM, MBGDEVIO_RET_VAL, PC_GPS_UTC, and swap_double().
Referenced by show_utc_info().
_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.
The API call mbg_chk_dev_has_xmr checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a XMR_HOLDOVER_INTV structure to be filled up. |
[in] | p_xmri | Pointer to a XMULTI_REF_INSTANCES structure read before. |
Definition at line 8436 of file mbgdevio.c.
References _mbg_swab_xmr_holdover_status, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var_chk, _pcps_ddev_has_xmr, XMULTI_REF_INSTANCES::flags, IOCTL_GET_XMR_HOLDOVER_STATUS, MBG_ERR_NOT_SUPP_BY_DEV, MBGDEVIO_RET_VAL, PC_GPS_XMR_HOLDOVER_STATUS, and XMRIF_MSK_HOLDOVER_STATUS_SUPP.
Referenced by mbg_get_all_ucap_info().
_MBG_API_ATTR int _MBG_API mbg_get_xmr_instances | ( | MBG_DEV_HANDLE | dh, |
XMULTI_REF_INSTANCES * | p | ||
) |
Read XMULTI_REF_INSTANCES.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | A XMULTI_REF_INSTANCES structure to be filled up. |
Definition at line 8261 of file mbgdevio.c.
References _mbg_swab_xmulti_ref_instances, _mbgdevio_cnv_ret_val, _mbgdevio_read_gps_var_chk, _pcps_ddev_has_xmr, IOCTL_GET_XMR_INSTANCES, MBGDEVIO_RET_VAL, and PC_GPS_XMR_INSTANCES.
Referenced by mbg_get_all_ucap_info(), and mbg_get_all_xmulti_ref_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.
The API call mbg_chk_dev_is_tcr checks whether this call is supported by a device. mbg_get_all_irig_rx_info should be called before to determine the possible settings supported by the IRIG input.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | pdev | Pointer to the device's PCPS_DEV structure //### TODO Make this obsolete |
[out] | p_irig_settings | Pointer to a IRIG_SETTINGS structure to be written |
[out] | p_ref_offs | Pointer to a MBG_REF_OFFS structure to be written |
[out] | p_opt_settings | Pointer to a MBG_OPT_SETTINGS structure to be written |
Definition at line 5146 of file mbgdevio.c.
References _pcps_has_opt_flags, _pcps_has_ref_offs, _pcps_is_irig_rx, MBG_ERR_NOT_SUPP_BY_DEV, mbg_rc_is_success, mbg_set_irig_rx_settings(), mbg_set_opt_settings(), and mbg_set_ref_offs().
Referenced by do_mbgirigcfg().
_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.
This means the process may only be executed on that single CPU.
[in] | cpu_num | The number of the CPU. |
Definition at line 8552 of file mbgdevio.c.
References _MBG_API, _MBG_API_ATTR, _mbg_cpu_clear, _mbg_cpu_set, _mbg_crit_sect_destroy, _mbg_crit_sect_enter, _mbg_crit_sect_init, _mbg_crit_sect_leave, _mbg_get_current_process, _mbg_thread_exit, MBG_XHRT_INFO::crit_sect, PCPS_HR_TIME_CYCLES::cycles, MBG_XHRT_INFO::dh, FILETIME, MBG_XHRT_INFO::freq_hz, MBG_XHRT_VARS::htc, MBG_XHRT_INFO::ioctl_status, mbg_chk_dev_has_hr_time, mbg_chk_tstamp64_leap_sec(), MBG_CPU_SET, mbg_delta_pc_cycles(), MBG_ERR_INTR, MBG_ERR_NOT_SUPP_ON_OS, MBG_FRAC32_UNITS_PER_SEC, mbg_get_hr_time_cycles(), mbg_get_last_error(), mbg_get_pc_cycles(), mbg_get_xhrt_cycles_frequency(), mbg_get_xhrt_time_as_filetime(), mbg_get_xhrt_time_as_pcps_hr_time(), mbg_rc_is_error, mbg_rc_is_success, mbg_set_process_affinity(), MBG_SUCCESS, mbg_thread_create(), MBG_THREAD_FNC_RET_VAL, mbg_thread_set_affinity(), mbg_thread_sleep_interruptible(), mbg_thread_stop(), mbg_xhrt_poll_thread_create(), mbg_xhrt_poll_thread_stop(), MBG_XHRT_VARS::pcps_hr_tstamp64, PCPS_LS_ENB, MBG_XHRT_INFO::prv_vars, PCPS_HR_TIME::signal, MBG_XHRT_INFO::sleep_ms, PCPS_HR_TIME::status, PCPS_HR_TIME_CYCLES::t, MBG_THREAD_INFO::thread_id, MBG_POLL_THREAD_INFO::ti, PCPS_HR_TIME::tstamp, PCPS_HR_TIME::utc_offs, MBG_XHRT_INFO::vars, and MBG_POLL_THREAD_INFO::xhrt_info.
_MBG_API_ATTR int _MBG_API mbg_set_event_time | ( | MBG_DEV_HANDLE | dh, |
const PCPS_TIME_STAMP * | p | ||
) |
Definition at line 4653 of file mbgdevio.c.
References _mbg_swab_pcps_time_stamp, _mbgdevio_cnv_ret_val, _mbgdevio_write_var_chk, _pcps_ddev_has_event_time, IOCTL_SET_PCPS_EVENT_TIME, MBGDEVIO_RET_VAL, and PCPS_SET_EVENT_TIME.
Referenced by set_event_time().
_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.
The antenna cable length parameter is used by GPS/GNSS receivers to compensate the propagation delay of the RF signal over the antenna cable, which is about 5 ns/m.
The API call mbg_chk_dev_has_cab_len checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to an ANT_CABLE_LEN structure to be written. |
Definition at line 6054 of file mbgdevio.c.
References _mbg_swab_ant_cable_len, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps_var_chk, _pcps_ddev_has_cab_len, IOCTL_SET_GPS_ANT_CABLE_LEN, MBGDEVIO_RET_VAL, and PC_GPS_ANT_CABLE_LEN.
Referenced by set_ant_cable_len().
_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.
The API call mbg_chk_dev_is_gps checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a GPS_CMD |
Definition at line 5871 of file mbgdevio.c.
References _mbg_swab_gps_cmd, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps_var, IOCTL_SET_GPS_CMD, MBGDEVIO_RET_VAL, and PC_GPS_CMD.
Referenced by send_gps_cmd().
_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.
The ENABLE_FLAGS structure controls whether certain signal outputs are to be enabled immediately after the device's power-up, or only after the device has synchronized to its input signal.
The function mbg_chk_dev_has_gps_data can be used to check whether this call is supported by a device.
Note: Not all of the input signals specified for the ENABLE_FLAGS structure can be modified individually. See ENABLE_FLAGS_CODES.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a ENABLE_FLAGS structure to be written. |
Definition at line 5812 of file mbgdevio.c.
References _mbg_swab_enable_flags, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps_var, IOCTL_SET_GPS_ENABLE_FLAGS, MBGDEVIO_RET_VAL, and PC_GPS_ENABLE_FLAGS.
Referenced by set_enable_flags().
_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.
The MBG_GNSS_MODE_SETTINGS structure determines the GNSS settings for a device, e.g. which satellite systems have to be used.
The function mbg_get_gps_gnss_mode_info should have been called before to determine which GNSS settings are supported by the device.
The API call mbg_chk_dev_is_gnss can be used to check whether this call is supported by a device.
See also the notes for mbg_chk_dev_is_gnss.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p_ms | Pointer to a MBG_GNSS_MODE_SETTINGS structure to be written. |
Definition at line 7993 of file mbgdevio.c.
References _mbg_swab_mbg_gnss_mode_settings, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps_var_chk, _pcps_ddev_is_gnss, IOCTL_SET_GNSS_MODE_SETTINGS, MBGDEVIO_RET_VAL, and PC_GPS_GNSS_MODE.
_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.
The MBG_GPIO_SETTINGS_IDX structure contains both the MBG_GPIO_SETTINGS and the port index value.
The API call mbg_chk_dev_has_gpio checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a MBG_GPIO_SETTINGS_IDX structure to be written. |
Definition at line 8172 of file mbgdevio.c.
References _mbg_swab_mbg_gpio_settings_idx, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps_var_chk, _pcps_ddev_has_gpio, IOCTL_SET_GPIO_SETTINGS_IDX, MBGDEVIO_RET_VAL, and PC_GPS_GPIO_SETTINGS_IDX.
Referenced by mbg_get_all_ucap_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.
The API call mbg_chk_dev_is_gps checks whether this call is supported by a device.
Note: This function is deprecated since it is only supported by a certain class of devices and can handle only up to 2 ports. The generic function mbg_save_serial_settings should be used instead.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a PORT_PARM structure to be written. |
Definition at line 5676 of file mbgdevio.c.
References _mbg_swab_port_parm, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps_var, IOCTL_SET_GPS_PORT_PARM, MBGDEVIO_RET_VAL, and PC_GPS_PORT_PARM.
Referenced by mbg_save_serial_settings().
_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.
The PORT_SETTINGS structure does not contain the port index, so the the port index must be given separately. Except for the parameter types this call is equivalent to mbg_set_gps_port_settings_idx.
The API call mbg_chk_dev_has_receiver_info checks whether this call is supported by a device.
Note: The function mbg_save_serial_settings should be used preferably to write new port configuration to the board.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a PORT_SETTINGS structure to be written. |
[in] | idx | Index of the serial port to be configured (starting from 0). |
Definition at line 6290 of file mbgdevio.c.
References _mbg_swab_port_settings_idx, PORT_SETTINGS_IDX::idx, mbg_set_gps_port_settings_idx(), and PORT_SETTINGS_IDX::port_settings.
Referenced by mbg_save_serial_settings().
_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.
The PORT_SETTINGS_IDX structure contains both the PORT_SETTINGS and the port index value. Except for the parameter types this call is equivalent to mbg_set_gps_port_settings.
The API call mbg_chk_dev_has_receiver_info checks whether this call is supported by a device.
Note: The function mbg_save_serial_settings should be used preferably to write new port configuration to the board.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a PORT_SETTINGS_IDX structure to be written |
Definition at line 6248 of file mbgdevio.c.
References _mbg_swab_port_settings_idx, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps_var_chk, _pcps_ddev_has_receiver_info, IOCTL_SET_GPS_PORT_SETTINGS_IDX, MBGDEVIO_RET_VAL, and PC_GPS_PORT_SETTINGS_IDX.
Referenced by mbg_set_gps_port_settings().
_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.
The structure LLA must specify the new position as longitude, latitude, and altitude, using the WGS84 geographic datum.
The API call mbg_chk_dev_is_gps checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Position in LLA format to be written. |
Definition at line 5976 of file mbgdevio.c.
References _mbg_swab_double, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps, IOCTL_SET_GPS_POS_LLA, MBGDEVIO_RET_VAL, N_LLA, PC_GPS_POS_LLA, and swap_double().
Referenced by set_gps_pos().
_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.
The structure XYZ must specify the new position in ECEF (Earth Centered, Earth Fixed) kartesian coordinates.
The API call mbg_chk_dev_is_gps checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Position in XYZ format to be written |
Definition at line 5935 of file mbgdevio.c.
References _mbg_swab_double, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps, IOCTL_SET_GPS_POS_XYZ, MBGDEVIO_RET_VAL, N_XYZ, PC_GPS_POS_XYZ, and swap_double().
_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.
The POUT_SETTINGS structure does not contain the index of the programmable output to be configured, so the index must explicitly be passed to this function. Except for the parameter types this call is equivalent to mbg_set_gps_pout_settings_idx.
The function should only be called if the RECEIVER_INFO::n_prg_out field (i.e. the number of programmable outputs on the board) is not 0, and the output index value must be in the range 0..RECEIVER_INFO::n_prg_out.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a POUT_SETTINGS structure to be written. |
[in] | idx | Index of the programmable pulse output to be configured (starting from 0 ). |
Definition at line 7209 of file mbgdevio.c.
References POUT_SETTINGS_IDX::idx, mbg_set_gps_pout_settings_idx(), and POUT_SETTINGS_IDX::pout_settings.
Referenced by eval_pout().
_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.
The POUT_SETTINGS_IDX structure contains both the POUT_SETTINGS and the output index value. Except for the parameter types this call is equivalent to mbg_set_gps_pout_settings.
The function should only be called if the RECEIVER_INFO::n_prg_out field (i.e. the number of programmable outputs on the board) is not 0, and the output index value must be in the range 0..RECEIVER_INFO::n_prg_out.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a POUT_SETTINGS_IDX structure to be written. |
Definition at line 7169 of file mbgdevio.c.
References _mbg_swab_pout_settings_idx_on_set, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps_var_chk, _pcps_ddev_has_receiver_info, IOCTL_SET_GPS_POUT_SETTINGS_IDX, MBGDEVIO_RET_VAL, and PC_GPS_POUT_SETTINGS_IDX.
Referenced by mbg_set_gps_pout_settings().
_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.
Write a TTM structure to a GPS receiver in order to set the on-board date and time. Date and time must be local time according to the device's on-board time zone configuration (TZDL).
The API call mbg_chk_dev_is_gps checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a TTM structure to be written |
Definition at line 5608 of file mbgdevio.c.
References _mbg_swab_ttm, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps_var, IOCTL_SET_GPS_TIME, MBGDEVIO_RET_VAL, and PC_GPS_TIME.
Referenced by set_date_time().
_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.
This function writes the time zone/daylight saving parameters in a TZDL structure to a device.
The API call mbg_chk_dev_has_tzdl checks whether this call is supported by a device.
Note: In spite of the function name this call may also be supported by non-GPS cards. Other cards may support the mbg_set_tzcode or mbg_set_pcps_tzdl calls instead.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a TZDL structure to be written. |
Definition at line 5475 of file mbgdevio.c.
References _mbg_swab_tzdl, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps_var, IOCTL_SET_GPS_TZDL, MBGDEVIO_RET_VAL, and PC_GPS_TZDL.
Referenced by set_gps_tzdl().
_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.
The XMULTI_REF_SETTINGS_IDX structure contains both the XMULTI_REF_SETTINGS and the index value.
The API call mbg_chk_dev_has_xmr checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a XMULTI_REF_SETTINGS_IDX structure to be written. |
Definition at line 8399 of file mbgdevio.c.
References _mbg_swab_xmulti_ref_settings_idx, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps_var_chk, _pcps_ddev_has_xmr, IOCTL_SET_XMR_SETTINGS_IDX, MBGDEVIO_RET_VAL, and PC_GPS_XMR_SETTINGS_IDX.
Referenced by mbg_get_all_ucap_info(), and mbg_save_all_xmulti_ref_info().
_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.
The API call mbg_chk_dev_has_lan_intf checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | IP4_SETTINGS structure to be written. |
Definition at line 7360 of file mbgdevio.c.
References _mbg_swab_ip4_settings, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps_var_chk, _pcps_ddev_has_lan_intf, IOCTL_SET_IP4_SETTINGS, MBGDEVIO_RET_VAL, and PC_GPS_IP4_SETTINGS.
Referenced by mbg_save_all_net_cfg_info(), and set_lan_intf().
_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.
The API call mbg_chk_dev_is_tcr checks whether this call is supported by a device. mbg_get_irig_rx_info should be called first to determine the possible settings supported by the device's IRIG input.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a IRIG_SETTINGS structure to be written. |
Definition at line 5065 of file mbgdevio.c.
References _mbg_swab_irig_settings, _mbgdevio_cnv_ret_val, _mbgdevio_write_var_chk, _pcps_ddev_is_irig_rx, IOCTL_SET_PCPS_IRIG_RX_SETTINGS, MBGDEVIO_RET_VAL, and PCPS_SET_IRIG_RX_SETTINGS.
Referenced by mbg_save_all_irig_rx_settings().
_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.
The API call mbg_chk_dev_has_irig_tx checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to an IRIG_INFO structure to be written. |
Definition at line 6833 of file mbgdevio.c.
References _mbg_swab_irig_settings, _mbgdevio_cnv_ret_val, _mbgdevio_write_var_chk, _PCPS_CMD, _pcps_ddev_has_irig_tx, _pcps_ddev_requires_irig_workaround, IOCTL_SET_PCPS_IRIG_TX_SETTINGS, MBGDEVIO_RET_VAL, PCPS_SET_IRIG_RX_SETTINGS, and PCPS_SET_IRIG_TX_SETTINGS.
Referenced by do_mbgirigcfg().
_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.
The API call mbg_chk_dev_has_opt_flags checks whether this call is supported by a device.
mbg_get_opt_info should be called first to check which of the specified flags is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[out] | p | Pointer to a MBG_OPT_SETTINGS structure to be written. |
Definition at line 4988 of file mbgdevio.c.
References _mbg_swab_mbg_opt_settings, _mbgdevio_cnv_ret_val, _mbgdevio_write_var_chk, _pcps_ddev_has_opt_flags, IOCTL_SET_MBG_OPT_SETTINGS, MBGDEVIO_RET_VAL, and PCPS_SET_OPT_SETTINGS.
Referenced by mbg_save_all_irig_rx_settings().
_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.
This function passes a PCPS_TZDL structure to a device which supports a more detailed configuration of time zone and daylight saving than the TZCODE structure.
The API call mbg_chk_dev_has_pcps_tzdl checks whether this call is supported by a device. Other cards may support the mbg_set_tzcode or mbg_set_gps_tzdl calls instead.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a PCPS_TZDL structure to be written. |
Definition at line 4858 of file mbgdevio.c.
References _mbg_swab_pcps_tzdl, _mbgdevio_cnv_ret_val, _mbgdevio_write_var_chk, _pcps_ddev_has_pcps_tzdl, IOCTL_SET_PCPS_TZDL, MBGDEVIO_RET_VAL, and PCPS_SET_PCPS_TZDL.
_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.
This determines on which of the available CPUs or CPU cores the process is allowed to be executed.
[in] | pid | The process ID. |
[out] | p | Pointer to a MBG_CPU_SET variable which contains a mask of CPUs. |
Definition at line 8513 of file mbgdevio.c.
References MBG_ERR_NOT_SUPP_ON_OS, mbg_get_last_error(), and MBG_SUCCESS.
Referenced by check_set_process_affinity_mask(), and mbg_set_current_process_affinity_to_cpu().
_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.
The API call mbg_chk_dev_has_ptp checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | PTP_CFG_SETTINGS structure to be written. |
Definition at line 7458 of file mbgdevio.c.
References _mbg_swab_ptp_cfg_settings, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps_var_chk, _pcps_ddev_has_ptp, IOCTL_SET_PTP_CFG_SETTINGS, MBGDEVIO_RET_VAL, and PC_GPS_PTP_CFG.
Referenced by mbg_save_all_ptp_cfg_info().
_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.
The API call mbg_chk_dev_has_ptp_unicast checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | PTP_UC_MASTER_SETTINGS_IDX structure to be written. |
Definition at line 7582 of file mbgdevio.c.
References _mbg_swab_ptp_uc_master_settings_idx, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps_var_chk, _pcps_ddev_has_ptp_unicast, IOCTL_SET_PTP_UC_MASTER_SETTINGS_IDX, MBGDEVIO_RET_VAL, and PC_GPS_PTP_UC_MASTER_SETTINGS_IDX.
Referenced by mbg_save_all_ptp_cfg_info().
_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.
This parameter is used to specify the UTC offset of an incoming reference time signal if a kind of time signal e.g. an IRIG input signal) does not provide this information.
The API call mbg_chk_dev_has_ref_offs checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a MBG_REF_OFFS value to be written. |
Definition at line 4924 of file mbgdevio.c.
References _mbg_swab_mbg_ref_offs, _mbgdevio_cnv_ret_val, _mbgdevio_write_var_chk, _pcps_ddev_has_ref_offs, IOCTL_SET_REF_OFFS, MBGDEVIO_RET_VAL, and PCPS_SET_REF_OFFS.
Referenced by mbg_save_all_irig_rx_settings().
_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.
The macro _pcps_has_serial checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a PCPS_SERIAL structure to be written |
Definition at line 4716 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_write_var, IOCTL_SET_PCPS_SERIAL, MBGDEVIO_RET_VAL, and PCPS_SET_SERIAL.
Referenced by mbg_save_serial_settings().
_MBG_API_ATTR int _MBG_API mbg_set_synth | ( | MBG_DEV_HANDLE | dh, |
const SYNTH * | p | ||
) |
Write frequency synthesizer configuration settings to a device.
Write a SYNTH structure containing the configuration of an optional on-board programmable frequency synthesizer.
The API call mbg_chk_dev_has_synth checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a SYNTH structure to be written. |
Definition at line 6921 of file mbgdevio.c.
References _mbg_swab_synth, _mbgdevio_cnv_ret_val, _mbgdevio_write_var_chk, _pcps_ddev_has_synth, IOCTL_SET_SYNTH, MBGDEVIO_RET_VAL, and PCPS_SET_SYNTH.
Referenced by set_synth().
_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.
The macro _pcps_can_set_time checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a PCPS_STIME structure to be written |
Definition at line 4518 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_write_var_chk, _pcps_ddev_can_set_time, IOCTL_SET_PCPS_TIME, MBGDEVIO_RET_VAL, and PCPS_SET_TIME.
Referenced by set_date_time().
_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 MBG_TIME_SCALE_SETTINGS structure determines which time scale is to be used for the time stamps which can be read from a device.
The API call mbg_chk_dev_has_time_scale checks whether this call is supported by a device.
See also the notes for mbg_chk_dev_has_time_scale.
The function mbg_get_time_scale_info should have been called before in order to determine which time scales are supported by the card.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a MBG_TIME_SCALE_SETTINGS structure to be written. |
Definition at line 6502 of file mbgdevio.c.
References _mbg_swab_mbg_time_scale_settings, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps_var_chk, _pcps_ddev_has_time_scale, IOCTL_SET_GPS_TIME_SCALE_SETTINGS, MBGDEVIO_RET_VAL, and PC_GPS_TIME_SCALE.
Referenced by set_time_scale().
_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.
The distance from transmitter parameter is used to compensate the RF propagation delay, mostly with long wave receivers.
The API call mbg_chk_dev_has_tr_distance checks whether this call is supported by a device.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a TR_DISTANCE variable to be written. |
Definition at line 7754 of file mbgdevio.c.
References _mbg_swab_tr_distance, _mbgdevio_cnv_ret_val, _mbgdevio_write_var_chk, _pcps_ddev_has_tr_distance, IOCTL_SET_TR_DISTANCE, MBGDEVIO_RET_VAL, and PCPS_SET_TR_DISTANCE.
_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.
The APIs using TZCODE are only supported by some simpler cards and allow just a very basic configuration.
The API call mbg_chk_dev_has_tzcode checks whether this call is supported by a device.
Other devices may support the mbg_set_pcps_tzdl or mbg_set_gps_tzdl calls instead which allow for a more detailed configuration of the time zone and daylight saving settings.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a PCPS_TZCODE structure to be written. |
Definition at line 4787 of file mbgdevio.c.
References _mbgdevio_cnv_ret_val, _mbgdevio_write_var_chk, _pcps_ddev_has_tzcode, IOCTL_SET_PCPS_TZCODE, MBGDEVIO_RET_VAL, and PCPS_SET_TZCODE.
Referenced by set_tz_code().
_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.
This should only be done for testing, or if a card is operated in freewheeling mode. If the receiver is tracking any satellites then the settings written to the device are overwritten by the parameters broadcast by the satellites.
The API call mbg_chk_dev_has_utc_parm checks whether this call is supported by a device.
See also the notes for mbg_chk_dev_has_utc_parm.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p | Pointer to a valid UTC structure to be written. |
Definition at line 6573 of file mbgdevio.c.
References _mbg_swab_utc_parm, _mbgdevio_cnv_ret_val, _mbgdevio_write_gps_var_chk, _pcps_ddev_has_utc_parm, UTC::A0, UTC::A1, IOCTL_SET_GPS_UTC_PARM, MBGDEVIO_RET_VAL, PC_GPS_UTC, and swap_double().
_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.
If the device supports the RECEIVER_INFO structure then the structure is read from the device, otherwise a structure is set up using default values depending on the device type.
Optionally, the function mbg_get_device_info may have been called before, and the returned PCPS_DEV structure can be passed to this function.
If a NULL pointer is passed instead, the device info is retrieved directly from the device, using the device handle.
[in] | dh | Valid MBG_DEV_HANDLE handle to a Meinberg device. |
[in] | p_dev | Optional pointer to a PCPS_DEV structure, may be NULL. |
[out] | p | Pointer to a RECEIVER_INFO structure to be filled up. |
Definition at line 6329 of file mbgdevio.c.
References _pcps_has_receiver_info, _pcps_is_gps, _setup_default_receiver_info_dcf, _setup_default_receiver_info_gps, chk_dev_receiver_info(), mbg_get_device_info(), mbg_get_gps_receiver_info(), and mbg_rc_is_error.
Referenced by check_serial_mode(), check_setup_receiver_info(), mbg_get_show_dev_info(), and show_ext_stat_info().
_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.
See MBG_DEV_NAME for the possible formats of a device name. If no dev_name
is passed then the destination buffers are set to empty strings.
The complementary function snprint_dev_name can be used to generate a device name string.
[in] | dev_name | The MBG_DEV_NAME string to be split up |
[out] | type_name | Output buffer for the type name part, e.g. a PCPS_CLOCK_NAME |
[in] | type_name_size | Size of the output buffer for the type name string |
[out] | sernum | Output buffer for the sernum part, e.g. a PCPS_SN_STR |
[in] | sernum_size | Size of the output buffer for the sernum string |
Definition at line 4016 of file mbgdevio.c.
References dev_name.
Referenced by mbg_open_device_by_name().
_MBG_API_ATTR int _MBG_API mbgdevio_check_version | ( | int | header_version | ) |
Check if the DLL/shared library is compatible with a given version.
If this library is used as a DLL/shared object library then the version number can be checked to see if the header files which are actually used to build an application are compatible with the header files which have been used to build the library, and thus the API functions are called in the correct way.
[in] | header_version | Version number to be checked, should be MBGDEVIO_VERSION from the mbgdevio.h file version used to build the application |
Definition at line 641 of file mbgdevio.c.
References MBG_ERR_LIB_NOT_COMPATIBLE, MBG_SUCCESS, and MBGDEVIO_COMPAT_VERSION.
_MBG_API_ATTR int _MBG_API mbgdevio_get_version | ( | void | ) |
Get the version number of the precompiled DLL/shared object library.
If this library is used as a DLL/shared object library then the version number can be checked to see if the header files which are actually used to build an application are compatible with the header files which have been used to build the library, and thus the API function are called in the correct way.
Definition at line 615 of file mbgdevio.c.
References MBGDEVIO_VERSION.
|
static |
Allocate and fill a list of device file names.
The function free_dev_fn_list should be called when the returned list has been evaliuated and isn't needed anymore.
[out] | p_list | Pointer to a list to be allocated and set up, set to NULL if no devices were found. |
[in] | max_devs | Max. number of devices to be added to the list. |
Definition at line 3620 of file mbgdevio.c.
References _MBG_DEV_FN_LIST_ENTRY::dev_fn_ptr, free_dev_fn_list(), max_devs, mbg_close_device(), mbg_dev_fn_from_dev_idx(), MBG_INVALID_DEV_HANDLE, mbg_open_device_by_dev_fn(), _MBG_DEV_FN_LIST_ENTRY::next, and strncpy_safe().
Referenced by mbg_find_devices_with_names(), and mbg_open_device_by_name().
|
static |
Create a string with a unique device name.
The device name is composed of the device's type name and its serial number which is appended after an underscore '_'. So the string buffer is typically an MBG_DEV_NAME. See MBG_DEV_NAME for the possible formats of a device name.
The complementary function mbg_split_dev_name can be used to split an MBG_DEV_NAME into its components.
[out] | s | Pointer to the output buffer for the string. |
[in] | max_len | Size of the output buffer. |
[in] | p_dev | Pointer to a PCPS_DEV structure providing the required information. |
Definition at line 3759 of file mbgdevio.c.
References _int_from_size_t, _pcps_sernum, _pcps_type_name, MBG_DEV_NAME_FMT, and snprintf_safe().
Referenced by mbg_find_devices_with_names().
MBG_CHK_SUPP_FNC _pcps_ddev_is_jjy |
Definition at line 1164 of file mbgdevio.c.
MBG_CHK_SUPP_FNC _pcps_ddev_is_wwvb |
Definition at line 1142 of file mbgdevio.c.
Referenced by ioctl_switch().
|
static |
Definition at line 329 of file mbgdevio.c.
Referenced by mbg_get_drvr_info().
MBG_CHK_SUPP_FNC mbg_chk_dev_has_event_time |
Definition at line 1444 of file mbgdevio.c.
Referenced by mbg_dev_has_event_time().
MBG_CHK_SUPP_FNC mbg_chk_dev_has_serial_hs |
Definition at line 1829 of file mbgdevio.c.
Referenced by mbg_dev_has_serial_hs().
|
static |
Definition at line 596 of file mbgdevio.c.
Referenced by mbg_get_default_cycles_frequency(), mbg_get_fast_hr_timestamp_comp(), and mbg_get_hr_time_comp().