mbgtools-lx
4.2.8
|
#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... | |
#define _ext extern |
Definition at line 231 of file extiohlp.h.
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])
Referenced by mbgextio_get_pos().
_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.
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | type | One of MBG_TRANSACTION_TYPES |
[in] | set | Indicates, that this is a set transaction |
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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p_agi | Pointer to a ALL_GNSS_INFO to be filled |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | f | Pointer to an opened file to be sent to the device |
[in] | bytes | Number of bytes to be sent, i.e. the file size |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | type | One of MBG_TRANSACTION_TYPES |
[in] | rc | Use MBG_SUCCESS to indicate transaction has successfully been completed, use any other error code to indicate transaction has been aborted. |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a ALL_DATABASE_INFO structure to be filled up |
_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
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | info | Pointer to a ALL_MONITORING_INFO structure which has been read before |
[out] | p | Pointer to a pointer to ALL_EVENTS |
_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.
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
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a pointer to ALL_FIRMWARE_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in,out] | pp | Pointer to a pointer of ALL_GPIO_INFO structure which will be malloced |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | info | Pointer to a ALL_GPIO_INFO structure which has been read before |
[in,out] | pp | Pointer to a pointer of ALL_GPIO_STATE structure which will be malloced |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in,out] | pp | Pointer to a pointer of ALL_IMS_INFO structure which will be malloced |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | info | Pointer to a ALL_GPIO_INFO structure which has been read before |
[in,out] | pp | Pointer to a pointer of ALL_IMS_STATE structure which will be malloced |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to an address of an ALL_MBG_IO_PORTS structure to be allocated and filled up |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in,out] | pp | Pointer to a pointer of ALL_MBG_IO_PORTS structure which will be allocated |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a pointer to ALL_MONITORING_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
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a pointer to ALL_NET_CFG_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
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a pointer to ALL_NET_STATUS_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.
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
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a pointer to ALL_NTP_CFG_INFO |
_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.
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
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | info | Pointer to the appropriate info structure |
[out] | p | Pointer to a pointer to ALL_NTP_STATUS |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a ALL_PTP_CFG_INFO structure to be filled up |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a pointer of ALL_PTP_V1_COMMON_DATASETS structure to be allocated and filled |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a pointer of ALL_PTP_V2_COMMON_DATASETS structure to be allocated and filled |
_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
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a pointer to ALL_SNMP_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a pointer to ALL_UCAP_NET_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
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a pointer to ALL_SYSLOG_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a pointer to ALL_UCAP_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a pointer to ALL_UCAP_NET_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a pointer to ALL_UCAP_NET_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.
The allocated ALL_XBP_INFO needs to be freed free_all_ntp_cfg_info, when it is no longer needed.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a pointer to ALL_XBP_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.
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
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a pointer of ALL_XMULTI_REF_INFO |
_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.
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
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | info | Pointer to an ALL_XMULTI_REF_INFO list which has been read before |
[out] | p | Pointer to a pointer of ALL_XMULTI_REF_STATUS |
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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p_rpcfg | Pointer to a RECEIVER_PORT_CFG structure to be set up |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | buf | Pointer to a buffer / data structure to be filled |
[in] | num_elem | Number of status elements |
[in] | buflen | Size of buffer |
_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.
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | src_file | Name of the source file |
[in] | dest_file | Name of the destination file on target |
[out] | dest_buf | Address of a pointer to a buffer that will be allocated and filled |
[out] | dest_buf_len | Address of a variable to take up the buffer size |
[in] | uid | If uid == 0, create random uid. Otherwise use given one |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | dest_path | Name of destination path to save the requested file to |
[in] | tlv_feat_type | One of the MBG_TLV_FEAT_TYPES |
[in] | uid | If uid == 0, create random uid. Otherwise use given one |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a pointer to ALL_SYSLOG_INFO |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | p | Pointer to a ALL_MONITORING_INFO structure with all monitoring parameters |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | p | Pointer to a ALL_MBG_IO_PORTS structure with all I/O port settings |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | p | Pointer to a ALL_MONITORING_INFO structure with all monitoring parameters |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | p | Pointer to the ALL_NET_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | p | Pointer to a ALL_NTP_CFG_INFO structure with all ntp parameters |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | p | Pointer to a ALL_PTP_CFG_INFO structure with all ptp parameters |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | p | Pointer to a ALL_SNMP_INFO structure with all SNMP parameters |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | p | Pointer to a ALL_SERVICE_INFO structure with user configuration |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | p | Pointer to a pointer to ALL_SYSLOG_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | p | Pointer to the ALL_UCAP_NET_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | p | Pointer to a ALL_USER_INFO structure with user configuration |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | p | Pointer to a ALL_XMULTI_REF_INFO structure with all 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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | p_rpcfg | Pointer to a RECEIVER_PORT_CFG structure containing valid data |
[in] | port_idx | Index of the serial port for which to save the settings |
_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.
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | buf | Address of a pointer to a buffer to be allocated and filled |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[out] | buf | Pointer to a buffer / data structure to be filled |
[in] | buflen | Size of buffer |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | cmd | One of the command codes enumerated in GPS_CMD_CODES |
_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.
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | cmd_line | Full command line to be executed as system call on target |
[in] | uid | If uid == 0, create random uid. Otherwise use given one |
_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.
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | file | Name of file to be sent |
[in] | rev | Name of software revision |
[in] | dest_path | Name of destination path on target |
[in] | tlv_feat_type | One of the MBG_TLV_FEAT_TYPES |
[in] | uid | If uid == 0 create random uid, otherwise use the specified one |
_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.
_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.
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | cmd | One of the command codes enumerated in GPS_CMD_CODES, including the GPS_CMD_CTRL_CODES flags |
[in] | error | One of the MBG_ERROR_CODES to be returned to the caller |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | p | Pointer to the data structure to be sent to the device |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | blob | Pointer to blob to bet sent |
[in] | size | Blob size in bytes |
[in] | uid | If uid == 0 create random uid, otherwise use the specified one |
[in] | user_data | Custom unique user data |
[in] | func | Callback function to monitor process |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | buffer | Pointer to buffer to bet sent |
[in] | size | Blob size in bytes |
[in] | tlv_feat_type | One of the MBG_TLV_FEAT_TYPES |
[in] | uid | If uid == 0 create random uid, otherwise use the specified one |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | buf | Pointer to data to be sent to the device |
[in] | buflen | Length / size of data |
[in] | user_data | Custom unique user data |
[in] | func | Callback function to monitor process |
_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.
[in,out] | pmctl | Pointer to a valid message control structure |
[in] | p_addr | Pointer to an XBP address specifier, or NULL |
[in] | tlv_feat_type | One of the MBG_TLV_FEAT_TYPES |
[in] | uid | If uid == 0, create random uid. Otherwise use given one |