mbgtools-lx  4.2.8
extiohlp.h File Reference
#include <mbgextio.h>
#include <cfg_hlp.h>
#include <mbgerror.h>
#include <stdio.h>
#include <mbgserio.h>

Go to the source code of this file.

Macros

#define _ext   extern
 

Functions

int mbgextio_get_serial_settings (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, RECEIVER_PORT_CFG *p_rpcfg)
 Read all serial port settings and supported configuration parameters. More...
 
int mbgextio_save_serial_settings (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, RECEIVER_PORT_CFG *p_rpcfg, uint16_t port_idx)
 Send the configuration settings for a single serial port to a device. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_xbp_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_XBP_INFO **p)
 Read all XBP information from a device into a newly or re-allocated ALL_XBP_INFO structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_net_cfg_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_NET_CFG_INFO **p)
 Read all network configuration into an ALL_NET_CFG_INFO structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_net_cfg_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_NET_CFG_INFO *p)
 Write all network settings to a device. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_net_status_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_NET_STATUS_INFO **p)
 Read current network status into an ALL_NET_STATUS_INFO structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_monitoring_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_MONITORING_INFO **p)
 Read all monitoring configuration into an ALL_MONITORING_INFO structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_monitoring_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_MONITORING_INFO *p)
 Write all monitoring configuration to a device. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_events_settings (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const ALL_EVENTS *p)
 Write all event related configurations to a device. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_events (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const ALL_MONITORING_INFO *info, ALL_EVENTS **p)
 Read all events into an ALL_EVENTS structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_snmp_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_SNMP_INFO **p)
 Read all SNMP configuration into an ALL_SNMP_INFO structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_syslog_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_SYSLOG_INFO **p)
 Read all syslog configuration into an ALL_SYSLOG_INFO structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_syslog_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const ALL_SYSLOG_INFO *p)
 Write all syslog configuration from an ALL_SYSLOG_INFO structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_snmp_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_SNMP_INFO *p)
 Write all SNMP settings to a device. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_database_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_DATABASE_INFO **p)
 Read all database related info into an ALL_DATABASE_INFO structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_database_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const ALL_DATABASE_INFO *p)
 Write all database configurations from an ALL_DATABASE_INFO structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ptp_cfg_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_PTP_CFG_INFO *p)
 Read all PTP configuration into an ALL_PTP_CFG_INFO structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_ptp_cfg_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const ALL_PTP_CFG_INFO *p)
 Write all PTP settings to a device. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ptp_v1_common_datasets (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_PTP_V1_COMMON_DATASETS **p)
 Read all PTPv1 common datasets into a newly or re-allocated ALL_PTP_V1_COMMON_DATASETS structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ptp_v2_common_datasets (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_PTP_V2_COMMON_DATASETS **p)
 Read all PTPv2 common datasets into a newly or re-allocated ALL_PTP_V2_COMMON_DATASETS structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_firmware_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_FIRMWARE_INFO **p)
 Read all FW management info into a newly or re-allocated ALL_FIRMWARE_INFO structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ntp_cfg_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_NTP_CFG_INFO **p)
 Read all NTP configuration into a newly or re-allocated ALL_NTP_CFG_INFO structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_ntp_cfg_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_NTP_CFG_INFO *p)
 Write all NTP settings to a device. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ntp_status (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const ALL_NTP_CFG_INFO *info, ALL_NTP_STATUS **p)
 Read all NTP status info into a newly or re-allocated ALL_NTP_STATUS structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_xmulti_ref_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_XMULTI_REF_INFO **p)
 Read all XMR info into a newly or re-allocated ALL_XMULTI_REF_INFO. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_xmulti_ref_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_XMULTI_REF_INFO *p)
 Set all extended multi ref settings to a device. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_xmulti_ref_status (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const ALL_XMULTI_REF_INFO *info, ALL_XMULTI_REF_STATUS **p)
 Read all XMR status info into a newly or re-allocated ALL_XMULTI_REF_STATUS. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ims_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_IMS_INFO **pp)
 Read all IMS related information / configuration into an ALL_IMS_INFO structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ims_state (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const ALL_IMS_INFO *info, ALL_IMS_STATE **pp)
 Read all IMS related states into an ALL_IMS_STATE structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_gpio_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_GPIO_INFO **pp)
 Read all GPIO related information / configuration into an ALL_GPIO_INFO structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_gpio_state (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const ALL_GPIO_INFO *info, ALL_GPIO_STATE **pp)
 Read all GPIO related state information to an ALL_GPIO_STATE structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_io_ports (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_MBG_IO_PORTS **pp)
 Read all I/O port related information to an ALL_MBG_IO_PORTS structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_io_ports (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const ALL_MBG_IO_PORTS *p)
 Write all I/O port related configuration to a device. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_io_port_status (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_MBG_IO_PORTS *p)
 Read all I/O port related status information to an ALL_MBG_IO_PORTS structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ucap_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_UCAP_INFO **p)
 Read all user capture information and store it into a newly allocated or reused ALL_UCAP_INFO. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ucap_net_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_UCAP_NET_INFO **p)
 Read all user capture network info and store it into a newly allocated or reused ALL_UCAP_NET_INFO. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_ucap_net_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_UCAP_NET_INFO *p)
 Write all user capture network settings to a device. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_user_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_USER_INFO **p)
 Read all user info and store it into a newly allocated or reused ALL_USER_INFO. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_user_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_USER_INFO *p)
 Write all user configuration to a device. More...
 
int mbgextio_chk_get_all_gnss_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_GNSS_INFO *p_agi)
 Read or setup all GNSS status information. More...
 
