mbgtools-lx
4.2.8
|
Functions | |
void | port_settings_from_port_parm_mode (PORT_SETTINGS *p_ps, uint8_t pp_mode, int cap_str_idx) |
Convert PORT_PARM::mode to PORT_SETTINGS::mode. More... | |
void | port_parm_mode_from_port_settings (uint8_t *pp_mode, const PORT_SETTINGS *p_ps, int cap_str_idx) |
Convert a PORT_SETTINGS::mode to a legacy PORT_PARM::mode. More... | |
void | port_settings_from_port_parm (PORT_SETTINGS *p_ps, int port_idx, const PORT_PARM *p_pp, int cap_str_idx) |
Set up a PORT_SETTINGS structure from a legacy PORT_PARM structure. More... | |
void | port_parm_from_port_settings (PORT_PARM *p_pp, int port_idx, const PORT_SETTINGS *p_ps, int cap_str_idx) |
Set up a a legacy PORT_PARM structure from a PORT_SETTINGS structure. More... | |
int | setup_port_info_from_port_parm (PORT_INFO_IDX pii[], const PORT_PARM *p_pp, const RECEIVER_INFO *p_ri) |
Setup an array of PORT_INFO_IDX structures from a PORT_PARM. More... | |
void port_parm_from_port_settings | ( | PORT_PARM * | p_pp, |
int | port_idx, | ||
const PORT_SETTINGS * | p_ps, | ||
int | cap_str_idx | ||
) |
Set up a a legacy PORT_PARM structure from a PORT_SETTINGS structure.
[out] | p_pp | Pointer to a PORT_PARM structure to be updated. |
[in] | port_idx | Index number of the port settings to be converted. |
[out] | p_ps | Pointer to a PORT_SETTINGS structure to be updated. |
[in] | cap_str_idx | The capture string index number for legacy devices, which is usually 1. |
Definition at line 272 of file cfg_hlp.c.
References PORT_PARM::com, PORT_PARM::mode, PORT_SETTINGS::parm, and port_parm_mode_from_port_settings().
Referenced by mbg_save_serial_settings(), and mbg_tlv_create_id().
void port_parm_mode_from_port_settings | ( | uint8_t * | pp_mode, |
const PORT_SETTINGS * | p_ps, | ||
int | cap_str_idx | ||
) |
Convert a PORT_SETTINGS::mode to a legacy PORT_PARM::mode.
This function is used to derive a a legacy PORT_PARM::mode value from a PORT_SETTINGS structure.
[out] | pp_mode | Pointer to a PORT_PARM::mode variable to be updated. |
[in] | p_ps | Pointer to a PORT_SETTINGS structure to be evaluated. |
[in] | cap_str_idx | The capture string index number for legacy devices, which is usually 1. |
Definition at line 213 of file cfg_hlp.c.
References LGCY_STR_UCAP, LGCY_STR_UCAP_REQ, PORT_SETTINGS::mode, STR_ON_REQ, and PORT_SETTINGS::str_type.
Referenced by mbg_tlv_create_id(), and port_parm_from_port_settings().
void port_settings_from_port_parm | ( | PORT_SETTINGS * | p_ps, |
int | port_idx, | ||
const PORT_PARM * | p_pp, | ||
int | cap_str_idx | ||
) |
Set up a PORT_SETTINGS structure from a legacy PORT_PARM structure.
[out] | p_ps | Pointer to a PORT_SETTINGS structure to be updated. |
[in] | port_idx | Index number of the port settings to be converted. |
[in] | p_pp | The PORT_PARM structure to be evaluated, contains settings for 2 ports. |
[in] | cap_str_idx | The capture string index number for legacy devices, which is usually 1. |
Definition at line 245 of file cfg_hlp.c.
References PORT_PARM::com, PORT_PARM::mode, PORT_SETTINGS::parm, and port_settings_from_port_parm_mode().
Referenced by mbg_tlv_create_id(), and setup_port_info_from_port_parm().
void port_settings_from_port_parm_mode | ( | PORT_SETTINGS * | p_ps, |
uint8_t | pp_mode, | ||
int | cap_str_idx | ||
) |
Convert PORT_PARM::mode to PORT_SETTINGS::mode.
This function is used to evaluate the code from a mode field of a legacy PORT_PARM structure and set up the appropriate fields in a PORT_SETTINGS structure accordingly.
[out] | p_ps | Pointer to a PORT_SETTINGS structure to be updated. |
[in] | pp_mode | The mode code from a PORT_PARM structure, see LGCY_STR_MODES. |
[in] | cap_str_idx | The capture string index number for the case that pp_mode is a capture string mode. Usually 1 for legacy devices. |
Definition at line 170 of file cfg_hlp.c.
References LGCY_STR_UCAP, PORT_SETTINGS::mode, STR_AUTO, STR_ON_REQ, and PORT_SETTINGS::str_type.
Referenced by mbg_tlv_create_id(), and port_settings_from_port_parm().
int setup_port_info_from_port_parm | ( | PORT_INFO_IDX | pii[], |
const PORT_PARM * | p_pp, | ||
const RECEIVER_INFO * | p_ri | ||
) |
Setup an array of PORT_INFO_IDX structures from a PORT_PARM.
Some legacy GPS receivers that don't provide a RECEIVER_INFO structure also provide a PORT_PARM structure with the current serial port settings only. This function sets up an array of PORT_INFO_IDX structures with the associated settings, and fills up the remaining PORT_INFO fields with the well-known supported settings, so applications can simple deal with the current API structures.
[out] | pii | Array with p_ri->n_com_ports PORT_INFO_IDX elements to be filled up. |
[in] | p_pp | Pointer to a PORT_PARM structure providing the current COM port settings |
[in] | p_ri | Pointer to a RECEIVER_INFO structure providing the number of supported COM ports. |
Definition at line 397 of file cfg_hlp.c.
References DEFAULT_GPS_BAUD_RATES_C166, DEFAULT_GPS_FRAMINGS_C166, DEFAULT_SUPP_STR_TYPES_GPS, PORT_INFO_IDX::idx, MBG_SUCCESS, RECEIVER_INFO::n_com_ports, PORT_INFO_IDX::port_info, PORT_INFO::port_settings, port_settings_from_port_parm(), PORT_INFO::supp_baud_rates, PORT_INFO::supp_framings, and PORT_INFO::supp_str_types.
Referenced by mbg_get_serial_settings(), and mbg_tlv_create_id().