mbgtools-lx  4.2.8
irig_cal.h File Reference
#include <mbgdevio.h>
#include <use_pack.h>

Go to the source code of this file.

Macros

#define _ext   extern
 

Functions

static __mbg_inline int mbg_icode_rx_to_group_idx (int icode_rx)
 Get the IRIG calibration group index for a given IRIG RX code. More...
 
static __mbg_inline int mbg_get_gen_io_info (MBG_DEV_HANDLE dh, GEN_IO_INFO_TYPE type, GEN_IO_INFO *p)
 Get generic I/O support info for a certain data type. More...
 
static __mbg_inline int mbg_get_cal_rec_irig_rx_num_rec (MBG_DEV_HANDLE dh, int *p_num_rec)
 Get supported number of IRIG RX calibration records. More...
 
static __mbg_inline int mbg_get_cal_rec_irig_rx_comp (MBG_DEV_HANDLE dh, uint16_t idx, CAL_REC_IRIG_RX_COMP *p)
 Retrieve IRIG RX calibration record with specific index. More...
 
static __mbg_inline int mbg_set_cal_rec_irig_rx_comp (MBG_DEV_HANDLE dh, const CAL_REC_IRIG_RX_COMP *p)
 Write an IRIG RX calibration record to a device. More...
 

Macro Definition Documentation

◆ _ext

#define _ext   extern

Definition at line 38 of file irig_cal.h.

Function Documentation

◆ mbg_get_cal_rec_irig_rx_comp()

static __mbg_inline int mbg_get_cal_rec_irig_rx_comp ( MBG_DEV_HANDLE  dh,
uint16_t  idx,
CAL_REC_IRIG_RX_COMP p 
)
static

Retrieve IRIG RX calibration record with specific index.

Parameters
dhValid handle to a Meinberg device
idxindex of the calibration record to be retrieved
*pPointer to a CAL_REC_IRIG_RX_COMP variable to be filled up
Returns
MBG_SUCCESS or error code returned by device I/O control function.
See also
mbg_get_gen_io_info()
mbg_get_cal_rec_irig_rx_num_rec()
mbg_set_cal_rec_irig_rx_comp()

Definition at line 175 of file irig_cal.h.

References _mbg_swab_cal_rec_hdr, _mbg_swab_cal_rec_irig_rx_comp, CAL_REC_TYPE_IRIG_RX_COMP, CAL_REC_HDR::idx, mbg_generic_io(), MBG_SUCCESS, PCPS_GEN_IO_CAL_REC_IRIG_RX_COMP, and CAL_REC_HDR::type.

Referenced by do_mbgtcrcal().

◆ mbg_get_cal_rec_irig_rx_num_rec()

static __mbg_inline int mbg_get_cal_rec_irig_rx_num_rec ( MBG_DEV_HANDLE  dh,
int *  p_num_rec 
)
static

Get supported number of IRIG RX calibration records.

Parameters
dhValid handle to a Meinberg device
p_num_recPointer to an int to be filled up
Returns
MBG_SUCCESS or error code returned by device I/O control function.
See also
mbg_get_gen_io_info()
mbg_get_cal_rec_irig_rx_comp()
mbg_set_cal_rec_irig_rx_comp()

Definition at line 144 of file irig_cal.h.

References _mbg_swab_gen_io_info, mbg_get_gen_io_info(), MBG_SUCCESS, GEN_IO_INFO::num, PCPS_GEN_IO_CAL_REC_IRIG_RX_COMP, and GEN_IO_INFO::type.

Referenced by do_mbgtcrcal().

◆ mbg_get_gen_io_info()

static __mbg_inline int mbg_get_gen_io_info ( MBG_DEV_HANDLE  dh,
GEN_IO_INFO_TYPE  type,
GEN_IO_INFO p 
)
static

Get generic I/O support info for a certain data type.

Parameters
dhValid handle to a Meinberg device
typeOne of the enumerated generic I/O data types
*pPointer to a GEN_IO_INFO variable to be filled up
Returns
MBG_SUCCESS or error code returned by device I/O control function.
See also
mbg_get_cal_rec_irig_rx_num_rec()
mbg_get_cal_rec_irig_rx_comp()
mbg_set_cal_rec_irig_rx_comp()

Definition at line 114 of file irig_cal.h.

References _mbg_swab_gen_io_info, _mbg_swab_gen_io_info_type, mbg_generic_io(), MBG_SUCCESS, and PCPS_GEN_IO_GET_INFO.

Referenced by mbg_get_cal_rec_irig_rx_num_rec().

◆ mbg_icode_rx_to_group_idx()

static __mbg_inline int mbg_icode_rx_to_group_idx ( int  icode_rx)
static

Get the IRIG calibration group index for a given IRIG RX code.

There are calibration data records available for different groups of IRIG RX codes with similar characteristics, e.g. DCLS or modulated, etc. This function tries to determine the group index for a given IRIG RX code.

Parameters
icode_rxA given IRIG RX code index
Returns
The group index [0..N_IRIG_RX_COMP-1], or -1 if the group could not be determined

Definition at line 62 of file irig_cal.h.

References IRIG_RX_COMP_A0, IRIG_RX_COMP_A1, IRIG_RX_COMP_B0, IRIG_RX_COMP_B1, IRIG_RX_COMP_G0, IRIG_RX_COMP_G1, MSK_ICODE_RX_10000BPS, MSK_ICODE_RX_1000BPS, MSK_ICODE_RX_100BPS, MSK_ICODE_RX_100KHZ, MSK_ICODE_RX_10KHZ, MSK_ICODE_RX_1KHZ, and MSK_ICODE_RX_DC.

Referenced by do_mbgtcrcal().

◆ mbg_set_cal_rec_irig_rx_comp()

static __mbg_inline int mbg_set_cal_rec_irig_rx_comp ( MBG_DEV_HANDLE  dh,
const CAL_REC_IRIG_RX_COMP p 
)
static

Write an IRIG RX calibration record to a device.

Parameters
dhValid handle to a Meinberg device
*pPointer to a CAL_REC_IRIG_RX_COMP variable to be written
Returns
MBG_SUCCESS or error code returned by device I/O control function.
See also
mbg_get_gen_io_info()
mbg_get_cal_rec_irig_rx_num_rec()
mbg_get_cal_rec_irig_rx_comp()

Definition at line 210 of file irig_cal.h.

References _mbg_swab_cal_rec_irig_rx_comp, mbg_generic_io(), and PCPS_GEN_IO_CAL_REC_IRIG_RX_COMP.

Referenced by do_mbgtcrcal().