void rad_to_dms (const double *rad, DMS *dms, const char prefix)
 Convert a mathematical angle [rad] to a geographic angle [degree, minute, second]. More...
 
void lla_to_dms (POS *pos)
 Convert mathematic coords to to geographic coords. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_ack (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, GPS_CMD cmd)
 Transmit an ACK response to the sender. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_nack (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, GPS_CMD cmd, int error)
 Transmit a NACK response to the sender. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_begin_transaction (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, uint16_t type, uint8_t set)
 Begin a transaction. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_end_transaction (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, uint16_t type, int rc)
 End a transaction. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_svc_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, ALL_SERVICE_INFO **p)
 Read all user info and store it into a newly allocated or reused ALL_USER_INFO. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_svc_info (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const ALL_SERVICE_INFO *p)
 Write all service configuration to a device. More...
 
_NO_MBG_API_ATTR MBG_TLV_RCV_STATE *_MBG_API mbgextio_get_tlv_rcv_state (MBG_MSG_CTL *pmctl)
 Get control message's internal TLV state. More...
 
_NO_MBG_API_ATTR MBG_USB_DEV_INFO *_MBG_API mbgextio_get_usb_dev_info (MBG_MSG_CTL *pmctl)
 Get control message's internal USB device info structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_tlv_announce (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const MBG_TLV_ANNOUNCE *p)
 Send a MBG_TLV_ANNOUNCE structure to a host. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_tlv_chunk (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const void *buf, size_t buflen, void *user_data, void(*func)(const MBG_TLV_HDR *, void *))
 Send a buffer with variable length to a host. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_do_xmt_file (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, FILE *f, uint32_t bytes)
 Send a file to a host. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_file (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const char *file, const char *rev, const char *dest_path, MBG_TLV_TYPE tlv_feat_type, MBG_TLV_UID uid)
 Send a file with a specific command to a host. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_tlv_buffer (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const void *buffer, size_t size, MBG_TLV_TYPE tlv_feat_type, MBG_TLV_UID uid)
 Send buffer to a host. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_tlv_blob (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const void *blob, size_t size, MBG_TLV_UID uid, void *user_data, void(*func)(const MBG_TLV_HDR *, void *))
 Send a file with a specific command to a host. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_cmd_line (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const char *cmd_line, MBG_TLV_UID uid)
 Send a cmd line to a host. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_req_file (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const char *src_file, const char *dest_file, void **dest_buf, size_t *dest_buf_len, MBG_TLV_UID uid)
 Request a generic file of a target. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_req_all_timemon_status (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, void *buf, uint16_t num_elem, size_t buflen)
 Request full timemon-status of a timemon-device. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_req_file_with_cmd (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const char *dest_path, MBG_TLV_TYPE tlv_feat_type, MBG_TLV_UID uid)
 Request a file with a specific command from a host. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_tlv_cmd (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, MBG_TLV_TYPE tlv_feat_type, MBG_TLV_UID uid)
 Send a tlv cmd to a host. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_fw_update (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const char *file, const char *rev, const char *dest_path, MBG_TLV_UID uid)
 Wrapper function for mbgextio_xmt_file ::TODO. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_fw_rollback (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, MBG_TLV_UID uid)
 Wrapper function for mbgextio_xmt_tlv_cmd. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_binary_file (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const char *file, const char *dest_path, MBG_TLV_UID uid)
 Wrapper function for mbgextio_xmt_file ::TODO. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_apply_license_file (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const char *file, MBG_TLV_UID uid)
 Wrapper function for mbgextio_xmt_file ::TODO. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_diag_file (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const char *file, MBG_TLV_UID uid)
 Wrapper function for mbgextio_xmt_file ::TODO move to firmware-specific module. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_req_diag_file (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const char *dest_path, MBG_TLV_UID uid)
 Wrapper function. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_tlv_to_struct (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, void *buf, size_t buflen)
 Read TLV data into a single structure. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_tlv_to_mem (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, void **buf)
 Read TLV into memory. More...
 
_NO_MBG_API_ATTR int _MBG_API mbgextio_tlv_to_file (MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, const char *file)
 Read TLV into a single file. See mbgextio_tlv_to_mem ::TODO. More...
 

Macro Definition Documentation

◆ _ext

#define _ext   extern

Definition at line 231 of file extiohlp.h.

Function Documentation

◆ lla_to_dms()

void lla_to_dms ( POS pos)

Convert mathematic coords to to geographic coords.

Mathematic coords are (longitude, latitude in [rad]), geographic coords are (longitude, latitude in [degree, minute, second])

Note
This has been copied from mbggeo.c, so mbggeo.h should provide the same prototype.

Referenced by mbgextio_get_pos().

◆ mbgextio_apply_license_file()

_NO_MBG_API_ATTR int _MBG_API mbgextio_apply_license_file ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const char *  file,
MBG_TLV_UID  uid 
)

Wrapper function for mbgextio_xmt_file ::TODO.

Returns
One of the MBG_RETURN_CODES

◆ mbgextio_begin_transaction()

_NO_MBG_API_ATTR int _MBG_API mbgextio_begin_transaction ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
uint16_t  type,
uint8_t  set 
)

Begin a transaction.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]typeOne of MBG_TRANSACTION_TYPES
[in]setIndicates, that this is a set transaction
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_end_transaction

◆ mbgextio_chk_get_all_gnss_info()

int mbgextio_chk_get_all_gnss_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_GNSS_INFO p_agi 
)

Read or setup all GNSS status information.

This function should be called preferably to get a GNSS status summary from GNSS receivers (GPS, GLONASS, ...).

The function mbgextio_setup_receiver_info must have been called before, and the returned RECEIVER_INFO structure has to be passed to this function.

