summaryrefslogtreecommitdiff
path: root/mbglib/common/extiohlp.h
diff options
context:
space:
mode:
Diffstat (limited to 'mbglib/common/extiohlp.h')
-rw-r--r--mbglib/common/extiohlp.h158
1 files changed, 158 insertions, 0 deletions
diff --git a/mbglib/common/extiohlp.h b/mbglib/common/extiohlp.h
new file mode 100644
index 0000000..2f4f26f
--- /dev/null
+++ b/mbglib/common/extiohlp.h
@@ -0,0 +1,158 @@
+
+/**************************************************************************
+ *
+ * $Id: extiohlp.h 1.3.1.5.1.2 2015/01/21 13:24:47 marvin TEST $
+ *
+ * Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
+ *
+ * Description:
+ * Definitions and prototypes for extiohlp.c.
+ *
+ * -----------------------------------------------------------------------
+ * $Log: extiohlp.h $
+ * Revision 1.3.1.5.1.2 2015/01/21 13:24:47 marvin
+ * Added XBP Adress specifier to mbgextio functions.
+ * Revision 1.3.1.5.1.1 2014/10/31 12:03:34Z martin
+ * Started to support XBP addressing.
+ * Revision 1.3.1.5 2014/03/18 11:17:00 gregoire
+ * Revision 1.3.1.4 2014/03/17 14:51:50Z martin
+ * Revision 1.3.1.3 2013/12/19 09:20:12Z martin
+ * Revision 1.3.1.2 2013/12/17 14:57:49Z martin
+ * Revision 1.3.1.1 2013/09/25 11:10:56Z marvin
+ * Added function for all_ptp_cfg_info.
+ * Revision 1.3 2013/02/01 15:52:16Z martin
+ * Updated function prototypes.
+ * Revision 1.2 2012/03/09 08:35:51Z martin
+ * Updated function prototypes.
+ * Revision 1.1 2011/09/21 15:59:59 martin
+ * Initial revision.
+ *
+ **************************************************************************/
+
+#ifndef _EXTIOHLP_H
+#define _EXTIOHLP_H
+
+
+/* Other headers to be included */
+
+#include <mbgextio.h>
+
+#include <cfg_hlp.h>
+#include <mbgerror.h>
+
+
+#ifdef _EXTIOHLP
+ #define _ext
+ #define _DO_INIT
+#else
+ #define _ext extern
+#endif
+
+
+/* Start of header body */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+
+
+
+/* function prototypes: */
+
+/* ----- function prototypes begin ----- */
+
+/* This section was generated automatically */
+/* by MAKEHDR, do not remove the comments. */
+
+ /**
+ * @brief Read all serial port settings and supported configuration parameters
+ *
+ * @note The function mbgextio_setup_receiver_info() must have been called before,
+ * and the returned ::RECEIVER_INFO has to be passed to this function.
+ *
+ * The complementary function mbgextio_save_serial_settings() should
+ * be used to write a modified port configuration back to the device.
+ *
+ * @param pmctl Pointer to a valid message control structure
+ * @param p_addr Pointer to XBP address specifier
+ * @param p_cfg Pointer to a ::RECEIVER_PORT_CFG structure to be set up
+ * @param p_ri Pointer to a valid ::RECEIVER_INFO structure
+ *
+ * @return One of the @ref MBG_RETURN_CODES
+ *
+ * @see ::mbgextio_save_serial_settings
+ * @see ::mbgextio_get_receiver_info
+ */
+ int mbgextio_get_serial_settings( MBG_MSG_CTL *pmctl, XBP_ADDR *p_addr, RECEIVER_PORT_CFG *p_cfg, const RECEIVER_INFO *p_ri ) ;
+
+ /**
+ * @brief Send the configuration settings for a single serial port to a device
+ *
+ * @note The function mbgextio_setup_receiver_info() must have been called before,
+ * and the returned ::RECEIVER_INFO has to be passed to this function as well as
+ * to mbgextio_get_serial_settings() which should have been called before to read
+ * the current settings and supported features for each port.
+ *
+ * @param pmctl Pointer to a valid message control structure
+ * @param p_addr Pointer to XBP address specifier
+ * @param pcfg Pointer to a ::RECEIVER_PORT_CFG structure
+ * @param port_idx Index of the serial port to be saved
+ *
+ * @return One of the @ref MBG_RETURN_CODES
+ *
+ * @see ::mbgextio_get_serial_settings
+ * @see ::mbgextio_get_receiver_info
+ */
+ int mbgextio_save_serial_settings( MBG_MSG_CTL *pmctl, XBP_ADDR *p_addr, const RECEIVER_PORT_CFG *pcfg, uint16_t port_idx ) ;
+
+ /**
+ * @brief Read all PTP configuration in ::ALL_PTP_CFG_INFO format
+ *
+ * @note Only supported if ::GPS_HAS_PTP
+ *
+ * @param pmctl Pointer to a valid message control structure
+ * @param p_addr Pointer to XBP address specifier
+ * @param p Pointer to the data structure to return the received data
+ *
+ * @return One of the @ref MBG_RETURN_CODES
+ *
+ * @see //##++++++++++++++++++++++++++++++
+ * @see ::mbgextio_get_receiver_info
+ */
+ _NO_MBG_API_ATTR int _MBG_API mbgextio_get_all_ptp_cfg_info( MBG_MSG_CTL *pmctl, XBP_ADDR *p_addr, ALL_PTP_CFG_INFO *p ) ;
+
+ /**
+ * @brief 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.
+ */
+ void rad_to_dms( const double *rad, DMS *dms, const char prefix ) ;
+
+ /**
+ * @brief 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.
+ */
+ void lla_to_dms( POS *pos ) ;
+
+
+/* ----- function prototypes end ----- */
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/* End of header body */
+
+#undef _ext
+#undef _DO_INIT
+
+#endif /* _EXTIOHLP_H */