mbgtools-lx
4.2.8
|
Go to the source code of this file.
Macros | |
#define | MBG_TGT_MISSING_DWORD 1 |
#define | MBG_TGT_MISSING_NTSTATUS 1 |
#define | _ext extern |
#define | MBG_SYS_RC_SUCCESS 0 |
#define | _USE_WIN32_PRIVATE_STATUS_CODES 0 |
#define | DWORD DWORD |
#define | NTSTATUS NTSTATUS |
#define | MBG_ERR_STR_TABLE_BASE_ENG |
A basic subset of strings associated with MBG_RETURN_CODES. More... | |
#define | MBG_ERR_STR_TABLE_EXT_ENG |
A subset of extended strings associated with MBG_RETURN_CODES. More... | |
#define | MBG_ERR_STR_TABLE_ENG |
Strings associated with MBG_RETURN_CODES. More... | |
#define | mbg_rc_is_error(_rc) ( (_rc) < MBG_SUCCESS ) |
#define | mbg_rc_is_success(_rc) ( !mbg_rc_is_error( _rc ) ) |
#define | mbg_rc_is_success_or_err_perm(_rc) ( mbg_rc_is_success( _rc ) || ( (_rc) == MBG_ERR_PERM ) ) |
#define | MBG_SUCCESS 0 |
Error codes used with Meinberg devices and drivers. More... | |
#define | MBG_ERR_STIME -1 |
Tried to write invalid date/time/status to device, has to match PCPS_ERR_STIME. More... | |
#define | MBG_ERR_CFG -2 |
Tried to write invalid configuration parameters to device, has to match PCPS_ERR_CFG (see also MBG_ERR_INV_CFG) More... | |
#define | MBG_ERR_GENERIC -19 |
Generic error. More... | |
#define | MBG_ERR_TIMEOUT -20 |
Timeout accessing the device. More... | |
#define | MBG_ERR_FW_ID -21 |
Invalid firmware ID. More... | |
#define | MBG_ERR_NBYTES -22 |
match the number of bytes expected by the device. More... | |
#define | MBG_ERR_INV_TIME -23 |
The device has no valid time. More... | |
#define | MBG_ERR_NO_DATA -24 |
The device's data output data buffer is empty, though it shouldn't be. More... | |
#define | MBG_ERR_NOT_READY -25 |
Bus-level device is temp. unable to respond e.g. during init. after RESET. More... | |
#define | MBG_ERR_INV_TYPE -26 |
Bus-level device didn't recognize data type. More... | |
#define | MBG_ERR_NO_MEM -27 |
Failed to allocate memory. More... | |
#define | MBG_ERR_CLAIM_RSRC -28 |
Failed to claim port or mem resource. More... | |
#define | MBG_ERR_DEV_NOT_SUPP -29 |
Device type not supported by driver. More... | |
#define | MBG_ERR_INV_DEV_REQUEST -30 |
IOCTL call not supported by driver. More... | |
#define | MBG_ERR_NOT_SUPP_BY_DEV -31 |
Command or feature not supported by device. More... | |
#define | MBG_ERR_CYCLIC_TIMEOUT -33 |
Cyclic event (IRQ, etc.) didn't occur in time. More... | |
#define | MBG_ERR_NOT_SUPP_ON_OS -34 |
Function is not supported on this operating system. More... | |
#define | MBG_ERR_LIB_NOT_COMPATIBLE -35 |
Installed shared library version not compatible with version used at build time. More... | |
#define | MBG_ERR_N_COM_EXCEEDS_SUPP -36 |
Num. COM ports of the device exceeds max. supp. by driver. More... | |
#define | MBG_ERR_N_STR_EXCEEDS_SUPP -37 |
Num. string formats of the device exceeds max. supp. by driver. More... | |
#define | MBG_ERR_IRQ_UNSAFE -38 |
Enabled IRQ of bus-level device is unsafe with this firmware/ASIC version. More... | |
#define | MBG_ERR_N_POUT_EXCEEDS_SUPP -39 |
Num. prog. outputs of the device exceeds max. supp. by driver. More... | |
#define | MBG_ERR_INV_INTNO -40 |
Invalid interrupt number. More... | |
#define | MBG_ERR_NO_DRIVER -41 |
No driver could be found. More... | |
#define | MBG_ERR_DRV_VERSION -42 |
The driver is too old. More... | |
#define | MBG_ERR_COPY_TO_USER -43 |
Kernel driver failed to copy data from kernel to user space. More... | |
#define | MBG_ERR_COPY_FROM_USER -44 |
Kernel driver failed to copy data from use to kernel space. More... | |
#define | MBG_ERR_N_UC_MSTR_EXCEEDS_SUPP -45 |
Num. PTP unicast masters of the device exceeds max. supp. by driver. More... | |
#define | MBG_ERR_N_GNSS_EXCEEDS_SUPP -46 |
Num. of GNSS systems supp. by device exceeds max. supp. by driver. More... | |
#define | MBG_ERR_N_GPIO_EXCEEDS_SUPP -47 |
Num. of GPIO ports supp. by device exceeds max. supp. by driver. More... | |
#define | MBG_ERR_N_XMR_EXCEEDS_SUPP -48 |
Num. of XMR sources supp. by device exceeds max. supp. by driver. More... | |
#define | MBG_ERR_UNSPEC -60 |
Unspecified error. More... | |
#define | MBG_ERR_HDR_CSUM -61 |
Binary protocol header checksum error. More... | |
#define | MBG_ERR_DATA_CSUM -62 |
Binary protocol data checksum error. More... | |
#define | MBG_ERR_RCVD_NACK -63 |
Binary protocol received reply msg with a NACK code. More... | |
#define | MBG_ERR_RCVD_NO_ACK -64 |
Binary protocol received reply msg without expected ACK code. //### TODO. More... | |
#define | MBG_ERR_CONN_TYPE -65 |
Binary protocol no valid/supported connection type specified. More... | |
#define | MBG_ERR_BYTES_WRITTEN -66 |
Binary protocol failed to write all bytes. More... | |
#define | MBG_ERR_AUTH -67 |
Binary protocol failed authentication. More... | |
#define | MBG_ERR_SOCK_INIT -68 |
Socket interface not initialized, or failed to initialize. More... | |
#define | MBG_ERR_INV_SOCK_FD -69 |
Invalid socket when tried to open network socket. More... | |
#define | MBG_ERR_NOT_A_SOCKET -70 |
Socket descriptor is not a socket. More... | |
#define | MBG_ERR_NBLOCK_WAIT_SLCT -71 |
Select timed out when waiting for non-blocking network port to become ready. More... | |
#define | MBG_ERR_NBLOCK_WAIT_WR_FD -72 |
Write fd not set after select when waiting for non-blocking network port to become ready. More... | |
#define | MBG_ERR_IO -73 |
Input/output error. More... | |
#define | MBG_ERR_INV_PARM -74 |
Invalid parameter. More... | |
#define | MBG_ERR_NO_DEV -75 |
No such device, or attempted an inappropriate function. More... | |
#define | MBG_ERR_NOT_FOUND -76 |
Specified item not found. More... | |
#define | MBG_ERR_OVERFLOW -77 |
range or buffer overflow More... | |
#define | MBG_ERR_PIPE -78 |
pipe error More... | |
#define | MBG_ERR_INTR -79 |
interrupted function call More... | |
#define | MBG_ERR_ACCESS -80 |
Access denied, e.g. when trying to access a file or device without sufficient permissions. More... | |
#define | MBG_ERR_PERM -81 |
Operation not permitted, e.g. when trying to set the system time without sufficient permissions. More... | |
#define | MBG_ERR_BUSY -82 |
Device or resource busy, can't be used. More... | |
#define | MBG_ERR_INV_HANDLE -83 |
invalid file/device handle specified More... | |
#define | MBG_ERR_XBP_CASC_LVL -84 |
too many XBP cascading levels More... | |
#define | MBG_ERR_ENCRYPT -85 |
encryption failed More... | |
#define | MBG_ERR_DECRYPT -86 |
decryption failed More... | |
#define | MBG_ERR_DISCONN -87 |
connection closed by remote site / host More... | |
#define | MBG_ERR_INV_CFG -88 |
invalid/inconsistent configuration parameters read from device, see also MBG_ERR_CFG More... | |
#define | MBG_ERR_RANGE -89 |
input parameter was out of range More... | |
#define | MBG_ERR_INV_TLV_ANN_BYTES -90 |
number of announced TLV bytes doesn't match number of transferred bytes More... | |
#define | MBG_ERR_INV_TLV_SIZE -91 |
TODOMore... | |
#define | MBG_ERR_INV_TLV_UID -92 |
TODOMore... | |
#define | MBG_ERR_EXIST -93 |
File exists. More... | |
#define | MBG_ERR_DATA_SIZE -94 |
the received data size toesn't match the expected data size More... | |
#define | MBG_ERR_NO_ENTITY -95 |
no such file or directory More... | |
#define | MBG_ERR_ALREADY_ALLOC -96 |
pointer already allocated when trying to allocate memory More... | |
#define | MBG_ERR_HOST_NOT_FOUND -97 |
host not found More... | |
#define | MBG_ERR_CONN_RESET -98 |
connection reset by peer More... | |
#define | MBG_ERR_DATA_FMT -99 |
invalid data format More... | |
#define | MBG_ERR_NO_SPACE -100 |
insufficient disk space left on the device More... | |
#define | MBG_ERR_NOT_CONFIGURED -101 |
configuration option is not active/configured More... | |
#define | MBG_ERR_INV_IDX -102 |
invalid index value used More... | |
#define | MBG_ERR_PARM_FMT -103 |
parameter string format error More... | |
#define | MBG_ERR_UNKNOWN -104 |
Unknown error code from external API. More... | |
#define | MBG_ERR_PAM -105 |
PAM error while authenticating user. More... | |
#define | MBG_ERR_TIMER -106 |
Timer expired (e.g. stream timeout on USB disconnect) More... | |
#define | MBG_ERR_AGAIN -107 |
on a non-blocking socket. More... | |
#define | MBG_ERR_STR_CHAR -108 |
Invalid character in string. More... | |
#define | MBG_ERR_STR_LEN -109 |
Wrong string length. More... | |
#define | MBG_ERR_SN_GCODE_LEN -110 |
Invalid device group code length. More... | |
#define | MBG_ERR_SN_GCODE_UNKN -111 |
Unknown device group code. More... | |
#define | MBG_ERR_SN_GCODE_WRONG -112 |
Wrong device group code in S/N. More... | |
#define | MBG_ERR_SN_LEN -113 |
Wrong serial number string length. More... | |
#define | MBG_ERR_SN_VRFY -114 |
Serial number could not be verified. More... | |
#define | MBG_ERR_RSRC_ITEM -115 |
Too many resource items. More... | |
#define | MBG_ERR_BUFFER_TOO_SMALL -116 |
Buffer is too small. More... | |
#define | MBG_ERR_OUTDATED -117 |
#define | MBG_ERR_STR_SUBSTR -118 |
Invalid substring in string. More... | |
#define | MBG_ERR_BAD_ADDRESS -119 |
Bad Address (like POSIX EFAULT) More... | |
Typedefs | |
typedef uint32_t | DWORD |
typedef int * | NTSTATUS |
Enumerations | |
enum | MBG_EXIT_CODES { MBG_EXIT_CODE_SUCCESS, MBG_EXIT_CODE_USAGE, MBG_EXIT_CODE_NOT_SUPP, MBG_EXIT_CODE_FAIL, MBG_EXIT_CODE_INV_TIME, N_MBG_EXIT_CODES } |
Predefined exit codes returned by some tools. More... | |
Functions | |
int | mbg_errno_to_os (int err_no) |
Convert one of the MBG_ERROR_CODES to an OS-specific format. More... | |
const char * | mbg_strerror (int mbg_errno) |
Return an error string associated with the MBG_ERROR_CODES. More... | |
bool | mbg_cond_err_msg (int rc, const char *what) |
Check if a value is an error code and print an associated error message. More... | |
bool | mbg_cond_err_msg_info (int rc, const char *what, const char *info) |
Check if a value is an general or a "not supported" error code and print an associated message. More... | |
int | mbg_cvi_rs232_error_to_mbg (int cvi_rc, const char *info) |
Translate an error code from the Labwindows/CVI RS-232 library to one of the MBG_ERROR_CODES. More... | |
int | mbg_win32_ntstatus_to_mbg (NTSTATUS st, const char *info) |
Translate a Windows NTSTATUS code to one of the MBG_ERROR_CODES. More... | |
int | mbg_win32_sys_err_to_mbg (DWORD win32_sys_rc, const char *info) |
Translate a Windows non-socket API return code to one of the MBG_RETURN_CODES. More... | |
int | mbg_win32_wsa_err_to_mbg (int wsa_err, const char *info) |
Translate a Windows socket API error code to one of the MBG_ERROR_CODES. More... | |
int | mbg_posix_errno_to_mbg (int posix_errno, const char *info) |
Translate a POSIX errno error code to one of the MBG_ERROR_CODES. More... | |
int | mbg_posix_h_errno_to_mbg (int posix_h_errno, const char *info) |
Translate a POSIX h_errno error code to one of the MBG_ERROR_CODES. More... | |
int | mbg_get_last_error (const char *info) |
Get and translate last error after non-socket function call. More... | |
int | mbg_get_last_socket_error (const char *info) |
Get and translate last error after socket function call. More... | |
int | mbg_get_gethostbyname_error (const char *info) |
Retrieve and convert last error after gethostbyname() More... | |
int | mbg_zlib_error_to_mbg (int zlib_error, const char *info, const char *msg) |
Retrieve and convert last zlib internal error code. More... | |
#define _ext extern |
Definition at line 148 of file mbgerror.h.
#define _USE_WIN32_PRIVATE_STATUS_CODES 0 |
Definition at line 178 of file mbgerror.h.
Definition at line 223 of file mbgerror.h.
#define MBG_ERR_ACCESS -80 |
Access denied, e.g. when trying to access a file or device without sufficient permissions.
Definition at line 336 of file mbgerror.h.
Referenced by dev_open_finish_setup().
#define MBG_ERR_AGAIN -107 |
on a non-blocking socket.
Try again (later). For example, a blocking operation
Definition at line 371 of file mbgerror.h.
#define MBG_ERR_ALREADY_ALLOC -96 |
pointer already allocated when trying to allocate memory
Definition at line 356 of file mbgerror.h.
Referenced by alloc_dev_hw_id().
#define MBG_ERR_AUTH -67 |
Binary protocol failed authentication.
Definition at line 320 of file mbgerror.h.
Referenced by dev_open_finish_setup().
#define MBG_ERR_BAD_ADDRESS -119 |
Bad Address (like POSIX EFAULT)
Definition at line 388 of file mbgerror.h.
#define MBG_ERR_BUFFER_TOO_SMALL -116 |
Buffer is too small.
Definition at line 383 of file mbgerror.h.
#define MBG_ERR_BUSY -82 |
Device or resource busy, can't be used.
Definition at line 338 of file mbgerror.h.
Referenced by dev_open_finish_setup().
#define MBG_ERR_BYTES_WRITTEN -66 |
Binary protocol failed to write all bytes.
Definition at line 319 of file mbgerror.h.
Referenced by dev_open_finish_setup().
#define MBG_ERR_CFG -2 |
Tried to write invalid configuration parameters to device, has to match PCPS_ERR_CFG (see also MBG_ERR_INV_CFG)
Definition at line 265 of file mbgerror.h.
Referenced by do_mbgirigcfg(), ef_check_parm(), eval_pout(), ip4_check_parm(), save_serial_settings(), set_date_time(), set_enable_flags(), set_gps_pos(), set_lan_intf(), set_ptp_cfg(), set_time_scale(), and set_tzdl_offs().
#define MBG_ERR_CLAIM_RSRC -28 |
Failed to claim port or mem resource.
Definition at line 283 of file mbgerror.h.
Referenced by rsrc_alloc_mem(), and rsrc_alloc_ports().
#define MBG_ERR_CONN_RESET -98 |
connection reset by peer
Definition at line 358 of file mbgerror.h.
#define MBG_ERR_CONN_TYPE -65 |
Binary protocol no valid/supported connection type specified.
Definition at line 318 of file mbgerror.h.
Referenced by mbgextio_close_connection(), mbgextio_dev_has_user_auth(), and mbgextio_rcv_msg_unlocked().
#define MBG_ERR_COPY_FROM_USER -44 |
Kernel driver failed to copy data from use to kernel space.
Definition at line 303 of file mbgerror.h.
Referenced by ioctl_switch().
#define MBG_ERR_COPY_TO_USER -43 |
Kernel driver failed to copy data from kernel to user space.
Definition at line 302 of file mbgerror.h.
Referenced by ioctl_switch().
#define MBG_ERR_CYCLIC_TIMEOUT -33 |
Cyclic event (IRQ, etc.) didn't occur in time.
Definition at line 288 of file mbgerror.h.
#define MBG_ERR_DATA_CSUM -62 |
Binary protocol data checksum error.
Definition at line 315 of file mbgerror.h.
Referenced by mbgextio_rcv_msg_unlocked().
#define MBG_ERR_DATA_FMT -99 |
#define MBG_ERR_DATA_SIZE -94 |
the received data size toesn't match the expected data size
Definition at line 354 of file mbgerror.h.
Referenced by mbgextio_rcv_msg_unlocked(), and mbgextio_send_database_cmd().
#define MBG_ERR_DECRYPT -86 |
decryption failed
Definition at line 343 of file mbgerror.h.
#define MBG_ERR_DEV_NOT_SUPP -29 |
Device type not supported by driver.
Definition at line 284 of file mbgerror.h.
Referenced by check_builtin_feature(), dev_open_finish_setup(), mbgextio_dev_is_legacy(), mbgextio_get_cmd_name(), and pcps_add_rsrc_irq().
#define MBG_ERR_DISCONN -87 |
connection closed by remote site / host
Definition at line 345 of file mbgerror.h.
Referenced by dev_open_finish_setup(), and mbgextio_rcv_msg_unlocked().
#define MBG_ERR_DRV_VERSION -42 |
The driver is too old.
Definition at line 299 of file mbgerror.h.
#define MBG_ERR_ENCRYPT -85 |
encryption failed
Definition at line 342 of file mbgerror.h.
#define MBG_ERR_EXIST -93 |
File exists.
Definition at line 353 of file mbgerror.h.
#define MBG_ERR_FW_ID -21 |
#define MBG_ERR_GENERIC -19 |
Generic error.
Definition at line 269 of file mbgerror.h.
Referenced by check_cmd_line(), dev_open_finish_setup(), mbg_get_gethostbyname_error(), mbg_get_last_socket_error(), mbg_open_device_by_param(), pcps_add_rsrc_irq(), and pcps_probe_device().
#define MBG_ERR_HDR_CSUM -61 |
Binary protocol header checksum error.
Definition at line 314 of file mbgerror.h.
Referenced by mbgextio_rcv_msg_unlocked().
#define MBG_ERR_HOST_NOT_FOUND -97 |
host not found
Definition at line 357 of file mbgerror.h.
#define MBG_ERR_INTR -79 |
interrupted function call
Definition at line 335 of file mbgerror.h.
Referenced by mbg_set_current_process_affinity_to_cpu().
#define MBG_ERR_INV_CFG -88 |
invalid/inconsistent configuration parameters read from device, see also MBG_ERR_CFG
Definition at line 346 of file mbgerror.h.
#define MBG_ERR_INV_DEV_REQUEST -30 |
IOCTL call not supported by driver.
Definition at line 285 of file mbgerror.h.
#define MBG_ERR_INV_HANDLE -83 |
invalid file/device handle specified
Definition at line 339 of file mbgerror.h.
Referenced by chk_feat_supp().
#define MBG_ERR_INV_IDX -102 |
invalid index value used
Definition at line 363 of file mbgerror.h.
#define MBG_ERR_INV_INTNO -40 |
Invalid interrupt number.
Definition at line 297 of file mbgerror.h.
#define MBG_ERR_INV_PARM -74 |
Invalid parameter.
Definition at line 329 of file mbgerror.h.
Referenced by chk_dev_xbp_supp_nodes(), dev_open_finish_setup(), mbg_get_all_xmulti_ref_status(), mbg_open_device_by_param(), mbgextio_send_database_cmd(), pcps_chk_dev_feat(), set_synth(), and snprint_ip6_addr().
#define MBG_ERR_INV_SOCK_FD -69 |
Invalid socket when tried to open network socket.
Definition at line 323 of file mbgerror.h.
Referenced by dev_open_finish_setup().
#define MBG_ERR_INV_TIME -23 |
The device has no valid time.
Definition at line 275 of file mbgerror.h.
Referenced by do_set_system_time_from_pcps_hr_time(), do_set_system_time_from_pcps_time(), and main().
#define MBG_ERR_INV_TLV_ANN_BYTES -90 |
number of announced TLV bytes doesn't match number of transferred bytes
Definition at line 349 of file mbgerror.h.
#define MBG_ERR_INV_TLV_SIZE -91 |
Definition at line 350 of file mbgerror.h.
#define MBG_ERR_INV_TLV_UID -92 |
Definition at line 351 of file mbgerror.h.
#define MBG_ERR_INV_TYPE -26 |
Bus-level device didn't recognize data type.
Definition at line 278 of file mbgerror.h.
Referenced by pcps_init_gps_transfer().
#define MBG_ERR_IO -73 |
Input/output error.
Definition at line 328 of file mbgerror.h.
Referenced by dev_open_finish_setup(), and mbgextio_close_connection().
#define MBG_ERR_IRQ_UNSAFE -38 |
Enabled IRQ of bus-level device is unsafe with this firmware/ASIC version.
Definition at line 293 of file mbgerror.h.
Referenced by mbgclock_default_clr_ucap_buff(), mbgclock_default_get_ucap_entries(), and mbgclock_default_get_ucap_event().
#define MBG_ERR_LIB_NOT_COMPATIBLE -35 |
Installed shared library version not compatible with version used at build time.
Definition at line 290 of file mbgerror.h.
Referenced by mbgdevio_check_version(), and mbgutil_check_version().
#define MBG_ERR_N_COM_EXCEEDS_SUPP -36 |
Num. COM ports of the device exceeds max. supp. by driver.
Definition at line 291 of file mbgerror.h.
Referenced by chk_dev_receiver_info().
#define MBG_ERR_N_GNSS_EXCEEDS_SUPP -46 |
Num. of GNSS systems supp. by device exceeds max. supp. by driver.
Definition at line 308 of file mbgerror.h.
Referenced by chk_set_n_gnss_supp().
#define MBG_ERR_N_GPIO_EXCEEDS_SUPP -47 |
Num. of GPIO ports supp. by device exceeds max. supp. by driver.
Definition at line 309 of file mbgerror.h.
#define MBG_ERR_N_POUT_EXCEEDS_SUPP -39 |
Num. prog. outputs of the device exceeds max. supp. by driver.
Definition at line 294 of file mbgerror.h.
#define MBG_ERR_N_STR_EXCEEDS_SUPP -37 |
Num. string formats of the device exceeds max. supp. by driver.
Definition at line 292 of file mbgerror.h.
Referenced by chk_dev_receiver_info().
#define MBG_ERR_N_UC_MSTR_EXCEEDS_SUPP -45 |
Num. PTP unicast masters of the device exceeds max. supp. by driver.
Definition at line 307 of file mbgerror.h.
Referenced by mbg_get_all_ptp_cfg_info().
#define MBG_ERR_N_XMR_EXCEEDS_SUPP -48 |
Num. of XMR sources supp. by device exceeds max. supp. by driver.
Definition at line 310 of file mbgerror.h.
#define MBG_ERR_NBLOCK_WAIT_SLCT -71 |
Select timed out when waiting for non-blocking network port to become ready.
Definition at line 325 of file mbgerror.h.
Referenced by dev_open_finish_setup().
#define MBG_ERR_NBLOCK_WAIT_WR_FD -72 |
Write fd not set after select when waiting for non-blocking network port to become ready.
Definition at line 326 of file mbgerror.h.
Referenced by dev_open_finish_setup().
#define MBG_ERR_NBYTES -22 |
match the number of bytes expected by the device.
The number of parameter bytes passed to the device did not
Definition at line 272 of file mbgerror.h.
Referenced by dev_open_finish_setup(), mbgextio_get_io_port_info_idx(), mbgextio_get_io_port_type_info_idx(), pcps_check_gps_data_size(), pcps_generic_io(), pcps_init_gps_transfer(), pcps_write(), and report_ret_val().
#define MBG_ERR_NO_DATA -24 |
The device's data output data buffer is empty, though it shouldn't be.
Definition at line 276 of file mbgerror.h.
Referenced by pcps_read_amcc_s5933().
#define MBG_ERR_NO_DEV -75 |
No such device, or attempted an inappropriate function.
Definition at line 330 of file mbgerror.h.
Referenced by mbg_handle_devices(), and mbg_open_device_by_param().
#define MBG_ERR_NO_DRIVER -41 |
No driver could be found.
Definition at line 298 of file mbgerror.h.
#define MBG_ERR_NO_ENTITY -95 |
no such file or directory
Definition at line 355 of file mbgerror.h.
Referenced by mbgextio_close_connection().
#define MBG_ERR_NO_MEM -27 |
Failed to allocate memory.
Definition at line 282 of file mbgerror.h.
Referenced by alloc_dev_hw_id(), dev_open_finish_setup(), mbg_get_all_net_cfg_info(), mbg_get_all_net_status_info(), mbg_get_all_ucap_info(), mbg_get_all_xmulti_ref_info(), mbg_get_all_xmulti_ref_status(), mbg_get_gethostbyname_error(), mbg_map_iomem_rsrc(), pcps_alloc_ddev_struc(), and report_ret_val().
#define MBG_ERR_NO_SPACE -100 |
insufficient disk space left on the device
Definition at line 361 of file mbgerror.h.
#define MBG_ERR_NOT_A_SOCKET -70 |
Socket descriptor is not a socket.
Definition at line 324 of file mbgerror.h.
#define MBG_ERR_NOT_CONFIGURED -101 |
configuration option is not active/configured
Definition at line 362 of file mbgerror.h.
#define MBG_ERR_NOT_FOUND -76 |
Specified item not found.
Definition at line 331 of file mbgerror.h.
#define MBG_ERR_NOT_READY -25 |
Bus-level device is temp. unable to respond e.g. during init. after RESET.
Definition at line 277 of file mbgerror.h.
Referenced by pcps_init_gps_transfer().
#define MBG_ERR_NOT_SUPP_BY_DEV -31 |
Command or feature not supported by device.
Definition at line 286 of file mbgerror.h.
Referenced by check_builtin_feature(), check_feat_supp_byte_array(), chk_bus_flags(), chk_dev_gpio_dep_on_ass_idx(), chk_dev_gpio_has_status(), chk_dev_gpio_supp_ass_idx(), chk_dev_ims_has_fdm(), chk_dev_ims_is_pll_locked(), chk_dev_ims_is_volt_out_enabled(), chk_dev_ims_is_volt_out_overload(), chk_dev_net_cfg_supp_stage_2(), chk_dev_ntp_supp_client(), chk_dev_ntp_supp_server(), chk_dev_xbp_supp_nodes(), chk_dev_xmulti_ref_supp_ext_source_metrics(), chk_dev_xmulti_ref_supp_ext_source_stats(), chk_dev_xmulti_ref_supp_ext_src_info(), chk_dev_xmulti_ref_supp_holdover_status(), chk_dev_xmulti_ref_supp_mrf_none(), chk_feat_supp(), dev_open_finish_setup(), do_chk_dev_feat_deprecated(), do_mbgcmptime(), do_mbghrtime(), do_mbgirigcfg(), do_mbgshowsignal(), get_n_time_scale(), ioctl_switch(), mbg_chk_dev_is_pci_express(), mbg_cond_err_msg_info(), mbg_get_all_irig_rx_info(), mbg_get_all_ptp_uc_master_info(), mbg_get_asic_features(), mbg_get_asic_version(), 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_xmr_holdover_status(), mbg_save_all_irig_rx_settings(), mbgclock_default_clr_ucap_buff(), mbgclock_default_get_fast_hr_timestamp(), mbgclock_default_get_fast_hr_timestamp_cycles(), mbgclock_default_get_ucap_entries(), mbgclock_default_get_ucap_event(), pcps_chk_dev_feat(), xdevfeat_has_gpio(), xdevfeat_has_ims(), xdevfeat_has_irig_rx(), xdevfeat_has_irig_tx(), xdevfeat_has_prog_pulses(), xdevfeat_has_serouts(), xdevfeat_has_synth(), xdevfeat_has_ucap(), and xdevfeat_has_up_conv().
#define MBG_ERR_NOT_SUPP_ON_OS -34 |
Function is not supported on this operating system.
Definition at line 289 of file mbgerror.h.
Referenced by check_port_link(), check_port_status(), dev_open_finish_setup(), get_ip4_gateway(), get_port_intf_idx(), get_port_mac_addr(), get_specific_port_ip4_addr(), mbg_comp_hr_latency(), mbg_get_default_cycles_frequency_from_dev(), mbg_get_fast_hr_timestamp(), mbg_get_fast_hr_timestamp_cycles(), mbg_get_process_affinity(), mbg_get_time_info_hrt(), mbg_get_time_info_tstamp(), mbg_get_time_sec_change(), mbg_set_current_process_affinity_to_cpu(), mbg_set_process_affinity(), and pcps_chk_dev_feat().
#define MBG_ERR_OUTDATED -117 |
Definition at line 385 of file mbgerror.h.
#define MBG_ERR_OVERFLOW -77 |
range or buffer overflow
Definition at line 333 of file mbgerror.h.
Referenced by mbgextio_rcv_msg_unlocked(), mbgextio_xmt_msg(), set_system_time_from_pcps_time(), and snprint_ip6_addr().
#define MBG_ERR_PAM -105 |
PAM error while authenticating user.
Definition at line 368 of file mbgerror.h.
#define MBG_ERR_PARM_FMT -103 |
parameter string format error
Definition at line 365 of file mbgerror.h.
Referenced by check_cmd_line(), chk_parm_name(), cidr_str_to_ip4_addr_and_net_mask(), cidr_str_to_ip6_addr_and_cidr_bits(), do_siocg_ioctl(), str_to_ip4_addr(), and str_to_ip6_addr().
#define MBG_ERR_PERM -81 |
Operation not permitted, e.g. when trying to set the system time without sufficient permissions.
Definition at line 337 of file mbgerror.h.
Referenced by mbgextio_chk_user_perm().
#define MBG_ERR_PIPE -78 |
pipe error
Definition at line 334 of file mbgerror.h.
#define MBG_ERR_RANGE -89 |
input parameter was out of range
Definition at line 347 of file mbgerror.h.
Referenced by check_feat_supp_byte_array(), chk_int16_parm(), cidr_str_to_ip4_addr_and_net_mask(), cidr_str_to_ip6_addr_and_cidr_bits(), mbg_open_device_by_param(), and set_system_time_from_pcps_time().
#define MBG_ERR_RCVD_NACK -63 |
Binary protocol received reply msg with a NACK code.
Definition at line 316 of file mbgerror.h.
Referenced by mbgextio_check_ack(), and msg_return_code().
#define MBG_ERR_RCVD_NO_ACK -64 |
Binary protocol received reply msg without expected ACK code. //### TODO.
Definition at line 317 of file mbgerror.h.
Referenced by mbgextio_check_ack().
#define MBG_ERR_RSRC_ITEM -115 |
Too many resource items.
Definition at line 382 of file mbgerror.h.
Referenced by pcps_add_rsrc_io(), and pcps_add_rsrc_mem().
#define MBG_ERR_SN_GCODE_LEN -110 |
Invalid device group code length.
Definition at line 376 of file mbgerror.h.
#define MBG_ERR_SN_GCODE_UNKN -111 |
Unknown device group code.
Definition at line 377 of file mbgerror.h.
#define MBG_ERR_SN_GCODE_WRONG -112 |
Wrong device group code in S/N.
Definition at line 378 of file mbgerror.h.
#define MBG_ERR_SN_LEN -113 |
Wrong serial number string length.
Definition at line 379 of file mbgerror.h.
#define MBG_ERR_SN_VRFY -114 |
Serial number could not be verified.
Definition at line 380 of file mbgerror.h.
#define MBG_ERR_SOCK_INIT -68 |
Socket interface not initialized, or failed to initialize.
Definition at line 322 of file mbgerror.h.
Referenced by dev_open_finish_setup().
#define MBG_ERR_STIME -1 |
Tried to write invalid date/time/status to device, has to match PCPS_ERR_STIME.
Definition at line 264 of file mbgerror.h.
#define MBG_ERR_STR_CHAR -108 |
Invalid character in string.
Definition at line 374 of file mbgerror.h.
#define MBG_ERR_STR_LEN -109 |
Wrong string length.
Definition at line 375 of file mbgerror.h.
#define MBG_ERR_STR_SUBSTR -118 |
Invalid substring in string.
Definition at line 387 of file mbgerror.h.
#define MBG_ERR_STR_TABLE_BASE_ENG |
A basic subset of strings associated with MBG_RETURN_CODES.
This initializer provides only the strings for basic error codes that are supported on all target systems.
See the MBG_ERR_STR_TABLE_EXT_ENG initializer for error strings associated with errors from network and other extended functions.
The generic MBG_ERR_STR_TABLE_ENG initializer should be used preferebly since it provides only the basic subset or the full set of strings depending on the target system.
Definition at line 419 of file mbgerror.h.
#define MBG_ERR_STR_TABLE_ENG |
Strings associated with MBG_RETURN_CODES.
Definition at line 550 of file mbgerror.h.
Referenced by mbg_strerror().
#define MBG_ERR_STR_TABLE_EXT_ENG |
A subset of extended strings associated with MBG_RETURN_CODES.
This initializer provides only the strings associated with extended errors from network and other extended functions.
See the MBG_ERR_STR_TABLE_BASE_ENG initializer for error strings associated with basic error codes that are supported on all target systems.
The generic MBG_ERR_STR_TABLE_ENG initializer should be used preferebly since it provides only the basic subset or the full set of strings depending on the target system.
Definition at line 519 of file mbgerror.h.
#define MBG_ERR_TIMEOUT -20 |
Timeout accessing the device.
Definition at line 270 of file mbgerror.h.
Referenced by dev_open_finish_setup(), mbgextio_rcv_msg_unlocked(), mbgextio_setup_receiver_info(), pcps_read_null(), pcps_wait_busy(), and release_cyclic_lock().
#define MBG_ERR_TIMER -106 |
Timer expired (e.g. stream timeout on USB disconnect)
Definition at line 369 of file mbgerror.h.
#define MBG_ERR_UNKNOWN -104 |
Unknown error code from external API.
Definition at line 366 of file mbgerror.h.
Referenced by dev_open_finish_setup(), mbg_cond_err_msg_info(), mbg_get_gethostbyname_error(), mbg_get_last_socket_error(), mbg_posix_errno_to_mbg(), and mbg_posix_h_errno_to_mbg().
#define MBG_ERR_UNSPEC -60 |
Unspecified error.
Definition at line 312 of file mbgerror.h.
Referenced by dev_open_finish_setup(), mbg_chk_get_all_gnss_info(), mbgextio_close_connection(), mbgextio_get_xmr_status_idx(), mbgextio_rcv_msg_unlocked(), and mbgextio_xmt_msg().
#define MBG_ERR_XBP_CASC_LVL -84 |
too many XBP cascading levels
Definition at line 341 of file mbgerror.h.
Referenced by mbgextio_setup_xbp_node_list().
#define mbg_rc_is_error | ( | _rc | ) | ( (_rc) < MBG_SUCCESS ) |
Definition at line 617 of file mbgerror.h.
Referenced by check_cmd_line(), check_get_receiver_port_cfg(), check_receiver_info_and_features(), chk_bus_flags(), chk_int16_parm(), cidr_str_to_ip4_addr_and_net_mask(), cidr_str_to_ip6_addr_and_cidr_bits(), cidr_str_to_ip6_addr_and_net_mask(), dev_open_finish_setup(), do_mbgcmptime(), do_mbgfasttstamp(), do_mbghrtime(), do_mbgshowsignal(), do_mbgtcrcal(), eval_pout(), get_ip4_gateway(), get_n_time_scale(), get_port_ip4_settings(), help_pout_arg(), ioctl_switch(), main(), mbg_chk_dev_is_pci_express(), mbg_chk_get_all_gnss_info(), mbg_chk_time_info(), mbg_cond_err_msg_info(), mbg_get_all_net_cfg_info(), mbg_get_all_net_status_info(), mbg_get_all_ucap_info(), mbg_get_all_xmulti_ref_info(), mbg_get_all_xmulti_ref_status(), mbg_get_default_cycles_frequency_from_dev(), mbg_get_serial_settings(), mbg_handle_devices(), mbg_open_device_by_param_chk(), mbg_set_current_process_affinity_to_cpu(), mbg_setup_receiver_info(), mbgextio_check_ack(), mbgextio_close_connection(), mbgextio_clr_evt_log(), mbgextio_clr_ucap_buff(), mbgextio_cmd_save_cfg(), mbgextio_delete_fw(), mbgextio_fw_ufu_flash(), mbgextio_get_all_gnss_sat_info(), mbgextio_get_all_port_info(), mbgextio_get_all_pout_info(), mbgextio_get_all_ptp_uc_master_info(), mbgextio_get_all_str_type_info(), mbgextio_get_ant_cable_len(), mbgextio_get_corr_info(), mbgextio_get_database_glb_info(), mbgextio_get_database_info_idx(), mbgextio_get_enable_flags(), mbgextio_get_event_info_idx(), mbgextio_get_event_status_idx(), mbgextio_get_event_value_idx(), mbgextio_get_first_evt_log_entry(), mbgextio_get_fw_glb_info(), mbgextio_get_fw_info_idx(), mbgextio_get_fw_ufu_info_idx(), mbgextio_get_gnss_mode_info(), mbgextio_get_gnss_sat_info(), mbgextio_get_gnss_sat_info_idx(), mbgextio_get_gnss_sv_status_idx(), mbgextio_get_gps_stat_info(), mbgextio_get_ignore_lock(), mbgextio_get_ims_fdm_info(), mbgextio_get_ims_fdm_limits(), mbgextio_get_ims_fdm_output_info_idx(), mbgextio_get_ims_fdm_output_state_idx(), mbgextio_get_ims_fdm_state(), mbgextio_get_ims_sensor_state_idx(), mbgextio_get_ims_state(), mbgextio_get_io_port_info_idx(), mbgextio_get_io_port_limits(), mbgextio_get_io_port_status_idx(), mbgextio_get_io_port_type_info_idx(), mbgextio_get_ip4_settings(), mbgextio_get_ip4_state(), mbgextio_get_irig_rx_info(), mbgextio_get_irig_tx_info(), mbgextio_get_lan_if_info(), mbgextio_get_monitoring_limits(), mbgextio_get_net_dns_srch_dom_idx(), mbgextio_get_net_dns_srvr_idx(), mbgextio_get_net_glb_cfg_info(), mbgextio_get_net_intf_addr_info_idx(), mbgextio_get_net_intf_link_info_idx(), mbgextio_get_net_intf_route_info_idx(), mbgextio_get_net_stat_dns_srch_dom_stat_idx(), mbgextio_get_net_stat_dns_srvr_idx(), mbgextio_get_net_stat_glb_cfg_info(), mbgextio_get_net_stat_intf_addr_info_idx(), mbgextio_get_net_stat_intf_link_info_idx(), mbgextio_get_net_stat_intf_route_info_idx(), mbgextio_get_next_evt_log_entry(), mbgextio_get_ntp_clnt_mode_info(), mbgextio_get_ntp_glb_info(), mbgextio_get_ntp_misc_limits(), mbgextio_get_ntp_misc_orphan_mode_info(), mbgextio_get_ntp_peer_settings_idx(), mbgextio_get_ntp_peer_state_idx(), mbgextio_get_ntp_refclk_cfg_info_idx(), mbgextio_get_ntp_refclk_state_idx(), mbgextio_get_ntp_srv_mode_info(), mbgextio_get_ntp_symm_key_info_idx(), mbgextio_get_ntp_symm_key_limits(), mbgextio_get_ntp_sys_state(), mbgextio_get_ntp_trusted_key_info_idx(), mbgextio_get_num_evt_log_entries(), mbgextio_get_port_info_idx(), mbgextio_get_pos(), mbgextio_get_pos_lla(), mbgextio_get_pos_xyz(), mbgextio_get_pout_info_idx(), mbgextio_get_ptp_cfg_info(), mbgextio_get_ptp_state(), mbgextio_get_ptp_uc_master_cfg_limits(), mbgextio_get_ptp_v1_current_dataset(), mbgextio_get_ptp_v1_default_dataset(), mbgextio_get_ptp_v1_parent_dataset(), mbgextio_get_ptp_v1_port_dataset_idx(), mbgextio_get_ptp_v1_time_properties_dataset(), mbgextio_get_ptp_v2_current_dataset(), mbgextio_get_ptp_v2_default_dataset(), mbgextio_get_ptp_v2_parent_dataset(), mbgextio_get_ptp_v2_port_dataset_idx(), mbgextio_get_ptp_v2_time_properties_dataset(), mbgextio_get_raw_irig_data(), mbgextio_get_ref_offs(), mbgextio_get_scu_stat_info(), mbgextio_get_snmp_glb_info(), mbgextio_get_snmp_v12_info_idx(), mbgextio_get_snmp_v12_trap_info_idx(), mbgextio_get_snmp_v3_info_idx(), mbgextio_get_snmp_v3_trap_info_idx(), mbgextio_get_str_type_info_idx(), mbgextio_get_svc_info_idx(), mbgextio_get_svc_mgmt_info(), mbgextio_get_svc_status_idx(), mbgextio_get_synth(), mbgextio_get_syslog_glb_info(), mbgextio_get_syslog_info_idx(), mbgextio_get_time(), mbgextio_get_time_scale_info(), mbgextio_get_tzcode(), mbgextio_get_tzdl(), mbgextio_get_ucap(), mbgextio_get_ucap_net_glb_info(), mbgextio_get_ucap_net_recv_info_idx(), mbgextio_get_user_info_idx(), mbgextio_get_user_level_info_idx(), mbgextio_get_user_mngmnt_info(), mbgextio_get_user_status_idx(), mbgextio_get_xmr_ext_source_metrics_idx(), mbgextio_get_xmr_ext_source_stats_idx(), mbgextio_get_xmr_ext_src_info_idx(), mbgextio_get_xmr_holdover_status(), mbgextio_get_xmr_info_idx(), mbgextio_get_xmr_instances(), mbgextio_get_xmr_status_idx(), mbgextio_rcv_msg_unlocked(), mbgextio_send_database_cmd(), mbgextio_set_active_fw(), mbgextio_set_ant_cable_len(), mbgextio_set_database_settings_idx(), mbgextio_set_enable_flags(), mbgextio_set_event_settings_idx(), mbgextio_set_fdm_tdev(), mbgextio_set_gnss_mode_settings(), mbgextio_set_gpio_settings_idx(), mbgextio_set_ignore_lock(), mbgextio_set_ims_fdm_output_settings_idx(), mbgextio_set_ims_fdm_settings(), mbgextio_set_io_port_settings_idx(), mbgextio_set_ip4_settings(), mbgextio_set_irig_rx_settings(), mbgextio_set_irig_tx_settings(), mbgextio_set_net_dns_srch_dom_idx(), mbgextio_set_net_dns_srvr_idx(), mbgextio_set_net_glb_cfg_settings(), mbgextio_set_net_intf_addr_settings_idx(), mbgextio_set_net_intf_link_settings_idx(), mbgextio_set_net_intf_route_settings_idx(), mbgextio_set_ntp_clnt_mode_cfg(), mbgextio_set_ntp_glb_info(), mbgextio_set_ntp_misc_orphan_mode_settings(), mbgextio_set_ntp_peer_settings_idx(), mbgextio_set_ntp_refclk_cfg_settings_idx(), mbgextio_set_ntp_srv_mode_cfg(), mbgextio_set_ntp_symm_key_settings_idx(), mbgextio_set_ntp_trusted_key_settings_idx(), mbgextio_set_port_settings_idx(), mbgextio_set_pos_lla(), mbgextio_set_pout_settings_idx(), mbgextio_set_ptp_cfg_settings(), mbgextio_set_ptp_uc_master_settings_idx(), mbgextio_set_ptp_v1_current_dataset(), mbgextio_set_ptp_v1_default_dataset(), mbgextio_set_ptp_v1_parent_dataset(), mbgextio_set_ptp_v1_port_dataset_idx(), mbgextio_set_ptp_v1_time_properties_dataset(), mbgextio_set_ptp_v2_current_dataset(), mbgextio_set_ptp_v2_default_dataset(), mbgextio_set_ptp_v2_parent_dataset(), mbgextio_set_ptp_v2_port_dataset_idx(), mbgextio_set_ptp_v2_time_properties_dataset(), mbgextio_set_ref_offs(), mbgextio_set_scu_stat_settings(), mbgextio_set_snmp_glb_settings(), mbgextio_set_snmp_v12_settings_idx(), mbgextio_set_snmp_v12_trap_settings_idx(), mbgextio_set_snmp_v3_settings_idx(), mbgextio_set_snmp_v3_trap_settings_idx(), mbgextio_set_svc_ctl_idx(), mbgextio_set_svc_settings_idx(), mbgextio_set_synth(), mbgextio_set_syslog_glb_settings(), mbgextio_set_syslog_settings_idx(), mbgextio_set_time(), mbgextio_set_time_scale_settings(), mbgextio_set_tzcode(), mbgextio_set_tzdl(), mbgextio_set_ucap_net_glb_settings(), mbgextio_set_ucap_net_recv_settings_idx(), mbgextio_set_user_level_settings_idx(), mbgextio_set_user_mngmnt_settings(), mbgextio_set_user_settings_idx(), mbgextio_set_xmr_settings_idx(), mbgextio_setup_receiver_info(), mbgextio_setup_xbp_node_list(), mbgextio_setup_xdevfeat(), msg_return_code(), pcps_add_rsrc_io(), pcps_add_rsrc_mem(), pcps_generic_io(), pcps_get_fw_id(), pcps_init_gps_transfer(), pcps_probe_device(), pcps_read_amcc_s5920(), pcps_read_amcc_s5933(), pcps_read_asic(), pcps_read_gps(), pcps_read_gps_block(), pcps_read_std(), pcps_write(), pcps_write_gps(), release_cyclic_lock(), report_ret_val(), set_ptp_cfg(), set_system_time_from_pcps_time(), setup_sernum_and_receiver_info(), sn_printf_timespec(), and snprint_time_t_to_iso().
#define mbg_rc_is_success | ( | _rc | ) | ( !mbg_rc_is_error( _rc ) ) |
Definition at line 618 of file mbgerror.h.
Referenced by check_get_pout_cfg(), check_get_receiver_port_cfg(), check_port_link(), check_port_status(), check_receiver_info_and_features(), chk_fast_tstamp_supp(), chk_feat_supp(), chk_get_rcvr_info(), dev_open_finish_setup(), do_chk_dev_feat_deprecated(), do_mbgsetsystime(), do_mbgtcrcal(), do_str_pcps_hr_date_time(), dump_tlv_info(), dump_xfeature_buffer(), get_port_intf_idx(), get_port_mac_addr(), get_specific_port_ip4_addr(), ioctl_switch(), main(), mbg_chk_dev_is_lwr(), mbg_chk_get_all_gnss_info(), mbg_chk_tstamp64_leap_sec(), mbg_find_devices_with_names(), mbg_get_all_irig_rx_info(), mbg_get_all_net_cfg_info(), mbg_get_all_net_status_info(), mbg_get_all_ptp_uc_master_info(), mbg_get_all_xmulti_ref_info(), mbg_get_all_xmulti_ref_status(), mbg_get_default_cycles_frequency_from_dev(), mbg_get_fast_hr_timestamp_comp(), 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(), mbg_get_gps_all_xmr_status(), mbg_get_hr_time_comp(), mbg_get_raw_irig_data_on_sec_change(), mbg_get_show_dev_info(), mbg_handle_device(), mbg_handle_devices(), mbg_open_device_by_name(), mbg_save_all_irig_rx_settings(), mbg_save_all_net_cfg_info(), mbg_save_all_xmulti_ref_info(), mbg_set_current_process_affinity_to_cpu(), mbg_snprint_hr_tstamp(), mbg_str_pcps_hr_date(), mbg_str_pcps_hr_time(), mbgclock_irq_handler(), mbgextio_chk_user_perm(), mbgextio_close_connection(), mbgextio_get_all_ptp_uc_master_info(), mbgextio_get_ant_cable_len(), mbgextio_get_ant_info(), mbgextio_get_bvar_stat(), mbgextio_get_cfgh(), mbgextio_get_clk_res_info(), mbgextio_get_corr_info(), mbgextio_get_database_glb_info(), mbgextio_get_database_info_idx(), mbgextio_get_debug_status(), mbgextio_get_enable_flags(), mbgextio_get_event_info_idx(), mbgextio_get_event_status_idx(), mbgextio_get_event_value_idx(), mbgextio_get_ext_sys_info(), mbgextio_get_fdm_freq(), mbgextio_get_first_evt_log_entry(), mbgextio_get_fw_glb_info(), mbgextio_get_fw_info_idx(), mbgextio_get_fw_ufu_info_idx(), mbgextio_get_gnss_mode_info(), mbgextio_get_gnss_sat_info(), mbgextio_get_gnss_sat_info_idx(), mbgextio_get_gnss_sv_status_idx(), mbgextio_get_gps_stat_info(), mbgextio_get_holdover_interval_counter(), mbgextio_get_ignore_lock(), mbgextio_get_ims_fdm_info(), mbgextio_get_ims_fdm_limits(), mbgextio_get_ims_fdm_output_info_idx(), mbgextio_get_ims_fdm_output_state_idx(), mbgextio_get_ims_fdm_state(), mbgextio_get_ims_sensor_state_idx(), mbgextio_get_ims_state(), mbgextio_get_io_port_limits(), mbgextio_get_io_port_status_idx(), mbgextio_get_iono(), mbgextio_get_ip4_settings(), mbgextio_get_ip4_state(), mbgextio_get_irig_rx_info(), mbgextio_get_irig_tx_info(), mbgextio_get_lan_if_info(), mbgextio_get_led_info_idx(), mbgextio_get_led_limits(), mbgextio_get_led_settings_idx(), mbgextio_get_lne_limits(), mbgextio_get_lne_port_info_idx(), mbgextio_get_lne_port_settings_idx(), mbgextio_get_monitoring_limits(), mbgextio_get_net_dns_srch_dom_idx(), mbgextio_get_net_dns_srvr_idx(), mbgextio_get_net_glb_cfg_info(), mbgextio_get_net_intf_addr_info_idx(), mbgextio_get_net_intf_link_info_idx(), mbgextio_get_net_intf_route_info_idx(), mbgextio_get_net_stat_dns_srch_dom_stat_idx(), mbgextio_get_net_stat_dns_srvr_idx(), mbgextio_get_net_stat_glb_cfg_info(), mbgextio_get_net_stat_intf_addr_info_idx(), mbgextio_get_net_stat_intf_link_info_idx(), mbgextio_get_net_stat_intf_route_info_idx(), mbgextio_get_next_evt_log_entry(), mbgextio_get_ntp_clnt_mode_info(), mbgextio_get_ntp_glb_info(), mbgextio_get_ntp_misc_limits(), mbgextio_get_ntp_misc_orphan_mode_info(), mbgextio_get_ntp_peer_settings_idx(), mbgextio_get_ntp_peer_state_idx(), mbgextio_get_ntp_refclk_cfg_info_idx(), mbgextio_get_ntp_refclk_state_idx(), mbgextio_get_ntp_srv_mode_info(), mbgextio_get_ntp_symm_key_info_idx(), mbgextio_get_ntp_symm_key_limits(), mbgextio_get_ntp_sys_state(), mbgextio_get_ntp_trusted_key_info_idx(), mbgextio_get_num_evt_log_entries(), mbgextio_get_opt_info(), mbgextio_get_port_info_idx(), mbgextio_get_port_parm(), mbgextio_get_pos_lla(), mbgextio_get_pos_xyz(), mbgextio_get_pout_info_idx(), mbgextio_get_ptp_cfg_info(), mbgextio_get_ptp_smpte_tlv_state(), mbgextio_get_ptp_state(), mbgextio_get_ptp_uc_master_cfg_limits(), mbgextio_get_ptp_v1_current_dataset(), mbgextio_get_ptp_v1_default_dataset(), mbgextio_get_ptp_v1_parent_dataset(), mbgextio_get_ptp_v1_port_dataset_idx(), mbgextio_get_ptp_v1_time_properties_dataset(), mbgextio_get_ptp_v2_current_dataset(), mbgextio_get_ptp_v2_default_dataset(), mbgextio_get_ptp_v2_parent_dataset(), mbgextio_get_ptp_v2_port_dataset_idx(), mbgextio_get_ptp_v2_time_properties_dataset(), mbgextio_get_pwr_ctl(), mbgextio_get_raw_irig_data(), mbgextio_get_receiver_info(), mbgextio_get_ref_offs(), mbgextio_get_scu_stat_info(), mbgextio_get_snmp_glb_info(), mbgextio_get_snmp_v12_info_idx(), mbgextio_get_snmp_v12_trap_info_idx(), mbgextio_get_snmp_v3_info_idx(), mbgextio_get_snmp_v3_trap_info_idx(), mbgextio_get_str_type_info_idx(), mbgextio_get_sv_alm(), mbgextio_get_svc_info_idx(), mbgextio_get_svc_mgmt_info(), mbgextio_get_svc_status_idx(), mbgextio_get_sw_rev(), mbgextio_get_synth(), mbgextio_get_syslog_glb_info(), mbgextio_get_syslog_info_idx(), mbgextio_get_tainted_cfg(), mbgextio_get_time(), mbgextio_get_time_scale_info(), mbgextio_get_tr_distance(), mbgextio_get_tzcode(), mbgextio_get_tzdl(), mbgextio_get_ucap_net_glb_info(), mbgextio_get_ucap_net_recv_info_idx(), mbgextio_get_user_info_idx(), mbgextio_get_user_level_info_idx(), mbgextio_get_user_mngmnt_info(), mbgextio_get_user_status_idx(), mbgextio_get_utc_parm(), mbgextio_get_xbp_limits(), mbgextio_get_xbp_node_info_idx(), mbgextio_get_xbp_node_limits(), mbgextio_get_xmr_ext_source_metrics_idx(), mbgextio_get_xmr_ext_source_stats_idx(), mbgextio_get_xmr_ext_src_info_idx(), mbgextio_get_xmr_holdover_status(), mbgextio_get_xmr_info_idx(), mbgextio_get_xmr_instances(), mbgextio_req_data(), mbgextio_req_data_idx_unlocked(), mbgextio_set_scu_stat_settings(), mbgextio_setup_receiver_info(), mbgextio_setup_xdevfeat(), mbgextio_xmt_cmd(), mbgextio_xmt_cmd_u32(), mbgextio_xmt_cmd_us(), mbgextio_xmt_msg(), nano_time_64_to_tm_gps(), pcps_chk_dev_feat(), pcps_cleanup_device(), pcps_detect_isa_devices(), pcps_generic_io(), pcps_init_ddev(), pcps_probe_device(), pcps_write(), pcps_write_gps(), setup_asic_features(), setup_device_type_name(), show_ext_stat_info(), show_utc_info(), xdevfeat_has_gpio(), xdevfeat_has_ims(), xdevfeat_has_irig_rx(), xdevfeat_has_irig_tx(), xdevfeat_has_synth(), and xdevfeat_has_up_conv().
#define mbg_rc_is_success_or_err_perm | ( | _rc | ) | ( mbg_rc_is_success( _rc ) || ( (_rc) == MBG_ERR_PERM ) ) |
Definition at line 620 of file mbgerror.h.
Referenced by mbgextio_setup_xdevfeat().
#define MBG_SUCCESS 0 |
Error codes used with Meinberg devices and drivers.
Appropriate error strings can be retrieved via the mbg_strerror function.
No error, has to match PCPS_SUCCESS
Definition at line 259 of file mbgerror.h.
Referenced by alloc_dev_hw_id(), check_builtin_feature(), check_cmd_line(), check_feat_supp_byte_array(), check_setup_receiver_info(), chk_bus_flags(), chk_dev_gpio_dep_on_ass_idx(), chk_dev_gpio_has_status(), chk_dev_gpio_supp_ass_idx(), chk_dev_ims_has_fdm(), chk_dev_ims_is_pll_locked(), chk_dev_ims_is_volt_out_enabled(), chk_dev_ims_is_volt_out_overload(), chk_dev_net_cfg_supp_stage_2(), chk_dev_ntp_supp_client(), chk_dev_ntp_supp_server(), chk_dev_receiver_info(), chk_dev_xbp_supp_nodes(), chk_dev_xmulti_ref_supp_ext_source_metrics(), chk_dev_xmulti_ref_supp_ext_source_stats(), chk_dev_xmulti_ref_supp_ext_src_info(), chk_dev_xmulti_ref_supp_holdover_status(), chk_dev_xmulti_ref_supp_mrf_none(), chk_feat_supp(), chk_parm_name(), chk_set_n_gnss_supp(), dev_open_finish_setup(), do_chk_dev_feat_deprecated(), do_mbgcmptime(), do_mbgfasttstamp(), do_mbggpscap(), do_mbgirigcfg(), do_mbgsetsystime(), do_mbgstatus(), do_mbgtcrcal(), do_mbgxhrtime(), do_siocg_ioctl(), eval_pout(), get_ip4_gateway(), get_n_time_scale(), help_pout_arg(), ioctl_switch(), mbg_chk_dev_is_pci_express(), mbg_chk_time_info(), mbg_comp_hr_latency(), mbg_cond_err_msg_info(), mbg_errno_to_os(), mbg_get_all_ptp_cfg_info(), mbg_get_all_ucap_info(), mbg_get_asic_features(), mbg_get_asic_version(), mbg_get_cal_rec_irig_rx_comp(), mbg_get_cal_rec_irig_rx_num_rec(), mbg_get_device_info(), mbg_get_drvr_info(), mbg_get_gen_io_info(), mbg_get_irq_stat_info(), mbg_get_process_affinity(), mbg_get_serial_settings(), mbg_get_show_dev_info(), mbg_get_status_port(), mbg_gmtime(), mbg_map_iomem_rsrc(), mbg_map_ioport_rsrc(), mbg_open_device_by_param(), mbg_save_all_ptp_cfg_info(), mbg_save_all_xmulti_ref_info(), mbg_set_current_process_affinity_to_cpu(), mbg_set_process_affinity(), mbg_show_pzf_corr_info(), mbgclock_default_get_fast_hr_timestamp(), mbgclock_default_get_fast_hr_timestamp_cycles(), mbgdevio_check_version(), mbgextio_check_ack(), mbgextio_chk_user_perm(), mbgextio_dev_is_legacy(), mbgextio_get_all_gnss_sat_info(), mbgextio_get_cmd_name(), mbgextio_get_event_value_idx(), mbgextio_get_gnss_sv_status_idx(), mbgextio_get_io_port_info_idx(), mbgextio_get_io_port_type_info_idx(), mbgextio_get_xmulti_ref_info_idx(), mbgextio_rcv_msg_unlocked(), mbgextio_setup_receiver_info(), mbgextio_setup_xbp_node_list(), mbgextio_setup_xdevfeat(), mbgutil_check_version(), msg_return_code(), pcps_add_rsrc_io(), pcps_add_rsrc_irq(), pcps_add_rsrc_mem(), pcps_alloc_ddev_struc(), pcps_check_gps_data_size(), pcps_check_id(), pcps_chk_dev_feat(), pcps_probe_device(), pcps_read_gps(), pcps_read_gps_block(), pcps_wait_busy(), report_ret_val(), rsrc_alloc_mem(), rsrc_alloc_ports(), save_serial_settings(), send_gps_cmd(), set_ant_cable_len(), set_date_time(), set_enable_flags(), set_event_time(), set_gps_tzdl(), set_lan_intf(), set_ptp_cfg(), set_system_time(), set_system_time_from_pcps_time(), set_time_scale(), set_timezone(), set_tz_code(), setup_default_str_type_info_idx(), setup_mm_addr(), setup_port_info_from_port_parm(), setup_sernum_and_receiver_info(), show_ant_cable_len(), show_enable_flags(), show_fast_hr_timestamp(), show_fast_hr_timestamp_burst(), show_lan_intf(), show_modulation(), show_pout(), show_ptp_cfg(), show_signal(), show_synth(), show_time_scale(), show_tzdl_offs(), xdevfeat_has_gpio(), xdevfeat_has_ims(), xdevfeat_has_irig_rx(), xdevfeat_has_irig_tx(), xdevfeat_has_prog_pulses(), xdevfeat_has_serouts(), xdevfeat_has_synth(), and xdevfeat_has_ucap().
#define MBG_SYS_RC_SUCCESS 0 |
Definition at line 168 of file mbgerror.h.
#define MBG_TGT_MISSING_DWORD 1 |
Definition at line 138 of file mbgerror.h.
#define MBG_TGT_MISSING_NTSTATUS 1 |
Definition at line 139 of file mbgerror.h.
Definition at line 231 of file mbgerror.h.
typedef uint32_t DWORD |
Definition at line 222 of file mbgerror.h.
typedef int* NTSTATUS |
Definition at line 230 of file mbgerror.h.
enum MBG_EXIT_CODES |
Predefined exit codes returned by some tools.
Definition at line 629 of file mbgerror.h.
bool mbg_cond_err_msg | ( | int | rc, |
const char * | what | ||
) |
Check if a value is an error code and print an associated error message.
[in] | rc | A positive number including MBG_SUCCESS, or one of the MBG_ERROR_CODES |
[in] | what | A string indicated what failed |
Definition at line 714 of file mbgerror.c.
References mbg_cond_err_msg_info().
Referenced by check_get_pout_cfg(), check_get_receiver_port_cfg(), check_irq_unsafe(), check_serial_mode(), check_setup_receiver_info(), do_mbgcmptime(), do_mbggpscap(), do_mbghrtime(), do_mbgirigcfg(), do_mbgsvctasks(), do_set_system_time_from_pcps_hr_time(), do_set_system_time_from_pcps_time(), eval_pout(), get_htc_timestamps(), get_n_time_scale(), mbg_get_gps_gnss_mode_info_chk(), mbg_get_show_dev_info(), mbg_show_pzf_corr_info(), save_serial_settings(), send_gps_cmd(), set_ant_cable_len(), set_date_time(), set_enable_flags(), set_event_time(), set_gps_pos(), set_gps_tzdl(), set_lan_intf(), set_ptp_cfg(), set_time_scale(), set_tz_code(), show_ant_cable_len(), show_enable_flags(), show_ext_stat_info(), show_fast_hr_timestamp(), show_fast_hr_timestamp_burst(), show_gps_pos(), show_hr_timestamp(), show_hr_timestamp_burst(), show_irig_ctrl_bits(), show_irig_debug_status(), show_lan_intf(), show_lan_intf_state(), show_modulation(), show_pout(), show_ptp_cfg(), show_ptp_state(), show_raw_irig_data(), show_sync_time(), show_synth(), show_time_and_status(), show_time_scale(), show_tzdl_offs(), and show_utc_info().
bool mbg_cond_err_msg_info | ( | int | rc, |
const char * | what, | ||
const char * | info | ||
) |
Check if a value is an general or a "not supported" error code and print an associated message.
If rc contains an error code then an error message is printed, and true is returned.
If the optional parameter string info2 is not NULL then it should contain the name of a feature which has been tested before. In this case, if the error code is the specific error MBG_ERR_NOT_SUPP_BY_DEV then a "not supported" message is printed using info2.
If info2 is NULL, or the error code is not MBG_ERR_NOT_SUPP_BY_DEV then the standard error message is printed anyway.
[in] | rc | A positive number including MBG_SUCCESS, or one of the MBG_ERROR_CODES |
[in] | what | A string indicated what failed |
[in] | info | An optional informational string telling what is not supported (may be NULL). |
Definition at line 742 of file mbgerror.c.
References _mbgddmsg_2, lookup_tbl_errno(), mbg_cvi_rs232_error_to_mbg(), MBG_ERR_NOT_SUPP_BY_DEV, MBG_ERR_UNKNOWN, MBG_LOG_INFO, mbg_rc_is_error, mbg_strerror(), MBG_SUCCESS, mbg_win32_ntstatus_to_mbg(), mbg_win32_sys_err_to_mbg(), and mbg_win32_wsa_err_to_mbg().
Referenced by do_mbgfasttstamp(), do_mbgshowsignal(), and mbg_cond_err_msg().
int mbg_cvi_rs232_error_to_mbg | ( | int | cvi_rc, |
const char * | info | ||
) |
Translate an error code from the Labwindows/CVI RS-232 library to one of the MBG_ERROR_CODES.
[in] | cvi_rc | An error code returned by a CVI RS-232 library function |
[in] | info | An optional informational text string, or NULL |
Referenced by mbg_cond_err_msg_info().
int mbg_errno_to_os | ( | int | err_no | ) |
Convert one of the MBG_ERROR_CODES to an OS-specific format.
[in] | err_no | One of the MBG_ERROR_CODES. |
Definition at line 626 of file mbgerror.c.
References lookup_tbl_errno(), and MBG_SUCCESS.
int mbg_get_gethostbyname_error | ( | const char * | info | ) |
Retrieve and convert last error after gethostbyname()
This function is specific to retrieve and translate error codes returned by gethostbyname() and gethostbyaddr(). In case of error these functions don't set errno but h_errno on POSIX systems, but under Windows the error code can be retrieved by WSAGetLastError() as usual.
The functions gethostbyname() and gethostbyaddr() are obsolete, and getaddressinfo() should be used preferably.
[in] | info | An optional informational text string, or NULL |
Definition at line 1090 of file mbgerror.c.
References MBG_ERR_GENERIC, MBG_ERR_NO_MEM, MBG_ERR_UNKNOWN, mbg_get_last_error(), mbg_posix_h_errno_to_mbg(), mbg_win32_wsa_err_to_mbg(), and mbg_zlib_error_to_mbg().
int mbg_get_last_error | ( | const char * | info | ) |
Get and translate last error after non-socket function call.
Retrieve the "last error" code after a non-socket function has been called and translate to one of the MBG_ERROR_CODES.
On POSIX systems the "last error" code is always stored in errno, but e.g. under Windows the "last error" code after a socket function has to be retrieved by calling WSAGetLastError(), whereas the "last error" code from non-socket POSIX-like functions has to be retrieved by calling GetLastError().
[in] | info | An optional informational text string, or NULL |
Definition at line 993 of file mbgerror.c.
References mbg_posix_errno_to_mbg(), and mbg_win32_sys_err_to_mbg().
Referenced by get_dev_info_for_dev_fn(), mbg_get_gethostbyname_error(), mbg_get_process_affinity(), mbg_gmtime(), mbg_open_device_by_param(), mbg_set_current_process_affinity_to_cpu(), mbg_set_process_affinity(), mbgextio_rcv_msg_unlocked(), and set_system_time().
int mbg_get_last_socket_error | ( | const char * | info | ) |
Get and translate last error after socket function call.
Retrieve the "last error" code after a socket function has been called and translate to one of the MBG_ERROR_CODES.
On POSIX systems the "last error" code is always stored in errno, but e.g. under Windows the "last error" code after a socket function has to be retrieved by calling WSAGetLastError, whereas the "last error" code from non-socket POSIX-like functions is stored in errno as usual.
[in] | info | An optional informational text string, or NULL |
Definition at line 1038 of file mbgerror.c.
References MBG_ERR_GENERIC, MBG_ERR_UNKNOWN, mbg_posix_errno_to_mbg(), and mbg_win32_wsa_err_to_mbg().
Referenced by dev_open_finish_setup(), do_siocg_ioctl(), get_ip4_gateway(), mbgextio_rcv_msg_unlocked(), and nl_read().
int mbg_posix_errno_to_mbg | ( | int | posix_errno, |
const char * | info | ||
) |
Translate a POSIX errno error code to one of the MBG_ERROR_CODES.
[in] | posix_errno | A POSIX error code as usually defined in errno.h |
[in] | info | An optional informational text string, or NULL |
Definition at line 920 of file mbgerror.c.
References lookup_tbl_errno(), and MBG_ERR_UNKNOWN.
Referenced by dev_open_finish_setup(), mbg_get_last_error(), mbg_get_last_socket_error(), and pcps_chk_dev_feat().
int mbg_posix_h_errno_to_mbg | ( | int | posix_h_errno, |
const char * | info | ||
) |
Translate a POSIX h_errno error code to one of the MBG_ERROR_CODES.
This function is specific to translate error codes returned by gethostbyname() and gethostbyaddr(). In case of error these functions don't set errno but h_errno to a specific value.
The functions gethostbyname() and gethostbyaddr() are obsolete, and getaddressinfo() should be used preferably.
[in] | posix_h_errno | An error code as usually defined in netdb.h |
[in] | info | An optional informational text string, or NULL |
Definition at line 956 of file mbgerror.c.
References lookup_tbl_errno(), and MBG_ERR_UNKNOWN.
Referenced by mbg_get_gethostbyname_error().
const char* mbg_strerror | ( | int | mbg_errno | ) |
Return an error string associated with the MBG_ERROR_CODES.
[in] | mbg_errno | One of the MBG_ERROR_CODES |
Definition at line 685 of file mbgerror.c.
References MBG_CODE_NAME_TABLE_ENTRY::code, MBG_ERR_STR_TABLE_ENG, and MBG_CODE_NAME_TABLE_ENTRY::name.
Referenced by check_receiver_info_and_features(), get_ip4_gateway(), main(), mbg_cond_err_msg_info(), mbg_open_device_by_param_chk(), mbgextio_close_connection(), nl_read(), pcps_add_rsrc_io(), pcps_add_rsrc_mem(), pcps_chk_dev_feat(), release_cyclic_lock(), report_ret_val(), set_system_time(), set_system_time_from_pcps_time(), setup_sernum_and_receiver_info(), and snprint_gmtime_error().
int mbg_win32_ntstatus_to_mbg | ( | NTSTATUS | st, |
const char * | info | ||
) |
Translate a Windows NTSTATUS code to one of the MBG_ERROR_CODES.
[in] | st | One of the NTSTATUS codes defined in ntstatus.h |
[in] | info | An optional informational text string, or NULL |
Referenced by mbg_cond_err_msg_info().
int mbg_win32_sys_err_to_mbg | ( | DWORD | win32_sys_rc, |
const char * | info | ||
) |
Translate a Windows non-socket API return code to one of the MBG_RETURN_CODES.
[in] | win32_sys_rc | A Windows non-socket API error code as returned by GetLastError(), or ERROR_SUCCESS. |
[in] | info | An optional informational text string, or NULL. |
Referenced by mbg_cond_err_msg_info(), mbg_get_last_error(), and set_system_time_from_pcps_time().
int mbg_win32_wsa_err_to_mbg | ( | int | wsa_err, |
const char * | info | ||
) |
Translate a Windows socket API error code to one of the MBG_ERROR_CODES.
[in] | wsa_err | A Windows socket API error code as returned by WSAGetLastError() |
[in] | info | An optional informational text string, or NULL |
Referenced by dev_open_finish_setup(), mbg_cond_err_msg_info(), mbg_get_gethostbyname_error(), and mbg_get_last_socket_error().
int mbg_zlib_error_to_mbg | ( | int | zlib_error, |
const char * | info, | ||
const char * | msg | ||
) |
Retrieve and convert last zlib internal error code.
[in] | zlib_error | zlib internal error code |
[in] | info | An optional informational text string, or NULL |
[in] | msg | An optional zlib specific error msg, or NULL. Struct z_stream contains member msg. |
Referenced by mbg_get_gethostbyname_error().