If the device supports this then the low level GNSS API functions are called directly to collect the status information. If the device doesn't support the GNSS API but is a pure GPS receiver then the GPS API functions are called and the GNSS data structures are filled up accordingly, so the calling application can always evaluate the GNSS data structures in ALL_GNSS_INFO.

If neither GPS nor another GNSS system is supported then this function returns the MBG_ERR_NOT_SUPP_BY_DEV error.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]p_agiPointer to a ALL_GNSS_INFO to be filled
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_get_gps_stat_info
mbgextio_get_gnss_mode_info
mbgextio_get_all_gnss_sat_info

◆ mbgextio_do_xmt_file()

_NO_MBG_API_ATTR int _MBG_API mbgextio_do_xmt_file ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
FILE *  f,
uint32_t  bytes 
)

Send a file to a host.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]fPointer to an opened file to be sent to the device
[in]bytesNumber of bytes to be sent, i.e. the file size
Returns
One of the MBG_RETURN_CODES

◆ mbgextio_end_transaction()

_NO_MBG_API_ATTR int _MBG_API mbgextio_end_transaction ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
uint16_t  type,
int  rc 
)

End a transaction.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]typeOne of MBG_TRANSACTION_TYPES
[in]rcUse MBG_SUCCESS to indicate transaction has successfully been completed, use any other error code to indicate transaction has been aborted.
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_begin_transaction

◆ mbgextio_get_all_database_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_database_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_DATABASE_INFO **  p 
)

Read all database related info into an ALL_DATABASE_INFO structure.

Note
mbgextio_dev_has_database should be called to check if this API is supported.
Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a ALL_DATABASE_INFO structure to be filled up
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_database
mbgextio_save_all_database_info

◆ mbgextio_get_all_events()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_events ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const ALL_MONITORING_INFO info,
ALL_EVENTS **  p 
)

Read all events into an ALL_EVENTS structure.

An ALL_EVENTS structure will be allocated and needs to be freed later by calling free_all_events The ALL_MONITORING_INFO::limits is used to check which events are supported

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]infoPointer to a ALL_MONITORING_INFO structure which has been read before
[out]pPointer to a pointer to ALL_EVENTS
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_monitoring
free_all_monitoring_info

◆ mbgextio_get_all_firmware_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_firmware_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_FIRMWARE_INFO **  p 
)

Read all FW management info into a newly or re-allocated ALL_FIRMWARE_INFO structure.

Note
mbgextio_dev_has_fw_mngmnt should be called to check if this API is supported.

An ALL_FIRMWARE_INFO and a number of MBG_FW_GLB_INFO::installed_fws of MBG_FW_INFO_IDX and MBG_FW_INFO::num_ufus of MBG_FW_UFU_INFO_IFX for each firmware will be allocated and need to be freed by calling free_all_firmware_info

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a pointer to ALL_FIRMWARE_INFO
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_fw_mngmnt
mbgextio_get_fw_glb_info
mbgextio_get_fw_info_idx
mbgextio_get_fw_ufu_info_idx
free_all_firmware_info

◆ mbgextio_get_all_gpio_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_gpio_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_GPIO_INFO **  pp 
)

Read all GPIO related information / configuration into an ALL_GPIO_INFO structure.

Note
mbgextio_dev_has_gpio should be called before using this function
Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in,out]ppPointer to a pointer of ALL_GPIO_INFO structure which will be malloced
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_gpio
chk_dev_gpio_has_status
free_all_gpio_info

◆ mbgextio_get_all_gpio_state()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_gpio_state ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const ALL_GPIO_INFO info,
ALL_GPIO_STATE **  pp 
)

Read all GPIO related state information to an ALL_GPIO_STATE structure.

Note
mbgextio_dev_has_gpio should be called before using this function
Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]infoPointer to a ALL_GPIO_INFO structure which has been read before
[in,out]ppPointer to a pointer of ALL_GPIO_STATE structure which will be malloced
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_gpio
chk_dev_gpio_has_status
free_all_gpio_info
free_all_gpio_state

◆ mbgextio_get_all_ims_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ims_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_IMS_INFO **  pp 
)

Read all IMS related information / configuration into an ALL_IMS_INFO structure.

Note
mbgextio_dev_has_ims should be called before using this function
Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in,out]ppPointer to a pointer of ALL_IMS_INFO structure which will be malloced
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_ims
free_all_ims_info
mbgextio_get_all_ims_state

◆ mbgextio_get_all_ims_state()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ims_state ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const ALL_IMS_INFO info,
ALL_IMS_STATE **  pp 
)

Read all IMS related states into an ALL_IMS_STATE structure.

Note
mbgextio_dev_has_ims should be called before using this function
Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]infoPointer to a ALL_GPIO_INFO structure which has been read before
[in,out]ppPointer to a pointer of ALL_IMS_STATE structure which will be malloced
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_ims
chk_dev_ims_has_fdm
free_all_ims_info

◆ mbgextio_get_all_io_port_status()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_io_port_status ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_MBG_IO_PORTS p 
)

Read all I/O port related status information to an ALL_MBG_IO_PORTS structure.

Note
mbgextio_dev_has_io_ports should be called before using this function
Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to an address of an ALL_MBG_IO_PORTS structure to be allocated and filled up
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_io_ports
free_all_io_ports
mbgextio_get_all_io_ports

◆ mbgextio_get_all_io_ports()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_io_ports ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_MBG_IO_PORTS **  pp 
)

Read all I/O port related information to an ALL_MBG_IO_PORTS structure.

Note
mbgextio_dev_has_io_ports should be called before using this function
Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in,out]ppPointer to a pointer of ALL_MBG_IO_PORTS structure which will be allocated
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_io_ports
free_all_io_ports
mbgextio_get_all_io_port_status

◆ mbgextio_get_all_monitoring_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_monitoring_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_MONITORING_INFO **  p 
)

Read all monitoring configuration into an ALL_MONITORING_INFO structure.

A ALL_MONITORING_INFO will be allocated and needs to be freed later by calling free_all_monitoring_info. A ALL_SNMP_INFO may be allocated, if SNMP is supported.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a pointer to ALL_MONITORING_INFO
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_monitoring
mbgextio_get_all_snmp_info
free_all_monitoring_info

◆ mbgextio_get_all_net_cfg_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_net_cfg_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_NET_CFG_INFO **  p 
)

Read all network configuration into an ALL_NET_CFG_INFO structure.

Reads the complete network configuration of a device. Depending on the supported API (NET_CFG or LAN_IP4), the appropriate settings are requested and, if neccessary, translated into the NET_CFG structures. The filled structures can then be used as if the NET_CFG API was completely supported

If NET_CFG or parts of it are not supported, the appropriate n_supp... members of ALL_NET_CFG_INFO::glb_cfg_info are set to 0, whereas the num... members of ::ALL_NET_CFG_INFO::glb_cfg_info::glb_settings may be 1 or greater.

An ALL_NET_CFG_INFO and the appropriate number of MBG_NET_INTF_LINK_INFO_IDX, MBG_NET_INTF_ADDR_INFO_IDX, MBG_IP_ADDR_IDX, MBG_NET_NAME_IDX and MBG_NET_INTF_ROUTE_INFO_IDX will be allocated and need to be freed later by calling free_all_net_cfg_info

Note
mbgextio_dev_has_net_cfg and mbgextio_dev_has_lan_ip4 are used in the function
Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a pointer to ALL_NET_CFG_INFO
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_net_cfg
mbgextio_get_net_glb_cfg_info
mbgextio_get_net_dns_srvr_idx
mbgextio_get_net_dns_srch_dom_idx
mbgextio_dev_has_lan_ip4
mbgextio_get_lan_if_info
mbgextio_get_ip4_settings
free_all_net_cfg_info

◆ mbgextio_get_all_net_status_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_net_status_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_NET_STATUS_INFO **  p 
)

Read current network status into an ALL_NET_STATUS_INFO structure.

Depending on the supported API (NET_CFG or LAN_IP4), the appropriate status is requested and, if neccessary, translated into the NET_CFG structures. The filled structures can then be used as if the NET_CFG API was completely supported.

A ALL_NET_STATUS_INFO and the appropriate number of MBG_NET_INTF_LINK_INFO_IDX, MBG_NET_INTF_ADDR_INFO_IDX, MBG_IP_ADDR_IDX, MBG_NET_NAME_IDX and MBG_NET_INTF_ROUTE_INFO_IDX will be allocated and need to be freed later by calling free_all_net_status_info

Note
mbgextio_dev_has_net_cfg and mbgextio_dev_has_lan_ip4 are used in the function
Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a pointer to ALL_NET_STATUS_INFO
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_net_cfg
mbgextio_get_net_glb_cfg_info
mbgextio_get_net_stat_dns_srvr_idx
mbgextio_get_net_stat_dns_srch_dom_stat_idx
mbgextio_dev_has_lan_ip4
mbgextio_get_lan_if_info
mbgextio_get_ip4_state
free_all_net_status_info

◆ mbgextio_get_all_ntp_cfg_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ntp_cfg_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_NTP_CFG_INFO **  p 
)

Read all NTP configuration into a newly or re-allocated ALL_NTP_CFG_INFO structure.

Note
mbgextio_dev_has_ntp should be called to check if this API is supported.

An ALL_NTP_CFG_INFO and NTP_SRV_MODE_INFO, NTP_CLNT_MODE_INFO and a number of ::NTP_CLNT_MODE_INFO::settings::num_peers of NTP_PEER_SETTINGS_IDX will be allocated and need to be freed by calling free_all_ntp_cfg_info

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a pointer to ALL_NTP_CFG_INFO
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_ntp

◆ mbgextio_get_all_ntp_status()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ntp_status ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const ALL_NTP_CFG_INFO info,
ALL_NTP_STATUS **  p 
)

Read all NTP status info into a newly or re-allocated ALL_NTP_STATUS structure.

Note
mbgextio_dev_has_ntp should be called to check if this API is supported.

A ALL_NTP_STATUS and NTP_SRV_MODE_INFO, NTP_CLNT_MODE_INFO and a number of ::NTP_CLNT_MODE_INFO::settings::num_peers of NTP_PEER_STATE_IDX will be allocated and need to be freed by calling free_all_ntp_status

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]infoPointer to the appropriate info structure
[out]pPointer to a pointer to ALL_NTP_STATUS
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_ntp

◆ mbgextio_get_all_ptp_cfg_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ptp_cfg_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_PTP_CFG_INFO p 
)

Read all PTP configuration into an ALL_PTP_CFG_INFO structure.

Note
mbgextio_dev_has_ptp should be called to check if this API is supported.
Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a ALL_PTP_CFG_INFO structure to be filled up
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_ptp

◆ mbgextio_get_all_ptp_v1_common_datasets()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ptp_v1_common_datasets ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_PTP_V1_COMMON_DATASETS **  p 
)

Read all PTPv1 common datasets into a newly or re-allocated ALL_PTP_V1_COMMON_DATASETS structure.

Note
This is only supported if PTP_CFG_MSK_HAS_V1_COMMON_DATASETS is set in PTP_CFG_INFO::supp_flags A number of MBG_PTP_V1_DEFAULT_DATASET::number_ports port datasets will be allocated. To free the allocated ALL_PTP_V1_COMMON_DATASETS, free_all_ptp_v1_common_datasets should be called.
Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a pointer of ALL_PTP_V1_COMMON_DATASETS structure to be allocated and filled
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_get_ptp_cfg_info
mbgextio_get_ptp_v1_default_dataset
mbgextio_get_ptp_v1_current_dataset
mbgextio_get_ptp_v1_parent_dataset
mbgextio_get_ptp_v1_time_properties_dataset
mbgextio_get_ptp_v1_port_dataset_idx
free_all_ptp_v1_common_datasets

◆ mbgextio_get_all_ptp_v2_common_datasets()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ptp_v2_common_datasets ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_PTP_V2_COMMON_DATASETS **  p 
)

Read all PTPv2 common datasets into a newly or re-allocated ALL_PTP_V2_COMMON_DATASETS structure.

Note
This is only supported if PTP_CFG_MSK_HAS_V2_COMMON_DATASETS is set in PTP_CFG_INFO::supp_flags A number of MBG_PTP_V2_DEFAULT_DATASET::number_ports port datasets will be allocated. To free the allocated ALL_PTP_V2_COMMON_DATASETS, free_all_ptp_v2_common_datasets should be called.
Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a pointer of ALL_PTP_V2_COMMON_DATASETS structure to be allocated and filled
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_get_ptp_cfg_info
mbgextio_get_ptp_v2_default_dataset
mbgextio_get_ptp_v2_current_dataset
mbgextio_get_ptp_v2_parent_dataset
mbgextio_get_ptp_v2_time_properties_dataset
mbgextio_get_ptp_v2_port_dataset_idx
free_all_ptp_v2_common_datasets

◆ mbgextio_get_all_snmp_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_snmp_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_SNMP_INFO **  p 
)

Read all SNMP configuration into an ALL_SNMP_INFO structure.

A ALL_SNMP_INFO and the appropriate number of MBG_SNMP_V12_INFO_IDX, MBG_SNMP_V12_TRAP_INFO_IDX, MBG_SNMP_V3_INFO_IDX, and MBG_SNMP_V3_TRAP_INFO_IDX will be allocated and need to be freed later by calling free_all_snmp_info

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a pointer to ALL_SNMP_INFO
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_monitoring
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
free_all_snmp_info

◆ mbgextio_get_all_svc_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_svc_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_SERVICE_INFO **  p 
)

Read all user info and store it into a newly allocated or reused ALL_USER_INFO.

Note
mbgextio_dev_has_user_mngmnt should be called to check if this API is supported.
Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a pointer to ALL_UCAP_NET_INFO
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_service
mbgextio_save_all_svc_info
free_all_svc_info

◆ mbgextio_get_all_syslog_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_syslog_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_SYSLOG_INFO **  p 
)

Read all syslog configuration into an ALL_SYSLOG_INFO structure.

A ALL_SYSLOG_INFO will be allocated and need to be freed later by calling free_all_syslog_info

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a pointer to ALL_SYSLOG_INFO
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_monitoring
mbgextio_get_syslog_glb_info
mbgextio_get_syslog_info_idx
mbgextio_save_all_syslog_info
free_all_syslog_info

◆ mbgextio_get_all_ucap_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ucap_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_UCAP_INFO **  p 
)

Read all user capture information and store it into a newly allocated or reused ALL_UCAP_INFO.

Note
mbgextio_dev_has_ucap should be called to check if this API is supported.
Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a pointer to ALL_UCAP_INFO
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_ucap
free_all_ucap_info

◆ mbgextio_get_all_ucap_net_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ucap_net_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_UCAP_NET_INFO **  p 
)

Read all user capture network info and store it into a newly allocated or reused ALL_UCAP_NET_INFO.

Note
mbgextio_dev_has_ucap_net should be called to check if this API is supported.
Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a pointer to ALL_UCAP_NET_INFO
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_ucap_net
free_all_ucap_net_info

◆ mbgextio_get_all_user_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_user_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_USER_INFO **  p 
)

Read all user info and store it into a newly allocated or reused ALL_USER_INFO.

Note
mbgextio_dev_has_user_mngmnt should be called to check if this API is supported.
Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a pointer to ALL_UCAP_NET_INFO
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_user_mngmnt
mbgextio_save_all_user_info
free_all_user_info

◆ mbgextio_get_all_xbp_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_xbp_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_XBP_INFO **  p 
)

Read all XBP information from a device into a newly or re-allocated ALL_XBP_INFO structure.

Note
mbgextio_dev_has_xbp should be called to check if this API is supported.

The allocated ALL_XBP_INFO needs to be freed free_all_ntp_cfg_info, when it is no longer needed.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a pointer to ALL_XBP_INFO
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_xbp

◆ mbgextio_get_all_xmulti_ref_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_xmulti_ref_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_XMULTI_REF_INFO **  p 
)

Read all XMR info into a newly or re-allocated ALL_XMULTI_REF_INFO.

Note
mbgextio_dev_has_xmulti_ref should be called before using this function

A ALL_XMULTI_REF_INFO and a number of XMULTI_REF_INSTANCES::n_xmr_settings of XMULTI_REF_INFO_IDX and XMR_EXT_SRC_INFO_IDX will be allocated and need to be freed by calling free_all_xmulti_ref_info

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a pointer of ALL_XMULTI_REF_INFO
Returns
One of the MBG_RETURN_CODES
See also
free_all_xmulti_ref_info

◆ mbgextio_get_all_xmulti_ref_status()

_NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_xmulti_ref_status ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const ALL_XMULTI_REF_INFO info,
ALL_XMULTI_REF_STATUS **  p 
)

Read all XMR status info into a newly or re-allocated ALL_XMULTI_REF_STATUS.

Note
mbgextio_dev_has_xmulti_ref should be called before using this function

A ALL_XMULTI_REF_STATUS and a number of XMULTI_REF_INSTANCES::n_xmr_settings of XMULTI_REF_STATUS_IDX will be allocated and need to be freed by calling free_all_xmulti_ref_status

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]infoPointer to an ALL_XMULTI_REF_INFO list which has been read before
[out]pPointer to a pointer of ALL_XMULTI_REF_STATUS
Returns
One of the MBG_RETURN_CODES
See also
free_all_xmulti_ref_status

◆ mbgextio_get_serial_settings()

int mbgextio_get_serial_settings ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
RECEIVER_PORT_CFG p_rpcfg 
)

Read all serial port settings and supported configuration parameters.

mbgextio_setup_receiver_info should have been called before to set up a RECEIVER_INFO structure to be passed to this function, so this function can determine how many serial ports and associated structures are supported by this device.

The complementary function mbgextio_save_serial_settings should be used to write a modified port configuration back to the device.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]p_rpcfgPointer to a RECEIVER_PORT_CFG structure to be set up
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_save_serial_settings
mbgextio_get_receiver_info

◆ mbgextio_get_tlv_rcv_state()

_NO_MBG_API_ATTR MBG_TLV_RCV_STATE* _MBG_API mbgextio_get_tlv_rcv_state ( MBG_MSG_CTL pmctl)

Get control message's internal TLV state.

Parameters
[in,out]pmctlPointer to a valid message control structure
Returns
Pointer to internal MBG_TLV_RCV_STATE structure

◆ mbgextio_get_usb_dev_info()

_NO_MBG_API_ATTR MBG_USB_DEV_INFO* _MBG_API mbgextio_get_usb_dev_info ( MBG_MSG_CTL pmctl)

Get control message's internal USB device info structure.

Parameters
[in,out]pmctlPointer to a valid message control structure
Returns
Pointer to internal MBG_USB_DEV_INFO structure

◆ mbgextio_req_all_timemon_status()

_NO_MBG_API_ATTR int _MBG_API mbgextio_req_all_timemon_status ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
void *  buf,
uint16_t  num_elem,
size_t  buflen 
)

Request full timemon-status of a timemon-device.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]bufPointer to a buffer / data structure to be filled
[in]num_elemNumber of status elements
[in]buflenSize of buffer
Returns
One of the MBG_RETURN_CODES

◆ mbgextio_req_diag_file()

_NO_MBG_API_ATTR int _MBG_API mbgextio_req_diag_file ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const char *  dest_path,
MBG_TLV_UID  uid 
)

Wrapper function.

Returns
One of the MBG_RETURN_CODES

◆ mbgextio_req_file()

_NO_MBG_API_ATTR int _MBG_API mbgextio_req_file ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const char *  src_file,
const char *  dest_file,
void **  dest_buf,
size_t *  dest_buf_len,
MBG_TLV_UID  uid 
)

Request a generic file of a target.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]src_fileName of the source file
[in]dest_fileName of the destination file on target
[out]dest_bufAddress of a pointer to a buffer that will be allocated and filled
[out]dest_buf_lenAddress of a variable to take up the buffer size
[in]uidIf uid == 0, create random uid. Otherwise use given one
Returns
One of the MBG_RETURN_CODES

◆ mbgextio_req_file_with_cmd()

_NO_MBG_API_ATTR int _MBG_API mbgextio_req_file_with_cmd ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const char *  dest_path,
MBG_TLV_TYPE  tlv_feat_type,
MBG_TLV_UID  uid 
)

Request a file with a specific command from a host.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]dest_pathName of destination path to save the requested file to
[in]tlv_feat_typeOne of the MBG_TLV_FEAT_TYPES
[in]uidIf uid == 0, create random uid. Otherwise use given one
Returns
One of the MBG_RETURN_CODES

◆ mbgextio_save_all_database_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_database_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const ALL_DATABASE_INFO p 
)

Write all database configurations from an ALL_DATABASE_INFO structure.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a pointer to ALL_SYSLOG_INFO
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_database
mbgextio_get_all_database_info

◆ mbgextio_save_all_events_settings()

_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_events_settings ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const ALL_EVENTS p 
)

Write all event related configurations to a device.

The complementary function mbgextio_get_all_events should have been used to read all original event settings and supported configuration parameters.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]pPointer to a ALL_MONITORING_INFO structure with all monitoring parameters
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_monitoring
mbgextio_get_all_monitoring_info
mbgextio_save_all_snmp_info

◆ mbgextio_save_all_io_ports()

_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_io_ports ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const ALL_MBG_IO_PORTS p 
)

Write all I/O port related configuration to a device.

The complementary function mbgextio_get_all_io_ports should have been used to read the original I/O port settings and supported configuration parameters.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]pPointer to a ALL_MBG_IO_PORTS structure with all I/O port settings
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_get_all_io_ports

◆ mbgextio_save_all_monitoring_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_monitoring_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_MONITORING_INFO p 
)

Write all monitoring configuration to a device.

The complementary function mbgextio_get_all_monitoring_info should have been used to read the original monitoring settings and supported configuration parameters.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]pPointer to a ALL_MONITORING_INFO structure with all monitoring parameters
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_monitoring
mbgextio_get_all_monitoring_info
mbgextio_save_all_snmp_info

◆ mbgextio_save_all_net_cfg_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_net_cfg_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_NET_CFG_INFO p 
)

Write all network settings to a device.

The complementary function mbgextio_get_all_net_cfg_info should have been used to read the original network settings and supported configuration parameters.

Depending on the supported API (NET_CFG or LAN_IP4 or both partly), the appropriate settings are, if neccessary, translated into LAN_IP4 structures and send to the device using the appropriate API functions.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]pPointer to the ALL_NET_CFG_INFO
Returns
One of the MBG_RETURN_CODES

◆ mbgextio_save_all_ntp_cfg_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_ntp_cfg_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_NTP_CFG_INFO p 
)

Write all NTP settings to a device.

The complementary function mbgextio_get_all_ntp_cfg_info should have been used to read the original NTP settings and supported configuration parameters.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]pPointer to a ALL_NTP_CFG_INFO structure with all ntp parameters
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_set_ptp_cfg_settings
mbgextio_set_ptp_uc_master_settings_idx

◆ mbgextio_save_all_ptp_cfg_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_ptp_cfg_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const ALL_PTP_CFG_INFO p 
)

Write all PTP settings to a device.

The complementary function mbgextio_get_all_ptp_cfg_info should have been used to read the original PTP settings and supported configuration parameters.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]pPointer to a ALL_PTP_CFG_INFO structure with all ptp parameters
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_set_ptp_cfg_settings
mbgextio_set_ptp_uc_master_settings_idx

◆ mbgextio_save_all_snmp_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_snmp_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_SNMP_INFO p 
)

Write all SNMP settings to a device.

The complementary function mbgextio_get_all_snmp_info should have been used to read the original SNMP settings and supported configuration parameters.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]pPointer to a ALL_SNMP_INFO structure with all SNMP parameters
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_get_all_snmp_info
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_save_all_svc_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_svc_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const ALL_SERVICE_INFO p 
)

Write all service configuration to a device.

The complementary function mbgextio_get_all_user_info should have been used to read the original user settings and supported configuration parameters.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]pPointer to a ALL_SERVICE_INFO structure with user configuration
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_service
mbgextio_get_all_svc_info
free_all_svc_info

◆ mbgextio_save_all_syslog_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_syslog_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const ALL_SYSLOG_INFO p 
)

Write all syslog configuration from an ALL_SYSLOG_INFO structure.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]pPointer to a pointer to ALL_SYSLOG_INFO
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_monitoring
mbgextio_get_syslog_glb_info
mbgextio_get_syslog_info_idx
mbgextio_get_all_syslog_info
free_all_syslog_info

◆ mbgextio_save_all_ucap_net_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_ucap_net_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_UCAP_NET_INFO p 
)

Write all user capture network settings to a device.

The complementary function mbgextio_get_all_ucap_net_info should have been used to read the original user capture settings and supported configuration parameters.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]pPointer to the ALL_UCAP_NET_INFO
Returns
One of the MBG_RETURN_CODES

◆ mbgextio_save_all_user_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_user_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_USER_INFO p 
)

Write all user configuration to a device.

The complementary function mbgextio_get_all_user_info should have been used to read the original user settings and supported configuration parameters.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]pPointer to a ALL_USER_INFO structure with user configuration
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_dev_has_user_mngmnt
mbgextio_get_all_user_info

◆ mbgextio_save_all_xmulti_ref_info()

_NO_MBG_API_ATTR int _MBG_API mbgextio_save_all_xmulti_ref_info ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
ALL_XMULTI_REF_INFO p 
)

Set all extended multi ref settings to a device.

The complementary function mbgextio_get_all_xmulti_ref_info should have been used to read the original extended multi ref settings.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]pPointer to a ALL_XMULTI_REF_INFO structure with all settings
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_set_xmr_settings_idx

◆ mbgextio_save_serial_settings()

int mbgextio_save_serial_settings ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
RECEIVER_PORT_CFG p_rpcfg,
uint16_t  port_idx 
)

Send the configuration settings for a single serial port to a device.

The function mbgextio_get_serial_settings must have been called before to read the current settings and configuration options and fill up a RECEIVER_PORT_CFG structure.

Modifications to the serial port configuration should be made only after mbgextio_get_serial_settings had been called to read all serial port settings and supported configuration parameters. This function has finally to be called once for every serial port the configuration of which has been modified.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]p_rpcfgPointer to a RECEIVER_PORT_CFG structure containing valid data
[in]port_idxIndex of the serial port for which to save the settings
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_get_serial_settings

◆ mbgextio_tlv_to_file()

_NO_MBG_API_ATTR int _MBG_API mbgextio_tlv_to_file ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const char *  file 
)

Read TLV into a single file. See mbgextio_tlv_to_mem ::TODO.

◆ mbgextio_tlv_to_mem()

_NO_MBG_API_ATTR int _MBG_API mbgextio_tlv_to_mem ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
void **  buf 
)

Read TLV into memory.

If this function succeeds then an array of memory has been allocated using a malloc() call, and the pointer returned via the buf parameter has to be freed afterwards by the caller.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]bufAddress of a pointer to a buffer to be allocated and filled
Returns
One of the MBG_RETURN_CODES

◆ mbgextio_tlv_to_struct()

_NO_MBG_API_ATTR int _MBG_API mbgextio_tlv_to_struct ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
void *  buf,
size_t  buflen 
)

Read TLV data into a single structure.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[out]bufPointer to a buffer / data structure to be filled
[in]buflenSize of buffer
Returns
One of the MBG_RETURN_CODES

◆ mbgextio_xmt_ack()

_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_ack ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
GPS_CMD  cmd 
)

Transmit an ACK response to the sender.

A device should call this function if it has accepted a parameter set, and an acknowledgement has been requested by the sender by or'ing the GPS_CMD code with GPS_REQACK. If a parameter set has not been accepted then mbgextio_xmt_nack should be called instead.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]cmdOne of the command codes enumerated in GPS_CMD_CODES
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_xmt_nack
mbgextio_xmt_cmd

◆ mbgextio_xmt_binary_file()

_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_binary_file ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const char *  file,
const char *  dest_path,
MBG_TLV_UID  uid 
)

Wrapper function for mbgextio_xmt_file ::TODO.

Returns
One of the MBG_RETURN_CODES

◆ mbgextio_xmt_cmd_line()

_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_cmd_line ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const char *  cmd_line,
MBG_TLV_UID  uid 
)

Send a cmd line to a host.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]cmd_lineFull command line to be executed as system call on target
[in]uidIf uid == 0, create random uid. Otherwise use given one
Returns
One of the MBG_RETURN_CODES

◆ mbgextio_xmt_diag_file()

_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_diag_file ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const char *  file,
MBG_TLV_UID  uid 
)

Wrapper function for mbgextio_xmt_file ::TODO move to firmware-specific module.

Returns
One of the MBG_RETURN_CODES

◆ mbgextio_xmt_file()

_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_file ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const char *  file,
const char *  rev,
const char *  dest_path,
MBG_TLV_TYPE  tlv_feat_type,
MBG_TLV_UID  uid 
)

Send a file with a specific command to a host.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]fileName of file to be sent
[in]revName of software revision
[in]dest_pathName of destination path on target
[in]tlv_feat_typeOne of the MBG_TLV_FEAT_TYPES
[in]uidIf uid == 0 create random uid, otherwise use the specified one
Returns
One of the MBG_RETURN_CODES

◆ mbgextio_xmt_fw_rollback()

_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_fw_rollback ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
MBG_TLV_UID  uid 
)

Wrapper function for mbgextio_xmt_tlv_cmd.

Returns
One of the MBG_RETURN_CODES

◆ mbgextio_xmt_fw_update()

_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_fw_update ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const char *  file,
const char *  rev,
const char *  dest_path,
MBG_TLV_UID  uid 
)

Wrapper function for mbgextio_xmt_file ::TODO.

Returns
One of the MBG_RETURN_CODES

◆ mbgextio_xmt_nack()

_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_nack ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
GPS_CMD  cmd,
int  error 
)

Transmit a NACK response to the sender.

A device should call this function if a request has been received which is not supported, or if a data set has been received which contains invalid/unsupported data and thus is ignored. Otherwise mbgextio_xmt_ack should be called to return an acknowledge code to the sender, if requested.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]cmdOne of the command codes enumerated in GPS_CMD_CODES, including the GPS_CMD_CTRL_CODES flags
[in]errorOne of the MBG_ERROR_CODES to be returned to the caller
Returns
One of the MBG_RETURN_CODES
See also
mbgextio_xmt_ack
mbgextio_xmt_cmd

◆ mbgextio_xmt_tlv_announce()

_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_tlv_announce ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const MBG_TLV_ANNOUNCE p 
)

Send a MBG_TLV_ANNOUNCE structure to a host.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]pPointer to the data structure to be sent to the device
Returns
One of the MBG_RETURN_CODES

◆ mbgextio_xmt_tlv_blob()

_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_tlv_blob ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const void *  blob,
size_t  size,
MBG_TLV_UID  uid,
void *  user_data,
void(*)(const MBG_TLV_HDR *, void *)  func 
)

Send a file with a specific command to a host.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]blobPointer to blob to bet sent
[in]sizeBlob size in bytes
[in]uidIf uid == 0 create random uid, otherwise use the specified one
[in]user_dataCustom unique user data
[in]funcCallback function to monitor process
Returns
One of the MBG_RETURN_CODES

◆ mbgextio_xmt_tlv_buffer()

_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_tlv_buffer ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const void *  buffer,
size_t  size,
MBG_TLV_TYPE  tlv_feat_type,
MBG_TLV_UID  uid 
)

Send buffer to a host.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]bufferPointer to buffer to bet sent
[in]sizeBlob size in bytes
[in]tlv_feat_typeOne of the MBG_TLV_FEAT_TYPES
[in]uidIf uid == 0 create random uid, otherwise use the specified one
Returns
One of the MBG_RETURN_CODES

◆ mbgextio_xmt_tlv_chunk()

_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_tlv_chunk ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
const void *  buf,
size_t  buflen,
void *  user_data,
void(*)(const MBG_TLV_HDR *, void *)  func 
)

Send a buffer with variable length to a host.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]bufPointer to data to be sent to the device
[in]buflenLength / size of data
[in]user_dataCustom unique user data
[in]funcCallback function to monitor process
Returns
One of the MBG_RETURN_CODES

◆ mbgextio_xmt_tlv_cmd()

_NO_MBG_API_ATTR int _MBG_API mbgextio_xmt_tlv_cmd ( MBG_MSG_CTL pmctl,
const XBP_ADDR p_addr,
MBG_TLV_TYPE  tlv_feat_type,
MBG_TLV_UID  uid 
)

Send a tlv cmd to a host.

Parameters
[in,out]pmctlPointer to a valid message control structure
[in]p_addrPointer to an XBP address specifier, or NULL
[in]tlv_feat_typeOne of the MBG_TLV_FEAT_TYPES
[in]uidIf uid == 0, create random uid. Otherwise use given one
Returns
One of the MBG_RETURN_CODES

◆ rad_to_dms()

void rad_to_dms ( const double *  rad,
DMS dms,
const char  prefix 
)

Convert a mathematical angle [rad] to a geographic angle [degree, minute, second].

Note
This has been copied from mbggeo.c, so mbggeo.h should provide the same prototype.