mbgtools-lx  4.2.8
gpsserio.h
Go to the documentation of this file.
1 
2 /**************************************************************************
3  *
4  * $Id: gpsserio.h 1.48.1.117 2018/06/07 14:16:28 philipp TRASH $
5  *
6  * Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
7  *
8  * Description:
9  * Definitions and prototypes for gpsserio.c.
10  *
11  * This file defines structures and codes to be used to access
12  * Meinberg GPS clocks via their serial interface COM0. COM0 should
13  * be set to a high baud rate, default is 19200.
14  *
15  * Standard Meinberg GPS serial operation is to send the Meinberg
16  * standard time string automatically once per second, once per
17  * minute, or on request per ASCII '?'.
18  *
19  * GPS parameter setup or parameter readout uses blocks of binary
20  * data which have to be isolated from the standard string. A block
21  * of data starts with a SOH code (ASCII Start Of Header, 0x01)
22  * followed by a message header with constant length and a block of
23  * data with variable length.
24  *
25  * The first field (cmd) of the message header holds the command
26  * code rsp. the type of data to be transmitted. The next field (len)
27  * gives the number of data bytes that follow the header. This number
28  * ranges from 0 to sizeof( MSG_DATA ). The third field (data_csum)
29  * holds a checksum of all data bytes and the last field of the header
30  * finally holds the checksum of the header itself.
31  *
32  * -----------------------------------------------------------------------
33  * $Log: gpsserio.h $
34  * Revision 1.48.1.117 2018/06/07 14:16:28 philipp
35  * Added database command structure
36  * Revision 1.48.1.116 2018/06/05 13:18:51 martin
37  * Doxygen fixes.
38  * Revision 1.48.1.115 2018/06/05 09:41:58 philipp
39  * Added XFeature database
40  * Revision 1.48.1.114 2018/06/01 12:25:01 martin
41  * Removed obsolete field nack_err_code from MBG_MSG_CTL.
42  * Added new field dev_has_receiver_info to MBG_MSG_CTL.
43  * Introduced an optional NACK handler callback function.
44  * Revision 1.48.1.113 2018/05/29 09:09:38 martin
45  * Merged UFU stuff from 1.48.111.1.1.
46  * Revision 1.48.1.112 2018/05/29 08:42:47 martin
47  * Unified reception of spurious async binary messages and data bytes.
48  * Revision 1.48.1.111 2018/04/03 09:56:28 thomas-b
49  * Added GPS_ANY_PUSH_CMD to enable reception of push commands
50  * until the end of the timeout.
51  * Revision 1.48.1.110 2018/03/26 08:07:06 thomas-b
52  * Added GPS commands for fw mngmnt API
53  * Revision 1.48.1.109 2018/03/15 14:29:02 thomas-b
54  * Added new GPS commands to GPS_CMD_CODES_TABLE
55  * Revision 1.48.1.108 2018/03/15 14:03:33 philipp
56  * Added syslog option to monitoring feature
57  * Revision 1.48.1.107 2018/03/08 13:34:51 philipp
58  * Added mutex to protect libssh's read/write functions
59  * Revision 1.48.1.106 2018/02/28 16:52:10 martin
60  * Doxygen fixes.
61  * Revision 1.48.1.105 2018/02/06 12:39:07 philipp
62  * Added service feature and API
63  * Revision 1.48.1.104 2018/01/31 15:18:46 daniel
64  * Added smpte_profile_tlv in msg_data
65  * Revision 1.48.1.103 2018/01/31 14:29:20 daniel
66  * Support new command/feature flags to retrieve SMPTE TLV in PTP slave state
67  * Revision 1.48.1.102 2017/11/23 10:33:00 thomas-b
68  * Removed USB_LOCK feature and appropriate structs and functions
69  * Revision 1.48.1.101 2017/11/21 13:21:06 philipp
70  * Fixed compiler error due to unknown SSH_DATA type
71  * Revision 1.48.1.100 2017/11/16 11:21:35 thomas-b
72  * Implemented SSH encryption and user authentication in binary protocol
73  * Added commands and structs for user management
74  * Revision 1.48.1.99 2017/08/02 10:30:48 philipp
75  * MBG_MSG_CTL open callback never got called
76  * Revision 1.48.1.98 2017/08/02 10:09:20 philipp
77  * Added MBG_MSG_CTL server site related functionality
78  * Revision 1.48.1.97 2017/08/02 06:55:40 philipp
79  * Added new push messages xfeature
80  * Revision 1.48.1.96 2017/07/20 06:17:18 philipp
81  * - Refactored monitoring events
82  * - Added xfeature tainted config
83  * - Removed obsolete code
84  * - Added mbglib xmt helper function
85  * Revision 1.48.1.95 2017/05/22 12:41:39 thomas-b
86  * Added command to read NTP_REFCLK_STATE_IDX
87  * Revision 1.48.1.94 2017/05/18 09:28:30 martin
88  * Doxygen fixes.
89  * Revision 1.48.1.93 2017/05/17 15:39:34 martin
90  * Doxygen fixes.
91  * Revision 1.48.1.92 2017/05/10 15:21:35 martin
92  * Tiny cleanup.
93  * Revision 1.48.1.91 2017/04/25 16:05:12 martin
94  * Fixed build under FreeBSD.
95  * Revision 1.48.1.90 2017/04/11 06:42:42 philipp
96  * Renamed MBG_USB_INTR structures to MBG_USB_LOCK
97  * Revision 1.48.1.89 2017/04/11 05:29:57 philipp
98  * Added commands, structures and defines for feature USB interrupt
99  * Revision 1.48.1.88 2017/03/27 10:38:26 thomas-b
100  * Added GPS command to read and write PTPv1 common datasets
101  * Revision 1.48.1.87 2017/03/03 06:43:48 thomas-b
102  * Removed DEBUG restriction for NTP server mode structures, added several new NTP structures
103  * Revision 1.48.1.86 2017/03/02 14:04:56 gregoire
104  * Support of new NTP structures added
105  * Revision 1.48.1.85 2017/03/02 08:34:53 gregoire
106  * New cmds for NTP strucutres added
107  * Revision 1.48.1.84 2017/02/21 15:54:55 thomas-b
108  * Added GPS commands for monitoring events and status and extended MSG_BUF
109  * Revision 1.48.1.83 2017/02/16 13:01:23 thomas-b
110  * Renamed command GPS_PTP_V2_PORT_DS to GPS_PTP_V2_PORT_DS_IDX
111  * Revision 1.48.1.82 2017/02/16 12:10:08 martin
112  * *** empty log message ***
113  * Revision 1.48.1.81 2017/02/16 08:13:22 thomas-b
114  * Added GPS commands to query and send PTPv2 common datasets
115  * Revision 1.48.1.80 2017/02/15 16:15:15 martin
116  * Renamed GNSS_SV_INFO to GNSS_SV_STATUS.
117  * Revision 1.48.1.79 2017/02/10 14:41:36 martin
118  * New extended feature MBG_XFEATURE_GNSS_SV_INFO
119  * and associated structures.
120  * Revision 1.48.1.78 2017/02/08 07:12:41 thomas-b
121  * Removed one more unnecessary GPS command for SNMP
122  * Revision 1.48.1.77 2017/02/08 07:05:37 philipp
123  * Use less GPS command codes for SNMP monitoring
124  * Revision 1.48.1.76 2017/02/06 15:42:29 philipp
125  * Added SNMP monitoring structures to MBG_MSG_CTL
126  * Revision 1.48.1.75 2017/02/06 13:09:53 philipp
127  * Added GPS monitoring commands
128  * Revision 1.48.1.74 2017/01/27 08:17:40 martin
129  * Fixed macro syntax.
130  * Revision 1.48.1.73 2016/11/22 10:33:16 philipp
131  * Implemented I/O ports
132  * Revision 1.48.1.72 2016/11/15 15:43:57 martin
133  * Account for modified mbgserio functions.
134  * Revision 1.48.1.71 2016/10/27 07:59:33 martin
135  * *** empty log message ***
136  * Revision 1.48.1.70 2016/10/25 07:48:28 martin
137  * Doxygen fixes.
138  * Revision 1.48.1.69 2016/10/14 08:18:52 thomas-b
139  * Decreased poll timeout
140  * Revision 1.48.1.68 2016/10/10 10:17:52 thomas-b
141  * Added new commands for MBG_XFEATURE_UCAP_NETWORK
142  * Revision 1.48.1.67 2016/09/30 05:36:43 thomas-b
143  * Decreased socket poll timeout
144  * Revision 1.48.1.66 2016/09/29 07:22:10 thomas-b
145  * Improved comments for new commands
146  * Revision 1.48.1.65 2016/09/28 13:44:08 thomas-b
147  * Added commands and structures for MBG_NET_CFG_API stage 2
148  * Revision 1.48.1.64 2016/08/23 09:18:33 udo
149  * changed Time Mon Inst Info structure for both read/write
150  * Revision 1.48.1.63 2016/08/16 12:48:30 gregoire.diehl
151  * Fixed default build.
152  * Revision 1.48.1.62 2016/08/15 09:30:55 udo
153  * added TIME_MON_TARGET_EXT_DATA_SET
154  * Revision 1.48.1.61 2016/08/11 11:30:43 martin
155  * Conditionally support time monitoring API.
156  * Revision 1.48.1.60 2016/08/11 10:25:37 martin
157  * Started to support time_mon.
158  * Revision 1.48.1.59 2016/08/09 07:10:07 martin
159  * *** empty log message ***
160  * Revision 1.48.1.58 2016/08/04 14:51:25 martin
161  * Moved some compatibility definitions from gpsserio.h to mbg_tgt.h.
162  * Revision 1.48.1.57 2016/07/07 14:22:05 martin
163  * *** empty log message ***
164  * Revision 1.48.1.56 2016/07/07 13:08:44 andre.hartmann
165  * added support for mbg_clock_res_info
166  * Revision 1.48.1.55 2016/06/29 11:59:11Z philipp
167  * Extended socket API by TCP client
168  * Revision 1.48.1.54 2016/06/13 15:02:13 andre
169  * Revision 1.48.1.53 2016/06/02 10:15:38Z philipp
170  * Renaming all MBG_EXT_REV_INFO related stuff to MBG_EXT_SYS_INFO.
171  * Revision 1.48.1.52 2016/05/18 07:35:05 andre
172  * added command for XMR_METRICS_IDX
173  * Revision 1.48.1.51 2016/04/25 14:45:21Z martin
174  * Moved TLV, transaction, and boot stuff from _PRELIMINARY_CODE
175  * to standard section.
176  * Revision 1.48.1.50 2016/04/20 09:26:10 philipp
177  * Moved all HPS-PTP related structures to gpspriv.h and removed related extended feature bit from gpsdefs.h.
178  * Also removed functions from mbgextio and xdevfeat since HPS-PTP handling needs a redesign concerning structures.
179  * Thus, handle everything explicitly for now!
180  * -> Redesing this A.S.A.P.!!!
181  * Revision 1.48.1.49 2016/04/07 13:50:08 martin
182  * New command GPS_EXT_REV_INFO.
183  * Revision 1.48.1.48 2016/03/24 14:08:49 martin
184  * *** empty log message ***
185  * Revision 1.48.1.47 2016/03/24 09:16:19 martin
186  * Reworked device power control definitions.
187  * Revision 1.48.1.46 2016/03/23 13:45:47 thomas-b
188  * Fixed check for buffer overflow and return appropriate rc
189  * Revision 1.48.1.45 2016/03/21 13:27:32 martin
190  * *** empty log message ***
191  * Revision 1.48.1.44 2016/03/16 16:07:03 martin
192  * *** empty log message ***
193  * Revision 1.48.1.43 2016/03/15 14:55:07 martin
194  * Modified LNE and LED API.
195  * Revision 1.48.1.42 2016/03/11 10:16:38 thomas-b
196  * Added function chk_hdr_rcvd
197  * Revision 1.48.1.41 2016/03/01 09:18:57 udo
198  * added LNE_PWR_STATE
199  * Revision 1.48.1.40 2016/02/22 08:51:51 udo
200  * added LNE_INFO_EXT
201  * Revision 1.48.1.39 2016/02/18 11:26:21 udo
202  * added MBG_LNE_LED_STATUS to data types of binary protocol
203  * Revision 1.48.1.38 2016/02/18 08:58:45 udo
204  * added LNE_LED_STATE in GPS_CMD_CODES
205  * Revision 1.48.1.37 2016/02/17 14:35:22 udo
206  * used MBG_TIME_MON_TARGET_STATUS_IDX
207  * Revision 1.48.1.36 2016/02/11 09:57:41 paul
208  * withdraw rename in MSG_DATA
209  * updated comment
210  * Revision 1.48.1.35 2016/02/09 13:21:20Z paul
211  * renamd GPS_FDM_SET_PLT to GPS_FDM_SET_TD
212  * changed NANO_TIME_64 field to int32_t in MSG_DATA union
213  * Revision 1.48.1.34 2016/02/08 10:59:45Z martin
214  * *** empty log message ***
215  * Revision 1.48.1.33 2016/02/08 10:43:56 martin
216  * Added command GPS_FDM_SET_PLT.
217  * Revision 1.48.1.32 2016/01/19 14:12:29 udo
218  * improve time monitor structures
219  * Revision 1.48.1.31 2016/01/18 08:42:44 udo
220  * added support for PTP Time Monitoring on TSU/HPS100
221  * Revision 1.48.1.30 2016/01/15 08:54:41 martin
222  * *** empty log message ***
223  * Revision 1.48.1.29 2016/01/14 08:35:48 martin
224  * *** empty log message ***
225  * Revision 1.48.1.28 2016/01/14 08:28:53 martin
226  * Fixed a typo.
227  * Revision 1.48.1.27 2016/01/13 15:09:19 martin
228  * Support XMR_STATS.
229  * Revision 1.48.1.26 2015/12/10 16:30:15 martin
230  * *** empty log message ***
231  * Revision 1.48.1.25 2015/12/10 11:52:10 martin
232  * *** empty log message ***
233  * Revision 1.48.1.24 2015/12/01 11:54:26 martin
234  * Support TLV features.
235  * Revision 1.48.1.23 2015/11/30 16:51:03 martin
236  * New command GPS_SAVE_CFG.
237  * Revision 1.48.1.22 2015/11/26 09:57:32 martin
238  * *** empty log message ***
239  * Revision 1.48.1.21 2015/11/25 16:56:01 martin
240  * Started to implement extended features.
241  * Merged Philipp's changes from the 1.48.1.19.1.x branch.
242  * Revision 1.48.1.20 2015/10/09 11:09:16 martin
243  * *** empty log message ***
244  * Revision 1.48.1.19 2015/10/06 14:11:23 martin
245  * Account for library module chk_tstr renamed to mbg_tstr.
246  * Revision 1.48.1.18 2015/10/01 07:34:34 martin
247  * Fixed a typo.
248  * Revision 1.48.1.17 2015/09/24 13:31:01 philipp
249  * Removed duplicate GPS_GET_DIAG_FILE command
250  * Revision 1.48.1.16 2015/09/24 13:12:54 philipp
251  * Changed naming to be more common
252  * Revision 1.48.1.15 2015/09/23 12:34:07 daniel
253  * Added two new HPS commands for reboot and diag file
254  * Revision 1.48.1.14 2015/09/15 13:25:58 martin
255  * *** empty log message ***
256  * Revision 1.48.1.13 2015/09/14 07:51:40 werner
257  * Revision 1.48.1.12 2015/09/14 07:48:32Z martin
258  * *** empty log message ***
259  * Revision 1.48.1.11 2015/09/14 07:22:26 martin
260  * *** empty log message ***
261  * Revision 1.48.1.10 2015/09/11 12:04:51 martin
262  * *** empty log message ***
263  * Revision 1.48.1.9 2015/09/10 12:49:11 martin
264  * New code GPS_FDM_FREQ.
265  * Revision 1.48.1.8 2015/09/10 07:42:37 daniel
266  * Added preliminary commands GPS_BEGIN_TRANSACTION, GPS_END_TRANSACTION
267  * Revision 1.48.1.7 2015/09/08 14:22:44 martin
268  * Revision 1.48.1.6 2015/09/08 12:13:46 martin
269  * Revision 1.48.1.5 2015/09/07 08:33:03 philipp
270  * Added GPS commands GPS_GET_DIAG_FILE and GPS_DO_FW_UPDATE to _PRELIMINARY_CODE section
271  * Revision 1.48.1.4 2015/09/04 09:19:49 daniel
272  * Added GPS_REFCLOCK_STATE and GPS_TSU_VERSION to _PREMININARY_CODE
273  * Revision 1.48.1.3 2015/09/02 16:42:20 martin
274  * Preliminary code which is only included if a preprocessor symbol
275  * _PRELIMINARY_CODE is defined in the project Makefile.
276  * Revision 1.48.1.2 2015/08/20 14:50:39 martin
277  * Account for renamed symbol in a different module.
278  * Revision 1.48.1.1 2015/07/24 11:07:39 martin
279  * Revision 1.48 2015/07/06 15:23:51 martin
280  * Updated function prototypes.
281  * Revision 1.47 2015/05/13 13:52:57 martin
282  * Support XBP addressing.
283  * Fixed misspelled MBG_XFER_MODE_ENCRYPTED.
284  * Renamed some GPS cmd codes to more intuitive names.
285  * Added GPS cmd CMD codes for FDM.
286  * New cmd code GPS_XMR_EXT_SRC_INFO_IDX.
287  * Removed trailing whitespace.
288  * Updated doxygen-style comments.
289  * Updated function prototypes.
290  * Revision 1.46 2014/07/17 09:47:21 martin
291  * New command codes GPS_GPIO_STATUS_IDX
292  * and GPS_XMR_HOLDOVER_STATUS.
293  * Updated doxygen comments.
294  * Revision 1.45 2014/05/27 08:58:47 martin
295  * Defined a some new command codes and added
296  * associated fields to MSG_DATA union.
297  * Introduced MBG_SOCK_FD type.
298  * Use new preprocessor symbol MBG_TGT_POSIX.
299  * Support new libusb.
300  * Conditional FTDI serial interface support.
301  * Account for definitions renamed elsewhere.
302  * Simplified declaration of code/name tables.
303  * Conditionally use new CHK_TSTR_FNC type.
304  * Huge rework of comments in doxygen format.
305  * Revision 1.44 2013/04/04 09:03:29Z martin
306  * Support HaveQuick configuration.
307  * Revision 1.43 2013/01/30 16:07:49 martin
308  * Changed definition of transfer status codes to an enum
309  * with appropriate comments.
310  * Added union TZCODE_UNION.
311  * Fixed some doxygen comments.
312  * Revision 1.42 2013/01/16 11:48:36Z martin
313  * Support IMS and XMR_HOLDOVER_INTV.
314  * Revision 1.41 2012/10/30 16:25:15 martin
315  * Added GPS_WILDCARD cmd code.
316  * Account for changed chk_tstr_func return code.
317  * Added completion codes TR_COMPLETE_TSTR and TR_RCVD_NACK.
318  * Revision 1.40 2012/04/11 16:03:29 martin
319  * Fixed some doxygen stuff.
320  * Revision 1.39 2012/03/08 15:34:18Z martin
321  * Added default setting for _USE_USB_IO.
322  * Revision 1.38 2012/03/06 15:33:43 martin
323  * Added support for SCU and LNO.
324  * Account for modified chk_tstr() parameters.
325  * Revision 1.37 2011/11/25 14:59:17Z martin
326  * Account for some renamed evt_log library symbols.
327  * Revision 1.36 2011/11/25 10:37:10 martin
328  * Added commands and data structures to support log events.
329  * Revision 1.35 2011/07/29 09:46:54 daniel
330  * Use native alignment only.
331  * Added command code GPS_XMR_INSTANCES.
332  * Support GPIO configuration.
333  * Support for USB.
334  * Revision 1.34 2011/04/15 13:12:02 martin
335  * Added initializer for command name table.
336  * Unified mutex stuff using macros from mbgmutex.h.
337  * Revision 1.33 2010/09/07 07:18:08 daniel
338  * New codes and structures for multi GNSS support.
339  * Defines to support reading raw IRIG data.
340  * Revision 1.32 2009/08/26 09:02:21 daniel
341  * Added new commands GPS_NAV_ENG_SETTINGS and
342  * GPS_GLNS_ALM.
343  * Revision 1.31 2009/08/24 13:32:33Z martin
344  * Renamed symbol MBGEXTIO_TIMEOUT_SOCKET to MBGEXTIO_RCV_TIMEOUT_SOCKET.
345  * Support new timeout handling distinguishing between character timeout
346  * and message timeout. Timeout values are now expected in milliseconds.
347  * Revision 1.30 2009/07/02 09:19:31 martin
348  * Moved definitions related to LAN interface configuration to gpsdefs.h.
349  * Revision 1.29 2009/03/10 17:00:29 martin
350  * Support configurable time scales.
351  * Don't pack structure MBG_MSG_CTL but use default alignment.
352  * Revision 1.28 2008/09/04 12:47:10Z martin
353  * Moved generic serial I/O stuff to mbgserio.h.
354  * Preliminarily support chk_tstr.
355  * Revision 1.27 2008/04/07 10:49:13Z martin
356  * Added cmd GPS_CLR_UCAP_BUFF.
357  * Revision 1.26 2007/02/27 09:51:45 martin
358  * Modified mutex macros for Windows.
359  * Added type TZCODE which is used by the binary protocol but
360  * has a different size than PCPS_TZCODE.
361  * Now _USE_PCPSDEFS by default for non-firmware apps.
362  * Fixed comments on GPS_OPT_SETTINGS and GPS_OPT_INFO.
363  * Revision 1.25 2007/02/06 16:31:04Z martin
364  * Modified comment for PZF_PCPS_TIME which can now also
365  * be sent to a device.
366  * Added mutex support.
367  * Added SVNO to the buffer union.
368  * Added support for OPT_SETTINGS.
369  * Added XMULTI_REF_... definitions.
370  * Modified some comments.
371  * Revision 1.24 2006/12/21 10:54:14Z martin
372  * Moved macro _IS_MBG_FIRMWARE to words.h.
373  * Cleaned up definitions of default I/O macros.
374  * Revision 1.23 2006/12/12 15:53:58 martin
375  * Added structure LAN_IF_INFO and associated codes.
376  * Added cmd codes GPS_IRIG_RX_SETTINGS and GPS_IRIG_RX_INFO.
377  * Added new member irig_rx_info to union MSG_DATA.
378  * Added cmd code GPS_REF_OFFS and associated definitions.
379  * Added cmd code GPS_DEBUG_STATUS.
380  * Define MBG_HANDLE for DOS even without v24tools.
381  * Revision 1.22 2006/11/02 08:57:56 martin
382  * Added a typedef to avoid firmware build errors.
383  * Revision 1.21 2006/10/25 12:25:35Z martin
384  * Support serial I/O under Windows.
385  * Removed obsolete definitions.
386  * Updated function prototypes.
387  * Revision 1.20 2006/08/24 13:00:08Z martin
388  * Added conditional support for network socket I/O and encrypted packets.
389  * Serial I/O is now also conditional only.
390  * Added/renamed/redefined structures as required.
391  * Revision 1.19 2006/06/15 10:39:49Z martin
392  * Added some special types to the MSG_DATA union which have
393  * previously been defined as generic uint16_t types.
394  * Removed MBG_OPT_SETTINGS and MBG_OPT_INFO from
395  * the MSG_DATA union since those types are not used with
396  * the binary protocol.
397  * Revision 1.18 2006/05/18 09:43:35Z martin
398  * New cmd code GPS_IGNORE_LOCK.
399  * Added command codes for PZF receivers.
400  * Renamed IRIG_... symbols to IRIG_TX_... in order to distinguish
401  * from IRIG input configuration which might be available in the future.
402  * Added some fields to the MSG_DATA union.
403  * Renamed MSG_BUFF field "data" to "msg_data" in order to avoid
404  * conflict with reserved word in some environments.
405  * Rewrote inclusion control macros.
406  * Replace control of inclusion of function prototypes by new symbol
407  * _USE_GPSSERIO_FNC which can be fully overridden.
408  * Updated lots of comments.
409  * Revision 1.17 2005/09/08 14:47:05Z martin
410  * Changed type of MSG_RCV_CTL::flags from int to ulong
411  * to avoid compiler warnings.
412  * Revision 1.16 2005/04/26 10:53:53Z martin
413  * Updated function prototypes.
414  * Revision 1.15 2004/12/28 11:02:20Z martin
415  * Redefined interface data types using C99 fixed-size definitions.
416  * Replaced received_header by flags in MSG_RCV_CTL.
417  * Defined flag bits and corresponding bit masks.
418  * Updated function prototypes.
419  * Revision 1.14 2004/07/08 08:28:30 martin
420  * New cmd code GPS_RCV_TIMEOUT which is only supported if
421  * feature mask GPS_HAS_RCV_TIMEOUT is set.
422  * Revision 1.13 2004/06/16 14:13:50 martin
423  * Changed name of symbol which controls inclusion of function prototypes.
424  * Don't include function prototypes by default if compiling firmware.
425  * Conditionally support private data structures, automatically include
426  * those definitions if compiling firmware.
427  * The data portion of MSG_BUFF is now a union whose maximum size
428  * can be overridden by a preprocessor value.
429  * Added MBG_OPT_SETTINGS and MBG_OPT_INFO to the buffer union.
430  * Updated function prototypes.
431  * Revision 1.12 2004/04/16 09:16:00Z andre
432  * Added command code GPS_MULTI_REF_STATUS.
433  * Revision 1.11 2004/03/26 11:08:28Z martin
434  * Compile function prototypes conditionally only.
435  * if symbol _INCL_GPSSERIO_FNC is defined.
436  * New structure MSG_RCV_CTL to support binary
437  * protocol on several ports.
438  * Added support for IPv4 LAN interface configuration.
439  * Support MULTI_REF_SETTINGS/MULTI_REF_INFO.
440  * Added command code to query ROM checksum.
441  * Modified some comments.
442  * Updated function prototypes.
443  * Revision 1.10 2002/08/21 07:39:32Z werner
444  * POUT_PROG -> POUT_INFO
445  * Revision 1.9 2002/01/29 15:29:16Z MARTIN
446  * Renamed cmd code GPS_IRIG_CFG to GPS_IRIG_SETTINGS.
447  * Added new cmd codes GPS_RECEIVER_INFO...GPS_IRIG_INFO
448  * and updated msg buffer union with corresponding fields.
449  * Removed obsolete types OPT_FEATURES, IRIG_CFG and
450  * associated definitions.
451  * Modified some comments.
452  * Revision 1.8 2001/04/06 11:51:24 Andre
453  * transfercodes and structures for IRIG parameter and installed
454  * options added
455  * Revision 1.7 2001/03/30 10:47:04Z MARTIN
456  * New file header.
457  * Control alignment of structures from new file use_pack.h.
458  * Modified syntax and some comments.
459  *
460  **************************************************************************/
461 
462 #ifndef _GPSSERIO_H
463 #define _GPSSERIO_H
464 
465 
466 /* Other headers to be included */
467 
468 #include <gpsdefs.h>
469 #include <use_pack.h>
470 
471 
472 /*
473  * The following macros control parts of the build process.
474  * The default values are suitable for most cases but can be
475  * overridden by global definitions, if required.
476  */
477 
478 #if !_IS_MBG_FIRMWARE
479  #include <xdevfeat.h>
480 #else
481  // This handle type in not used by the firmware.
482  // However, we define it to avoid build errors.
483  typedef int MBG_HANDLE;
484 #endif
485 
486 
487 #ifndef _USE_MUTEX
488  #if defined( MBG_TGT_WIN32 )
489  #define _USE_MUTEX 1
490  #elif defined( MBG_TGT_POSIX )
491  #define _USE_MUTEX 1
492  #endif
493 #endif
494 
495 #ifndef _USE_MUTEX
496  #define _USE_MUTEX 0 // not used by default
497 #endif
498 
499 
500 /* Control whether network socket communication shall be supported */
501 #ifndef _USE_SOCKET_IO
502  #define _USE_SOCKET_IO 0 // not supported by default
503 #endif
504 
505 /* Control whether serial port communication shall be supported */
506 #ifndef _USE_SERIAL_IO
507  #if _IS_MBG_FIRMWARE
508  #define _USE_SERIAL_IO 0 // firmware provides its own serial I/O functions
509  #else
510  #define _USE_SERIAL_IO 1 // supported by default
511  #endif
512 #endif
513 
514 #ifndef _USE_SERIAL_IO_FTDI
515  // FTDI D2xx USB-To-Serial converters accessed via a proprietary DLL
516  #define _USE_SERIAL_IO_FTDI 0 // not supported by default
517 #endif
518 
519 /* Control whether USB communication shall be supported */
520 #if defined( MBG_TGT_LINUX )
521  #ifndef _USE_USB_IO // may be overridden by project settings
522  #define _USE_USB_IO 0 // not supported by default
523  #endif
524 #else
525  // USB I/O requires libusb and is currently only supported under Linux.
526  // So for non-Linux targets force _USE_USB_IO to 0.
527  #define _USE_USB_IO 0 // not supported by default
528 #endif
529 
530 /*
531  * Control whether direct USB I/O communication is supported
532  * for example via "/dev/mbgims" in case there is an appropriate
533  * channel to do so.
534  */
535 #if defined( MBG_TGT_LINUX )
536  #ifndef _USE_USB_DIRECT_IO
537  #define _USE_USB_DIRECT_IO 0 // Not supported by default
538  #endif
539 #else
540  // Not supported by other platforms
541  #define _USE_USB_DIRECT_IO 0 // Not supported by default
542 #endif
543 
544 
545 #ifndef _HAS_SSH_DATA
546  #define _HAS_SSH_DATA 0
547 #endif
548 
549 
550 /* Control inclusion of secudefs.h */
551 #if _USE_SOCKET_IO
552  // Network socket I/O always requires secudefs, so make sure
553  // this is defined correctly.
554  #undef _USE_ENCRYPTION
555  #define _USE_ENCRYPTION 1
556 
557  #if _USE_SSH_ENCRYPTION
558  #include <libssh/libssh.h>
559  #include <mbgmutex.h>
560 
561  #undef _HAS_SSH_DATA
562  #define _HAS_SSH_DATA 1
563 
564  typedef struct ssh_data
565  {
566  ssh_session session;
567  ssh_channel channel;
568 
569  /*
570  * libssh does not support multi-threading as a session cannot be shared
571  * between threads. Unfortunately, we are desperately in need to get this
572  * running: Think of push messages and the "regular" binary protocol
573  * event loop (write vs. read at the same time).
574  */
575  MBG_MUTEX mutex;
576 
577  int (*key_prompt)(struct ssh_data*, int );
578  int (*login_prompt)(struct ssh_data*, int );
579 
580  void *priv_data;
581 
582  } SSH_DATA;
583  #endif
584 
585 #else
586  // If no socket I/O is used then secudefs aren't required, either.
587  #ifndef _USE_ENCRYPTION
588  #define _USE_ENCRYPTION 0
589  #endif
590 #endif
591 
592 #if !_HAS_SSH_DATA
593  /* Need dummy for function prototypes in header files that use SSH_DATA* */
594  typedef int SSH_DATA;
595 #endif
596 
597 /* Control inclusion of pcpsdefs.h */
598 #ifndef _USE_PCPSDEFS
599  #if _IS_MBG_FIRMWARE
600  // for firmware depend on the target system
601  #if defined( _CC51 )
602  #define _USE_PCPSDEFS 1
603  #else
604  #define _USE_PCPSDEFS 0
605  #endif
606  #else
607  // otherwise include it by default
608  #define _USE_PCPSDEFS 1
609  #endif
610 #endif
611 
612 /* Control inclusion of time_mon.h */
613 #ifndef _USE_TIME_MON
614  #define _USE_TIME_MON 0
615 #endif
616 
617 /* Control inclusion of non-public declarations */
618 #ifndef _USE_GPSPRIV
619  /* by default do include if building a GPS firmware */
620  #define _USE_GPSPRIV _IS_MBG_FIRMWARE
621 #endif
622 
623 /* Control inclusion of function prototypes */
624 #ifndef _USE_GPSSERIO_FNC
625  /* by default don't include if building a firmware */
626  #define _USE_GPSSERIO_FNC ( !_IS_MBG_FIRMWARE )
627 #endif
628 
629 #ifndef _USE_RCV_TSTAMP
630  #define _USE_RCV_TSTAMP ( !_IS_MBG_FIRMWARE )
631 #endif
632 
633 
634 #if _USE_MUTEX
635  #include <mbgmutex.h>
636 #endif
637 
638 #if _USE_SERIAL_IO
639  #include <mbgserio.h>
640 #endif
641 
642 #if _USE_SERIAL_IO_FTDI
643  #include <ftd2xx.h> // interface for ftd2xx.dll
644 #else
645  // just to avoid build errors if FTDI API is not supported
646  #define FT_STATUS int
647 #endif
648 
649 #if _USE_USB_IO
650  #include <mbgusbio.h>
651 #endif
652 
653 #if _USE_SOCKET_IO
654  #if defined( MBG_TGT_POSIX )
655  #include <netinet/in.h>
656  #endif
657 #endif
658 
659 #if _USE_ENCRYPTION
660  #include <secudefs.h>
661  #include <aes128.h>
662 #endif
663 
664 #if _USE_PCPSDEFS
665  #include <pcpsdefs.h>
666 #endif
667 
668 #if _USE_TIME_MON && defined( _PRELIMINARY_CODE )
669  #include <time_mon.h>
670 #else // dummy declarations to avoid compiler errors with function prototypes
671  typedef int MBG_TIME_MON_LIMITS;
681 #endif
682 
683 #if _USE_GPSPRIV
684  #include <gpspriv.h>
685 #endif
686 
687 #if _USE_RCV_TSTAMP || defined( _DEBUG_MSG_TIMING )
688  #include <mbg_tmo.h>
689 #endif
690 
691 
692 #ifdef _GPSSERIO
693  #define _ext
694 #else
695  #define _ext extern
696 #endif
697 
698 
699 /* Start of header body */
700 
701 // We don't use pragma pack() here but native alignment.
702 
703 #ifdef __cplusplus
704 extern "C" {
705 #endif
706 
707 
712 {
716  TR_TIMEOUT = -1,
717  TR_CSUM_HDR = -2,
720  TR_OPEN_ERR = -5,
721  TR_IO_ERR = -6,
722  TR_AUTH_ERR = -7,
725 };
726 
727 
728 
732 #define START_OF_HEADER 0x01
733 
734 
739 {
740  GPS_REQACK = 0x8000,
741  GPS_ACK = 0x4000,
742  GPS_NACK = 0x2000,
743 };
744 
745 #define GPS_CTRL_MSK 0xF000
746 
747 
754 #define GPS_WILDCARD ( (GPS_CMD) -1 )
755 
762 #define GPS_ANY_PUSH_CMD ( (GPS_CMD) -2 )
763 
764 
792 { /* system data */
793  GPS_AUTO_ON = 0x000,
981 
982  /* GPS data */
983  GPS_CFGH = 0x100,
989 
990  /* Glonass data */
991  GPS_GLNS_ALM = 0x200,
994  // Warning:
995  // The next numbers in range 0x200 are reserved
996 
997  /* Misc data */
1001 
1002 
1003  /* misc data (SCU) */
1004  GPS_SCU_STAT = 0x820,
1005 
1009 
1010  GPS_SECU_INFO = 0x900,
1013 
1014  /* PZF data */
1015  PZF_PCPS_TIME = 0xA00,
1019 
1020 #if defined( _PRELIMINARY_CODE )
1021  // Temp. test codes, not for release!!!
1022  // Code still need to be added to GPS_CMD_CODES_TABLE
1023  // *Don't* make these codes #if _USE_TIME_MON only!!
1028 #endif // defined( _PRELIMINARY_CODE )
1029 
1030 
1031 };
1032 
1033 
1034 #if !defined( MBG_TGT_DOS )
1035 
1044 #define GPS_CMD_CODES_TABLE \
1045 { \
1046  _mbg_cn_table_entry( GPS_WILDCARD ), \
1047  _mbg_cn_table_entry( GPS_AUTO_ON ), \
1048  _mbg_cn_table_entry( GPS_AUTO_OFF ), \
1049  _mbg_cn_table_entry( GPS_SW_REV ), \
1050  _mbg_cn_table_entry( GPS_BVAR_STAT ), \
1051  _mbg_cn_table_entry( GPS_TIME ), \
1052  _mbg_cn_table_entry( GPS_POS_XYZ ), \
1053  _mbg_cn_table_entry( GPS_POS_LLA ), \
1054  _mbg_cn_table_entry( GPS_TZDL ), \
1055  _mbg_cn_table_entry( GPS_PORT_PARM ), \
1056  _mbg_cn_table_entry( GPS_SYNTH ), \
1057  _mbg_cn_table_entry( GPS_ANT_INFO ), \
1058  _mbg_cn_table_entry( GPS_UCAP ), \
1059  _mbg_cn_table_entry( GPS_ENABLE_FLAGS ), \
1060  _mbg_cn_table_entry( GPS_STAT_INFO ), \
1061  _mbg_cn_table_entry( GPS_SWITCH_PARMS ), \
1062  _mbg_cn_table_entry( GPS_STRING_PARMS ), \
1063  _mbg_cn_table_entry( GPS_ANT_CABLE_LENGTH ), \
1064  _mbg_cn_table_entry( GPS_SYNC_OUTAGE_DELAY ), \
1065  _mbg_cn_table_entry( GPS_PULSE_INFO ), \
1066  _mbg_cn_table_entry( GPS_OPT_FEATURES ), \
1067  _mbg_cn_table_entry( GPS_IRIG_TX_SETTINGS ), \
1068  _mbg_cn_table_entry( GPS_RECEIVER_INFO ), \
1069  _mbg_cn_table_entry( GPS_STR_TYPE_INFO_IDX ), \
1070  _mbg_cn_table_entry( GPS_PORT_INFO_IDX ), \
1071  _mbg_cn_table_entry( GPS_PORT_SETTINGS_IDX ), \
1072  _mbg_cn_table_entry( GPS_POUT_INFO_IDX ), \
1073  _mbg_cn_table_entry( GPS_POUT_SETTINGS_IDX ), \
1074  _mbg_cn_table_entry( GPS_IRIG_TX_INFO ), \
1075  _mbg_cn_table_entry( GPS_MULTI_REF_SETTINGS ), \
1076  _mbg_cn_table_entry( GPS_MULTI_REF_INFO ), \
1077  _mbg_cn_table_entry( GPS_ROM_CSUM ), \
1078  _mbg_cn_table_entry( GPS_MULTI_REF_STATUS ), \
1079  _mbg_cn_table_entry( GPS_RCV_TIMEOUT ), \
1080  _mbg_cn_table_entry( GPS_IGNORE_LOCK ), \
1081  _mbg_cn_table_entry( GPS_IRIG_RX_SETTINGS ), \
1082  _mbg_cn_table_entry( GPS_IRIG_RX_INFO ), \
1083  _mbg_cn_table_entry( GPS_REF_OFFS ), \
1084  _mbg_cn_table_entry( GPS_DEBUG_STATUS ), \
1085  _mbg_cn_table_entry( GPS_XMR_SETTINGS_IDX ), \
1086  _mbg_cn_table_entry( GPS_XMR_INFO_IDX ), \
1087  _mbg_cn_table_entry( GPS_XMR_STATUS_IDX ), \
1088  _mbg_cn_table_entry( GPS_OPT_SETTINGS ), \
1089  _mbg_cn_table_entry( GPS_OPT_INFO ), \
1090  _mbg_cn_table_entry( GPS_CLR_UCAP_BUFF ), \
1091  _mbg_cn_table_entry( GPS_TIME_SCALE ), \
1092  _mbg_cn_table_entry( GPS_NAV_ENG_SETTINGS ), \
1093  _mbg_cn_table_entry( GPS_RAW_IRIG_DATA ), \
1094  _mbg_cn_table_entry( GPS_GPIO_CFG_LIMITS ), \
1095  _mbg_cn_table_entry( GPS_GPIO_INFO_IDX ), \
1096  _mbg_cn_table_entry( GPS_GPIO_SETTINGS_IDX ), \
1097  _mbg_cn_table_entry( GPS_XMR_INSTANCES ), \
1098  _mbg_cn_table_entry( GPS_CLR_EVT_LOG ), \
1099  _mbg_cn_table_entry( GPS_NUM_EVT_LOG_ENTRIES ), \
1100  _mbg_cn_table_entry( GPS_FIRST_EVT_LOG_ENTRY ), \
1101  _mbg_cn_table_entry( GPS_NEXT_EVT_LOG_ENTRY ), \
1102  _mbg_cn_table_entry( GPS_LNO_STATUS ), \
1103  _mbg_cn_table_entry( GPS_IMS_STATE ), \
1104  _mbg_cn_table_entry( GPS_IMS_SENSOR_STATE_IDX ), \
1105  _mbg_cn_table_entry( GPS_XMR_HOLDOVER_INTV ), \
1106  _mbg_cn_table_entry( GPS_HAVEQUICK_RX_SETTINGS ), \
1107  _mbg_cn_table_entry( GPS_HAVEQUICK_RX_INFO ), \
1108  _mbg_cn_table_entry( GPS_HAVEQUICK_TX_SETTINGS ), \
1109  _mbg_cn_table_entry( GPS_HAVEQUICK_TX_INFO ), \
1110  _mbg_cn_table_entry( GPS_PTP_CFG ), \
1111  _mbg_cn_table_entry( GPS_PTP_STATE ), \
1112  _mbg_cn_table_entry( GPS_PTP_UC_MASTER_CFG_LIMITS ), \
1113  _mbg_cn_table_entry( GPS_PTP_UC_MASTER_CFG ), \
1114  _mbg_cn_table_entry( GPS_NTP_GLB_CFG ), \
1115  _mbg_cn_table_entry( GPS_NTP_CLNT_MODE_CFG ), \
1116  _mbg_cn_table_entry( GPS_NTP_SRV_MODE_CFG ), \
1117  _mbg_cn_table_entry( GPS_NTP_PEER_SETTINGS_IDX ), \
1118  _mbg_cn_table_entry( GPS_NTP_SYS_STATE ), \
1119  _mbg_cn_table_entry( GPS_NTP_PEER_STATE_IDX ), \
1120  _mbg_cn_table_entry( GPS_SHS ), \
1121  _mbg_cn_table_entry( GPS_SHS_STATUS ), \
1122  _mbg_cn_table_entry( GPS_NET_GLB_CFG ), \
1123  _mbg_cn_table_entry( GPS_NET_DNS_SRVR ), \
1124  _mbg_cn_table_entry( GPS_NET_DNS_SRCH_DOM ), \
1125  _mbg_cn_table_entry( GPS_NET_STAT_DNS_SRVR ), \
1126  _mbg_cn_table_entry( GPS_NET_STAT_DNS_SRCH_DOM ), \
1127  _mbg_cn_table_entry( GPS_GNSS_SAT_INFO_IDX ), \
1128  _mbg_cn_table_entry( GPS_XMR_HOLDOVER_ELAPSED ), \
1129  _mbg_cn_table_entry( GPS_GPIO_STATUS_IDX ), \
1130  _mbg_cn_table_entry( GPS_XMR_HOLDOVER_STATUS ), \
1131  _mbg_cn_table_entry( GPS_XBP_LIMITS ), \
1132  _mbg_cn_table_entry( GPS_XBP_NODE_LIMITS ), \
1133  _mbg_cn_table_entry( GPS_XBP_NODE_INFO_IDX ), \
1134  _mbg_cn_table_entry( GPS_FDM_OUTPUT_STATE_IDX ), \
1135  _mbg_cn_table_entry( GPS_FDM_OUTPUT_SETTINGS_IDX ), \
1136  _mbg_cn_table_entry( GPS_FDM_OUTPUT_INFO_IDX ), \
1137  _mbg_cn_table_entry( GPS_FDM_LIMITS ), \
1138  _mbg_cn_table_entry( GPS_FDM_STATE ), \
1139  _mbg_cn_table_entry( GPS_FDM_SETTINGS ), \
1140  _mbg_cn_table_entry( GPS_FDM_INFO ), \
1141  _mbg_cn_table_entry( GPS_XMR_EXT_SRC_INFO_IDX ), \
1142  _mbg_cn_table_entry( GPS_FDM_FREQ ), \
1143  _mbg_cn_table_entry( GPS_XFEATURES ), \
1144  _mbg_cn_table_entry( GPS_SAVE_CFG ), \
1145  _mbg_cn_table_entry( GPS_XMR_STATS_IDX ), \
1146  _mbg_cn_table_entry( GPS_FDM_SET_TD ), \
1147  _mbg_cn_table_entry( GPS_LNE_LIMITS ), \
1148  _mbg_cn_table_entry( GPS_LNE_PORT_INFO_IDX ), \
1149  _mbg_cn_table_entry( GPS_LNE_PORT_SETTINGS_IDX ), \
1150  _mbg_cn_table_entry( GPS_PWR_CTL ), \
1151  _mbg_cn_table_entry( GPS_LED_LIMITS ), \
1152  _mbg_cn_table_entry( GPS_LED_INFO_IDX ), \
1153  _mbg_cn_table_entry( GPS_LED_SETTINGS_IDX ), \
1154  _mbg_cn_table_entry( GPS_EXT_SYS_INFO ), \
1155  _mbg_cn_table_entry( GPS_TLV_INFO ), \
1156  _mbg_cn_table_entry( GPS_TLV_ANNOUNCE ), \
1157  _mbg_cn_table_entry( GPS_TLV_DATA ), \
1158  _mbg_cn_table_entry( GPS_BEGIN_TRANSACTION ), \
1159  _mbg_cn_table_entry( GPS_END_TRANSACTION ), \
1160  _mbg_cn_table_entry( GPS_REBOOT ), \
1161  _mbg_cn_table_entry( GPS_XMR_METRICS_IDX ), \
1162  _mbg_cn_table_entry( GPS_XMR_QL_INFO_IDX ), \
1163  _mbg_cn_table_entry( GPS_XMR_QL_SETTINGS_IDX ), \
1164  _mbg_cn_table_entry( GPS_CLK_RES_INFO ), \
1165  _mbg_cn_table_entry( GPS_NET_INTF_LINK_IDX ), \
1166  _mbg_cn_table_entry( GPS_NET_INTF_ADDR_IDX ), \
1167  _mbg_cn_table_entry( GPS_NET_INTF_ROUTE_IDX), \
1168  _mbg_cn_table_entry( GPS_NET_STAT_GLB_CFG ), \
1169  _mbg_cn_table_entry( GPS_NET_STAT_INTF_LINK_IDX ), \
1170  _mbg_cn_table_entry( GPS_NET_STAT_INTF_ADDR_IDX), \
1171  _mbg_cn_table_entry( GPS_NET_STAT_INTF_ROUTE_IDX), \
1172  _mbg_cn_table_entry( GPS_UCAP_NET_GLB_INFO ), \
1173  _mbg_cn_table_entry( GPS_UCAP_NET_RECV_INFO_IDX ), \
1174  _mbg_cn_table_entry( GPS_IO_PORT_LIMITS ), \
1175  _mbg_cn_table_entry( GPS_IO_PORT_SETTINGS_IDX ), \
1176  _mbg_cn_table_entry( GPS_IO_PORT_INFO_IDX ), \
1177  _mbg_cn_table_entry( GPS_IO_PORT_TYPE_INFO_IDX ), \
1178  _mbg_cn_table_entry( GPS_IO_PORT_STATUS_IDX ), \
1179  _mbg_cn_table_entry( GPS_MONITORING_LIMITS ), \
1180  _mbg_cn_table_entry( GPS_SNMP_GLB ), \
1181  _mbg_cn_table_entry( GPS_SNMP_V12_IDX ), \
1182  _mbg_cn_table_entry( GPS_SNMP_V12_TRAP_IDX ), \
1183  _mbg_cn_table_entry( GPS_SNMP_V3_IDX ), \
1184  _mbg_cn_table_entry( GPS_SNMP_V3_TRAP_IDX ), \
1185  _mbg_cn_table_entry( GPS_GNSS_SV_STATUS_IDX ), \
1186  _mbg_cn_table_entry( GPS_PTP_V2_DEFAULT_DS ), \
1187  _mbg_cn_table_entry( GPS_PTP_V2_CURRENT_DS ), \
1188  _mbg_cn_table_entry( GPS_PTP_V2_PARENT_DS ), \
1189  _mbg_cn_table_entry( GPS_PTP_V2_TIME_PROP_DS ), \
1190  _mbg_cn_table_entry( GPS_PTP_V2_PORT_DS_IDX ), \
1191  _mbg_cn_table_entry( GPS_TAINTED_CFG ), \
1192  _mbg_cn_table_entry( GPS_EVENT_IDX ), \
1193  _mbg_cn_table_entry( GPS_EVENT_STAT_IDX ), \
1194  _mbg_cn_table_entry( GPS_NTP_REFCLK_CFG ), \
1195  _mbg_cn_table_entry( GPS_NTP_MISC_LIMITS ), \
1196  _mbg_cn_table_entry( GPS_NTP_MISC_ORPHAN_MODE ), \
1197  _mbg_cn_table_entry( GPS_NTP_SYMM_KEY_LIMITS ), \
1198  _mbg_cn_table_entry( GPS_NTP_SYMM_KEY_CFG ), \
1199  _mbg_cn_table_entry( GPS_NTP_TRUSTED_KEY_CFG ), \
1200  _mbg_cn_table_entry( GPS_PTP_V1_DEFAULT_DS ), \
1201  _mbg_cn_table_entry( GPS_PTP_V1_CURRENT_DS ), \
1202  _mbg_cn_table_entry( GPS_PTP_V1_PARENT_DS ), \
1203  _mbg_cn_table_entry( GPS_PTP_V1_TIME_PROP_DS ), \
1204  _mbg_cn_table_entry( GPS_PTP_V1_PORT_DS_IDX ), \
1205  _mbg_cn_table_entry( GPS_NTP_REFCLK_STATE_IDX ), \
1206  _mbg_cn_table_entry( GPS_EVENT_VALUE_IDX ), \
1207  _mbg_cn_table_entry( GPS_REGISTER_PUSH_MSGS ), \
1208  _mbg_cn_table_entry( GPS_UNREGISTER_PUSH_MSGS ), \
1209  _mbg_cn_table_entry( GPS_AUTH_USER_INFO ), \
1210  _mbg_cn_table_entry( GPS_AUTH_USER_STATUS ), \
1211  _mbg_cn_table_entry( GPS_USER_MNGMNT_INFO ), \
1212  _mbg_cn_table_entry( GPS_USER_INFO_IDX ), \
1213  _mbg_cn_table_entry( GPS_USER_LEVEL_INFO_IDX ), \
1214  _mbg_cn_table_entry( GPS_USER_STATUS_IDX ), \
1215  _mbg_cn_table_entry( GPS_PTP_SMPTE_TLV ), \
1216  _mbg_cn_table_entry( GPS_SVC_MGMT_INFO ), \
1217  _mbg_cn_table_entry( GPS_SVC_INFO_IDX ), \
1218  _mbg_cn_table_entry( GPS_SVC_STATUS_IDX ), \
1219  _mbg_cn_table_entry( GPS_SVC_CTL_IDX ), \
1220  _mbg_cn_table_entry( GPS_SYSLOG_GLB_INFO ), \
1221  _mbg_cn_table_entry( GPS_SYSLOG_INFO_IDX ), \
1222  _mbg_cn_table_entry( GPS_FW_GLB_INFO ), \
1223  _mbg_cn_table_entry( GPS_FW_INFO_IDX ), \
1224  _mbg_cn_table_entry( GPS_FW_UFU_INFO_IDX ), \
1225  _mbg_cn_table_entry( GPS_FW_ACTIVATE ), \
1226  _mbg_cn_table_entry( GPS_FW_DELETE ), \
1227  _mbg_cn_table_entry( GPS_FW_UFU_FLASH ), \
1228  \
1229  /* GPS data */ \
1230  _mbg_cn_table_entry( GPS_CFGH ), \
1231  _mbg_cn_table_entry( GPS_ALM ), \
1232  _mbg_cn_table_entry( GPS_EPH ), \
1233  _mbg_cn_table_entry( GPS_UTC ), \
1234  _mbg_cn_table_entry( GPS_IONO ), \
1235  _mbg_cn_table_entry( GPS_ASCII_MSG ), \
1236  \
1237  /* Glonass data */ \
1238  _mbg_cn_table_entry( GPS_GLNS_ALM ), \
1239  _mbg_cn_table_entry( GPS_GNSS_SAT_INFO ), \
1240  _mbg_cn_table_entry( GPS_GNSS_MODE ), \
1241  \
1242  /* Misc data */ \
1243  _mbg_cn_table_entry( GPS_IP4_SETTINGS ), \
1244  _mbg_cn_table_entry( GPS_LAN_IF_INFO ), \
1245  _mbg_cn_table_entry( GPS_IP4_STATE ), \
1246  \
1247  /* misc data (SCU) */ \
1248  _mbg_cn_table_entry( GPS_SCU_STAT ), \
1249  \
1250  _mbg_cn_table_entry( GPS_CRYPTED_PACKET ), \
1251  _mbg_cn_table_entry( GPS_CRYPTED_RAW_PACKET ), \
1252  _mbg_cn_table_entry( GPS_XBP_PACKET ), \
1253  \
1254  _mbg_cn_table_entry( GPS_SECU_INFO ), \
1255  _mbg_cn_table_entry( GPS_SECU_SETTINGS ), \
1256  _mbg_cn_table_entry( GPS_SECU_PUBLIC_KEY ), \
1257  \
1258  /* PZF data */ \
1259  _mbg_cn_table_entry( PZF_PCPS_TIME ), \
1260  _mbg_cn_table_entry( PZF_TR_DISTANCE ), \
1261  _mbg_cn_table_entry( PZF_TZCODE ), \
1262  _mbg_cn_table_entry( PZF_CORR_INFO ), \
1263  \
1264  _mbg_cn_table_end() \
1265 }
1266 
1267 #endif // !defined( MBG_TGT_DOS )
1268 
1269 
1273 typedef struct
1274 {
1277 } SV_ALM;
1278 
1279 
1283 typedef struct
1284 {
1287 } SV_EPH;
1288 
1289 
1290 
1291 #if _USE_PCPSDEFS
1292 
1303 
1304 #define _mbg_swab_tzcode( _p ) \
1305  _mbg_swab16( _p )
1306 
1307 
1317 typedef union
1318 {
1319  TZCODE ser;
1321 
1322 } TZCODE_UNION;
1323 
1324 #endif
1325 
1326 
1327 
1331 typedef struct
1332 {
1337 
1338 } MSG_HDR;
1339 
1340 
1341 
1345 typedef union
1346 {
1347  uint32_t u32;
1348  int32_t i32;
1352  double d;
1466 
1470 
1472 
1477 
1483 
1495 
1497 
1504 
1506 
1511 
1522 
1528 
1530 
1533 
1539 
1544 
1549 
1554 
1559 
1560  //##++ PTP_POWER_PROFILE_CFG ptp_power_profile_cfg; // no cmd code, yet.
1561 
1568 
1571 
1574 
1575 #if _USE_PCPSDEFS
1578  TZCODE tzcode;
1580 #endif
1581 
1582 #if _USE_ENCRYPTION
1583  SECU_SETTINGS secu_settings;
1584 #endif
1585 
1586 #if _USE_TIME_MON && defined( _PRELIMINARY_CODE )
1587  MBG_TIME_MON_INST_INFO time_mon_inst_info;
1588  MBG_TIME_MON_TARGET_SETTINGS time_mon_target_settings;
1589  MBG_TIME_MON_TARGET_STATUS_IDX time_mon_target_status_idx;
1590  MBG_TIME_MON_TARGET_EXT_DATA_SET_IDX time_mon_target_ext_data_set_idx;
1591 #endif
1592 
1593 #if _USE_GPSPRIV
1594  _mbg_gps_types_priv
1595 #endif
1596 
1597 } MSG_DATA;
1598 
1600 #ifndef MAX_MSG_DATA_SIZE
1601  #ifndef ADD_MSG_DATA_SIZE
1602  #if _USE_ENCRYPTION
1603  #define ADD_MSG_DATA_SIZE AES_BLOCK_SIZE // round up to full paragraphs
1604  #else
1605  #define ADD_MSG_DATA_SIZE 0
1606  #endif
1607  #endif
1608 
1609  #define MAX_MSG_DATA_SIZE ( sizeof( MSG_DATA ) + ADD_MSG_DATA_SIZE )
1610 #endif
1611 
1612 
1619 typedef union
1620 {
1621  MSG_DATA msg_data;
1623 
1625 
1626 
1627 
1631 typedef struct
1632 {
1635 
1636 } MBG_STD_MSG;
1637 
1638 
1639 
1643 typedef struct
1644 {
1647 
1648 } XBP_MSG_DATA;
1649 
1650 
1651 
1661 typedef struct
1662 {
1665 
1666 } XBP_MSG_HDR;
1667 
1668 
1669 
1673 typedef struct
1674 {
1676 
1677  #if _USE_ENCRYPTION
1678  uint8_t aes_initvect[AES_BLOCK_SIZE];
1679  #else
1680  // In this case this structure is just a dummy to avoid
1681  // a compiler error with the function prototypes.
1682  #endif
1683 
1685 
1686 
1687 
1688 #if _USE_ENCRYPTION
1689 
1693 typedef struct
1694 {
1695  uint8_t aes_initvect[AES_BLOCK_SIZE];
1696  MBG_STD_MSG std_msg;
1697 
1698 } CRYPT_MSG_DATA;
1699 
1700 #endif
1701 
1702 
1703 
1710 typedef struct
1711 {
1713 
1714  union
1715  {
1717  MSG_DATA msg_data;
1720 
1721  #if _USE_ENCRYPTION
1722  CRYPT_MSG_DATA crypt_msg_data;
1723  #endif
1724 
1725  } u;
1726 
1727 } MBG_MSG_BUFF;
1728 
1729 
1730 
1734 typedef struct
1735 {
1737  int buf_size;
1738 
1739  struct rcv_state
1740  {
1742  int cnt;
1744  #if _USE_RCV_TSTAMP
1745  MBG_TMO_TIME tstamp;
1746  #endif
1747  } rcv_state;
1748 
1749 } MBG_MSG_RCV_CTL;
1750 
1751 
1752 
1759 {
1766 };
1767 
1776 {
1782 };
1783 
1784 
1785 
1789 typedef struct
1790 {
1792  int buf_size;
1794 
1795 } MBG_MSG_XMT_CTL;
1796 
1797 
1798 
1805 {
1809 };
1810 
1811 #if !_IS_MBG_FIRMWARE
1812 
1813 struct MBG_MSG_CTL_s;
1814 
1816 
1817 #endif
1818 
1819 
1820 #if _USE_SOCKET_IO
1821 
1822 #if !defined( MBGEXTIO_MSG_TIMEOUT_SOCKET )
1823  #define MBGEXTIO_MSG_TIMEOUT_SOCKET 1000 // [ms]
1824 #endif
1825 
1826 #if !defined( MBGEXTIO_POLL_TIMEOUT_SOCKET )
1827  #define MBGEXTIO_POLL_TIMEOUT_SOCKET 200 // [ms]
1828 #endif
1829 
1830 #define LAN_XPT_PORT 10001
1831 #define LAN_SSH_PORT 10002
1832 
1833 
1834 
1835 typedef struct
1836 {
1837  MBG_SOCK_FD sockfd;
1838  struct sockaddr_in _addr;
1839  struct sockaddr_in *p_addr;
1840  socklen_t addrlen;
1841  ulong poll_timeout;
1842 
1843  uint8_t use_ssh;
1844  int (*read)( MBG_MSG_CTL *, void *, size_t );
1845  int (*write)( MBG_MSG_CTL *, const void *, size_t );
1846  #if _USE_SSH_ENCRYPTION
1847  SSH_DATA *(*get_ssh_data)( MBG_MSG_CTL * );
1848  #endif
1849 
1850 } SOCKET_IO_STATUS;
1851 
1852 #define __mbg_get_pmctl_ssh_data(pmctl) (pmctl)->st.sockio.get_ssh_data(pmctl)
1853 
1854 #endif // _USE_SOCKET_IO
1855 
1856 
1857 #if _USE_SERIAL_IO_FTDI
1858 
1859 typedef struct
1860 {
1861  FT_HANDLE port_handle;
1862  ulong poll_timeout;
1863 
1864 } FTDI_DEV;
1865 
1866 #endif // _USE_SERIAL_IO_FTDI
1867 
1868 
1869 
1870 #if _USE_USB_DIRECT_IO
1871 
1872 typedef int MBG_USB_DIRECT_IO_FD;
1873 
1874 #if !defined(MBG_USB_DIRECT_IO_INVALID_FD)
1875  #define MBG_USB_DIRECT_IO_INVALID_FD -1
1876 #endif
1877 
1878 #if !defined( MBGEXTIO_POLL_TIMEOUT_USB_DIRECT_IO )
1879  #define MBGEXTIO_POLL_TIMEOUT_USB_DIRECT_IO 1000 // [ms]
1880 #endif
1881 
1882 #if !defined( MBGEXTIO_MSG_TIMEOUT_USB_DIRECT_IO )
1883  #define MBGEXTIO_MSG_TIMEOUT_USB_DIRECT_IO 1000 // [ms]
1884 #endif
1885 
1886 typedef struct
1887 {
1888  MBG_USB_DIRECT_IO_FD usbdiofd;
1889  ulong poll_timeout;
1890 
1891 } USB_DIRECT_IO_STATUS;
1892 
1893 #endif // _USE_USB_DIRECT_IO
1894 
1895 
1896 
1897 #if !_IS_MBG_FIRMWARE
1898 
1899 
1900 
1919 
1920 
1935 
1936 
1948 typedef int _MBG_API MBG_ASYNC_DATA_HANDLER_FNC( MBG_MSG_CTL *pmctl, char c );
1949 
1950 
1965 
1966 #endif // !_IS_MBG_FIRMWARE
1967 
1968 
1973 {
1976 
1977  #if _USE_MUTEX
1979  #endif
1980 
1982  uint32_t device_flags;
1984 
1985  #if !_IS_MBG_FIRMWARE
1988 
1993 
1997  #endif
1998 
1999  #if _USE_ENCRYPTION
2000  uint8_t aes_initvect[AES_BLOCK_SIZE];
2001  uint8_t aes_keyvect[AES_BLOCK_SIZE];
2002  #endif
2003 
2004  #if _USE_SOCKET_IO
2005  SECU_SETTINGS secu_settings;
2006  #endif
2007 
2008  #if _USE_SERIAL_IO || \
2009  _USE_SERIAL_IO_FTDI || \
2010  _USE_SOCKET_IO || \
2011  _USE_USB_IO || \
2012  _USE_USB_DIRECT_IO
2013  union st
2014  {
2015  #if _USE_SOCKET_IO
2016  SOCKET_IO_STATUS sockio;
2017  #endif
2018 
2019  #if _USE_SERIAL_IO
2021  #endif
2022 
2023  #if _USE_SERIAL_IO_FTDI
2024  FTDI_DEV ftdi;
2025  #endif
2026 
2027  #if _USE_USB_IO
2028  MBGUSBIO_DEV usbio;
2029  #endif
2030 
2031  #if _USE_USB_DIRECT_IO
2032  USB_DIRECT_IO_STATUS usbdio;
2033  #endif
2034  } st;
2035  #endif
2036 
2037  #if defined( _DEBUG_MSG_TIMING )
2038  MBG_MSG_TIMES mt;
2039  #endif
2040 
2041  void *priv_data;
2042 };
2043 
2044 
2051 {
2058 };
2059 
2060 
2061 
2062 #if _USE_GPSSERIO_FNC
2063 
2064 /* ----- function prototypes begin ----- */
2065 
2066 /* This section was generated automatically */
2067 /* by MAKEHDR, do not remove the comments. */
2068 
2076  int mbg_ftdi_ft_status_to_mbg( FT_STATUS status ) ;
2077 
2090  CSUM msg_csum_update( CSUM csum, const uint8_t *p, int n ) ;
2091 
2103  CSUM msg_csum( const uint8_t *p, int n ) ;
2104 
2112  CSUM msg_hdr_csum( const MSG_HDR *pmh ) ;
2113 
2121  int chk_hdr_csum( const MSG_HDR *pmh ) ;
2122 
2130  int chk_data_csum( const MBG_MSG_BUFF *pmb ) ;
2131 
2139  int chk_hdr_rcvd( const MBG_MSG_RCV_CTL *prctl ) ;
2140 
2153  int encrypt_message( MBG_MSG_CTL *pmctl, CRYPT_MSG_PREFIX *pcmp, MBG_MSG_BUFF *pmb ) ;
2154 
2162  int decrypt_message( MBG_MSG_CTL *pmctl ) ;
2163 
2171  void set_encryption_mode( MBG_MSG_CTL *pmctl, int mode, const char *key ) ;
2172 
2189  int xmt_tbuff( MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr ) ;
2190 
2210  int xmt_cmd( MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, GPS_CMD cmd ) ;
2211 
2232  int xmt_cmd_us( MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, GPS_CMD cmd, uint16_t us ) ;
2233 
2254  int xmt_cmd_u32( MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, GPS_CMD cmd, uint32_t u32 ) ;
2255 
2263  void init_transfer( MBG_MSG_RCV_CTL *prctl ) ;
2264 
2281  int check_transfer( MBG_MSG_RCV_CTL *prctl, uint8_t c ) ;
2282 
2283 
2284 /* ----- function prototypes end ----- */
2285 
2286 #endif // _USE_GPSSERIO_FNC
2287 
2288 /* End of header body */
2289 
2290 
2291 #undef _ext
2292 
2293 #ifdef __cplusplus
2294 }
2295 #endif
2296 
2297 
2298 #endif /* _GPSSERIO_H */
2299 
PTP_UC_MASTER_SETTINGS_IDX ptp_uc_master_settings_idx
Definition: gpsserio.h:1414
MBG_IO_PORT_INFO_IDX iop_info_idx
Definition: gpsserio.h:1480
Binary reception in progress, i.e. after START_OF_HEADER received.
Definition: gpsserio.h:714
Current SHS settings and general SHS capabilities.
Definition: gpsdefs.h:17724
from device: acknowledge a command
Definition: gpsserio.h:741
Current SHS status.
Definition: gpsdefs.h:17747
MBG_NET_GLB_CFG_INFO net_glb_cfg_info
Definition: gpsserio.h:1427
A structure to used to read the status of the PTP protocol stack.
Definition: gpsdefs.h:13184
A message prefix used for encrypted messages.
Definition: gpsserio.h:1673
GNSS_SAT_INFO gnss_sat_info
Definition: gpsserio.h:1394
uint16_t TR_DISTANCE
Receiver distance from transmitter [km].
Definition: pcpsdefs.h:1553
Query MBG_NET_INTF_ROUTE_SETTINGS by its index.
Definition: gpsdefs.h:12303
PTP_CFG_SETTINGS ptp_cfg_settings
Definition: gpsserio.h:1410
NTP_PEER_SETTINGS_IDX ntp_peer_settings_idx
Definition: gpsserio.h:1421
Configuration settings for a specific PTP unicast master.
Definition: gpsdefs.h:14329
int MBG_TIME_MON_INST_INFO_IDX
Definition: gpsserio.h:675
(r–) MBG_IMS_FDM_OUTPUT_INFO, only if MBG_IMS_STATE_FLAG_MSK_HAS_FDM is set in MBG_IMS_STATE::flags ...
Definition: gpsserio.h:882
Number of event log entries that can be stored and yet have been saved.
Definition: gpsdefs.h:9540
(r–) MBG_LNE_LIMITS, LNE API capabilities, only if MBG_XFEATURE_LNE_API
Definition: gpsserio.h:893
uint8_t PCPS_TZCODE
Type of variable to hold a TZ code.
Definition: pcpsdefs.h:1432
(r–) XMULTI_REF_INFO_IDX, idx 0..XMULTI_REF_INSTANCES::n_xmr_settings-1, only if GPS_HAS_XMULTI_REF ...
Definition: gpsserio.h:832
(-w-) Transmit index of MBG_FW_INFO_IDX to be deleted
Definition: gpsserio.h:976
Summary of configuration and health data of all satellites.
Definition: gpsdefs.h:18512
Configuration settings of a specific serial port.
Definition: gpsdefs.h:3594
(rw-) ENABLE_FLAGS, when to enable serial, pulses, and synth, only if GPS_MODEL_HAS_ENABLE_FLAGS ...
Definition: gpsserio.h:805
Ephemeris parameters of one specific satellite.
Definition: gpsdefs.h:18436
uint16_t len
length of the data portion appended after the header
Definition: gpsserio.h:1334
NTP trusted key info, with index.
Definition: gpsdefs.h:16051
(-w-) MBG_IO_PORT_SETTINGS_IDX, only supp. if MBG_XFEATURE_IO_PORTS is set in extended features ...
Definition: gpsserio.h:921
MBG_MUTEX dev_mutex
Mutex to serialize device access.
Definition: gpsserio.h:1978
Output settings for FDM devices plus index.
Definition: gpsdefs.h:10026
IO Port Type Info Index.
Definition: gpsdefs.h:21046
(r–) NTP_PEER_STATE_IDX, with index 0 ... NTP_CLNT_MODE_SETTINGS::num_peers - 1
Definition: gpsserio.h:865
IO Port Type Status.
Definition: gpsdefs.h:21225
MBG_TLV_RCV_STATE tlv_rcv_state
Definition: gpsserio.h:1996
(rw-) CFGH, SVs&#39; configuration and health codes
Definition: gpsserio.h:983
(rw-) ANT_CABLE_LEN, length of antenna cable, only if GPS_MODEL_HAS_ANT_CABLE_LEN ...
Definition: gpsserio.h:809
int chk_hdr_csum(const MSG_HDR *pmh)
Check if the header checksum of a binary message is valid.
The data portion of an XBP message.
Definition: gpsserio.h:1643
(-w-) no data, only if RECEIVER_INFO::n_ucaps > 0
Definition: gpsserio.h:836
PTP_STATE ptp_state
Definition: gpsserio.h:1411
TTM ucap
Definition: gpsserio.h:1363
(r–) MBG_DATABASE_GLB_INFO, only supp. if MBG_XFEATURE_DATABASE is set
Definition: gpsserio.h:978
(rw-) NTP_SRV_MODE_INFO/NTP_SRV_MODE_SETTINGS, only if NTP_MSK_ROLE_SERVER
Definition: gpsserio.h:862
connection via direct USB I/O operation
Definition: gpsserio.h:2056
MBG_NET_INTF_LINK_INFO_IDX net_intf_link_info_idx
Definition: gpsserio.h:1431
No data received during the timeout interval.
Definition: gpsserio.h:716
(rw-) IRIG_SETTINGS, only if GPS_HAS_IRIG_RX
Definition: gpsserio.h:827
(rw-) MBG_REF_OFFS, only if GPS_HAS_REF_OFFS
Definition: gpsserio.h:829
(r–) MBG_NET_INTF_ADDR_INFO_IDX, addr status, only if MBG_NET_GLB_SUPP_STAGE_2_MASK is set in MBG_NE...
Definition: gpsserio.h:916
MBG_FW_UFU_INFO_IDX fw_ufu_info_idx
Definition: gpsserio.h:1552
MBG_NET_INTF_ROUTE_SETTINGS_IDX net_intf_route_settings_idx
Definition: gpsserio.h:1436
XBP_ADDR xpb_addr
Definition: gpsserio.h:1664
MBG_SERVICE_INFO_IDX svc_info_idx
Definition: gpsserio.h:1542
(r–) MBG_EVENT_STATUS_IDX, only supp. if MBG_XFEATURE_MONITORING is set in extended features ...
Definition: gpsserio.h:943
Global settings for user captures via network.
Definition: gpsdefs.h:12466
(r–) XMR_HOLDOVER_INTV, elapsed time in holdover mode, only if ::GPS_MODEL_HAS_XMR_HOLDOVER_INTV, deprecated by GPS_XMR_HOLDOVER_STATUS
Definition: gpsserio.h:874
connection via serial port
Definition: gpsserio.h:2052
Settings of an IPv4-only network interface.
Definition: gpsdefs.h:11239
int chk_hdr_rcvd(const MBG_MSG_RCV_CTL *prctl)
Checks if a binary message header has been completely received.
GPS UTC correction parameters.
Definition: gpsdefs.h:18564
MBG_XFER_MODES
Binary message transfer modes.
Definition: gpsserio.h:1804
SV_EPH sv_eph
Definition: gpsserio.h:1564
(rw-) PTP_CFG_INFO/PTP_CFG_SETTINGS, only if GPS_HAS_PTP
Definition: gpsserio.h:856
(r–) MBG_SERVICE_STATUS_IDX, index 0 .. MBG_SERVICE_MGMT_INFO::num_services - 1, only supp...
Definition: gpsserio.h:968
(rw-) deprecated, use GPS_PORT_INFO_IDX/GPS_PORT_SETTINGS_IDX
Definition: gpsserio.h:808
TR_DISTANCE tr_distance
Definition: gpsserio.h:1577
(rw-) MBG_UCAP_NET_GLB_INFO/MBG_UCAP_NET_GLB_SETTINGS, only supp. if MBG_XFEATURE_UCAP_NET is set in ...
Definition: gpsserio.h:918
(r–) MBG_IMS_FDM_OUTPUT_STATE_IDX, only if MBG_IMS_STATE_FLAG_MSK_HAS_FDM is set in MBG_IMS_STATE::f...
Definition: gpsserio.h:880
A structure used to configure a PTP port.
Definition: gpsdefs.h:13278
(r–) IRIG_INFO, only if GPS_HAS_IRIG_RX
Definition: gpsserio.h:828
SV_ALM sv_alm
Definition: gpsserio.h:1563
int xmt_cmd(MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, GPS_CMD cmd)
Send a binary command message without parameters.
A structure used to control the transmission of binary messages.
Definition: gpsserio.h:1789
(rw-) PTP_UC_MASTER_INFO_IDX/PTP_UC_MASTER_SETTINGS_IDX, only if PTP_CFG_CAN_BE_UNICAST_SLAVE ...
Definition: gpsserio.h:859
LNO state.
Definition: gpsdefs.h:17572
Structure that contains an index value and the NTP peer state.
Definition: gpsdefs.h:17539
(r–) STR_TYPE_INFO_IDX, names and capabilities of supp. string types, only if RECEIVER_INFO::n_str_t...
Definition: gpsserio.h:815
MBG_IO_PORT_SETTINGS_IDX iop_settings_idx
Definition: gpsserio.h:1479
A The structure used to store the configuration of two serial ports.
Definition: gpsdefs.h:3929
int xmt_cmd_us(MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, GPS_CMD cmd, uint16_t us)
Send a binary command message with ushort (16 bit) parameter.
(r–) MBG_IP_ADDR_IDX, DNS status, only if MBG_NET_GLB_CFG_INFO::n_supp_dns_srvr > 0 ...
Definition: gpsserio.h:871
(r–) MBG_LED_INFO_IDX, settings and capabilities of an LED, only if MBG_XFEATURE_LED_API ...
Definition: gpsserio.h:898
(rw-) MBG_NET_NAME_IDX, DNS cfg., only if MBG_NET_GLB_CFG_INFO::n_supp_dns_srch_dom > 0 ...
Definition: gpsserio.h:870
MBG_PTP_V1_PORT_DATASET_IDX ptp_v1_port_dataset_idx
Definition: gpsserio.h:1527
NTP_REFCLK_CFG_INFO_IDX ntp_refclk_cfg_info_idx
Definition: gpsserio.h:1517
(-w-) no data, end transaction and apply changes, only supp. if MBG_XFEATURE_TRANSACTIONS ...
Definition: gpsserio.h:905
Time scale configuration settings plus capabilities.
Definition: gpsdefs.h:5519
CSUM msg_csum(const uint8_t *p, int n)
Compute a checksum for a binary message.
(rw-) TZCODE, time zone code, only if GPS_MODEL_IS_DCF_PZF
Definition: gpsserio.h:1017
(rw-) a binary data bufer to be sent/received, according to the previous announce msg...
Definition: gpsserio.h:903
(r–) MBG_IMS_FDM_LIMITS, only if MBG_IMS_STATE_FLAG_MSK_HAS_FDM is set in MBG_IMS_STATE::flags ...
Definition: gpsserio.h:883
IP4_SETTINGS ip4_settings
Definition: gpsserio.h:1569
IRIG_INFO irig_rx_info
Definition: gpsserio.h:1382
void set_encryption_mode(MBG_MSG_CTL *pmctl, int mode, const char *key)
Set communication channel to specified encryption mode.
IRIG_SETTINGS irig_tx_settings
Definition: gpsserio.h:1367
RCV_TIMEOUT rcv_timeout
Definition: gpsserio.h:1379
(rw-) NTP_PEER_SETTINGS_IDX, only if ??? //### TODO
Definition: gpsserio.h:863
Global network configuration settings.
Definition: gpsdefs.h:11844
SW_REV sw_rev
Definition: gpsserio.h:1354
normal, unencrypted transmission
Definition: gpsserio.h:1806
(-w-) no data, enable auto-msgs from device
Definition: gpsserio.h:793
MBG_UCAP_NET_RECV_SETTINGS_IDX ucap_net_recv_settings_idx
Definition: gpsserio.h:1476
NTP refclock settings index.
Definition: gpsdefs.h:15724
(rw-) MBG_EVENT_INFO_IDX / MBG_EVENT_SETTINGS_IDX, only supp. if MBG_XFEATURE_MONITORING is set in ex...
Definition: gpsserio.h:942
int MBG_TIME_MON_INST_SETTINGS
Definition: gpsserio.h:672
ulong flags
flags if header already completed, etc., see MBG_MSG_RCV_CTL_MASKS
Definition: gpsserio.h:1743
A structure used to configure the priority of the supported ref sources.
Definition: gpsdefs.h:6574
MBG_DEBUG_STATUS debug_status
Definition: gpsserio.h:1384
(-w-) no data, save current config as default, only if MBG_XFEATURE_SAVE_CFG
Definition: gpsserio.h:890
MBG_OPT_INFO opt_info
Definition: gpsserio.h:1389
NTP_SRV_MODE_SETTINGS ntp_srv_mode_settings
Definition: gpsserio.h:1420
NTP orphan mode settings to be read from / written to a device.
Definition: gpsdefs.h:16168
MBG_SNMP_V3_SETTINGS_IDX snmp_v3_settings_idx
Definition: gpsserio.h:1491
(r–) MBG_XFEATURE_BUFFER, only if GPS_HAS_XFEATURE
Definition: gpsserio.h:889
Detailed GNSS satellite status, plus index.
Definition: gpsdefs.h:10968
short int16_t
Definition: words.h:212
MBG_PTP_V2_DEFAULT_DATASET ptp_v2_default_dataset
Definition: gpsserio.h:1498
IRIG_SETTINGS irig_rx_settings
Definition: gpsserio.h:1381
(rw-) MBG_PTP_V2_PARENT_DATASET, only supp. if PTP_CFG_MSK_HAS_V2_COMMON_DATASETS is set in PTP_CFG_I...
Definition: gpsserio.h:938
CSUM msg_csum_update(CSUM csum, const uint8_t *p, int n)
Compute a simple binary checksum.
A union holding different types of a TZ code.
Definition: gpsserio.h:1317
MBG_IP_ADDR_IDX ip_addr_idx
Definition: gpsserio.h:1429
(r–) MBG_IO_PORT_STATUS_IDX, only supp. if MBG_XFEATURE_IO_PORTS is set in extended features and fro...
Definition: gpsserio.h:924
PTP_UC_MASTER_INFO_IDX ptp_uc_master_info_idx
Definition: gpsserio.h:1413
(w–) MBG_SERVICE_CTL, index 0 .. MBG_SERVICE_MGMT_INFO::num_services - 1, only supp. if MBG_XFEATURE_SERVICE
Definition: gpsserio.h:969
PTPv1 current dataset containing information about the synchronization status of the device...
Definition: gpsdefs.h:14611
A timestamp with nanosecond resolution, but 64 bit size.
Definition: words.h:621
A union of all data types used with the binary protocol, or array of bytes.
Definition: gpsserio.h:1619
(-w-) MBG_TIME_MON_TARGET_SETTINGS
Definition: gpsserio.h:1025
connection via direct USB
Definition: gpsserio.h:2054
(rw-) MBG_PTP_V1_PARENT_DATASET, only supp. if PTP_CFG_MSK_HAS_V1_COMMON_DATASETS is set in PTP_CFG_I...
Definition: gpsserio.h:952
int MBG_TIME_MON_TARGET_EXT_DATA_SET_IDX
Definition: gpsserio.h:680
(r–) MBG_EXT_SYS_INFO, extended revision information, only if MBG_XFEATURE_EXT_SYS_INFO ...
Definition: gpsserio.h:900
uint16_t u16
Definition: gpsserio.h:1349
Status information on a ref time source at a specific priority level.
Definition: gpsdefs.h:6885
MBG_IMS_SENSOR_STATE_IDX ims_sensor_state_idx
Definition: gpsserio.h:1405
EPH eph
Definition: gpsserio.h:1286
(rw-) MBG_TIME_SCALE_SETTINGS/MBG_TIME_SCALE_INFO, only if GPS_HAS_TIME_SCALE
Definition: gpsserio.h:837
PORT_PARM port_parm
Definition: gpsserio.h:1360
int _MBG_API MBG_ASYNC_MSG_HANDLER_FNC(MBG_MSG_CTL *pmctl)
Type of a callback function to handle spurious binary messages.
Definition: gpsserio.h:1934
XMR_HOLDOVER_STATUS xmr_holdover_status
Definition: gpsserio.h:1439
(r–) XMR_QL_INFO, only if XMR_EXT_SRC_FEAT_FLAG_MSK_METRICS
Definition: gpsserio.h:908
(r–) MBG_TLV_INFO, query information on which TLV stuff is supported, only if MBG_XFEATURE_TLV_API ...
Definition: gpsserio.h:901
(r–) deprecated, SW_REV, software revision, use only if GPS_RECEIVER_INFO not supp.
Definition: gpsserio.h:795
MBGSERIO_DEV * p_serio
Definition: gpsserio.h:2020
MBG_NUM_EVT_LOG_ENTRIES num_evt_log_entries
Definition: gpsserio.h:1401
(r–) XMULTI_REF_STATUS_IDX, idx 0..XMULTI_REF_INSTANCES::n_xmr_settings-1, only if GPS_HAS_XMULTI_RE...
Definition: gpsserio.h:833
Current IRIG settings and supported codes.
Definition: gpsdefs.h:5054
MBG_LED_SETTINGS_IDX led_settings_idx
Definition: gpsserio.h:1461
uint16_t CSUM
checksum used by some structures stored in non-volatile memory
Definition: gpsdefs.h:705
(rw-) NTP_GLB_INFO/NTP_GLB_SETTINGS, only if GPS_HAS_NTP
Definition: gpsserio.h:860
unsigned short uint16_t
Definition: words.h:213
(rw-) ** preliminary ** //##++
Definition: gpsserio.h:991
MBG_IMS_FDM_OUTPUT_INFO_IDX fdm_output_info_idx
Definition: gpsserio.h:1445
(r–) next MBG_EVT_LOG_ENTRY, only if GPS_HAS_EVT_LOG
Definition: gpsserio.h:847
A structure used to configure optional settings.
Definition: gpsdefs.h:5342
MBG_LNE_PORT_INFO_IDX lne_port_info_idx
Definition: gpsserio.h:1456
XMR holdover status.
Definition: gpsdefs.h:7157
Received Negative Acknowledge from a device (prev. msg not accepted or not supported) ...
Definition: gpsserio.h:723
NTP_SYMM_KEY_LIMITS ntp_symm_key_limits
Definition: gpsserio.h:1512
MBG_SYSLOG_INFO_IDX syslog_info_idx
Definition: gpsserio.h:1547
(r–) BVAR_STAT, status of buffered variables, only if GPS_MODEL_HAS_BVAR_STAT
Definition: gpsserio.h:796
SHS_INFO shs_info
Definition: gpsserio.h:1424
Information on available XBP nodes.
Definition: gpsdefs.h:17926
XBP_LIMITS xbp_limits
Definition: gpsserio.h:1440
NTP refclock info, with index.
Definition: gpsdefs.h:15795
The data checksum of a received message is invalid.
Definition: gpsserio.h:718
NTP_TRUSTED_KEY_SETTINGS_IDX ntp_trusted_key_settings_idx
Definition: gpsserio.h:1516
(r–) MBG_GPIO_STATUS_IDX, only if MBG_GPIO_CFG_LIMIT_FLAG_MASK_STATUS_SUPP
Definition: gpsserio.h:875
(r–) PTP_UC_MASTER_CFG_LIMITS, only if PTP_CFG_CAN_BE_UNICAST_SLAVE
Definition: gpsserio.h:858
(rwa) encrypted binary packet
Definition: gpsserio.h:1006
(r–) MBG_LED_LIMITS, LED API capabilities, only if MBG_XFEATURE_LED_API
Definition: gpsserio.h:897
MBG_IO_PORT_LIMITS iop_limits
Definition: gpsserio.h:1478
An event log entry.
Definition: gpsdefs.h:9564
(r–) XBP_LIMITS, only if GPS_HAS_XBP
Definition: gpsserio.h:877
IO Port Settings Index.
Definition: gpsdefs.h:20738
see MBG_MSG_RCV_CTL_BIT_OVERFLOW
Definition: gpsserio.h:1779
XMR timing metrics for a particular source, with index.
Definition: gpsdefs.h:7468
(r–) XMR_STATS_IDX, only if XMR_EXT_SRC_FEAT_FLAG_MSK_STATS
Definition: gpsserio.h:891
PTP_SMPTE_PROFILE_CFG smpte_profile_tlv
Definition: gpsserio.h:1503
(r–) MBG_USER_INFO for the authenticated user, see MBG_XFEATURE_USER_AUTH
Definition: gpsserio.h:959
PTPv1 parent dataset containing information about the master (parent) of the device.
Definition: gpsdefs.h:14670
(-w-) no data, disable auto-msgs from device
Definition: gpsserio.h:794
(rw-) MBG_SYSLOG_GLB_INFO / MBG_SYSLOG_GLB_SETTINGS, only supp. if MBG_MONITORING_TYPE_MSK_SYSLOG is ...
Definition: gpsserio.h:970
MBG_MSG_BUFF * pmb
points to unencrypted message buffer
Definition: gpsserio.h:1736
PORT_SETTINGS_IDX port_settings_idx
Definition: gpsserio.h:1371
int MBG_TIME_MON_TARGET_STATUS
Definition: gpsserio.h:678
(r–) MBG_CLK_RES_INFO, only if MBG_XFEATURE_CLK_RES_INFO
Definition: gpsserio.h:910
Client settings of an NTP device.
Definition: gpsdefs.h:16233
(r–) PORT_INFO_IDX, serial port settings and capabilities, only if RECEIVER_INFO::n_com_ports > 0 ...
Definition: gpsserio.h:816
MBG_SYSLOG_SETTINGS_IDX syslog_settings_idx
Definition: gpsserio.h:1548
Configuration settings for a HaveQuick input or output.
Definition: gpsdefs.h:9456
Current settings and general capabilities of a specific unicast master.
Definition: gpsdefs.h:14382
Query MBG_NET_INTF_ROUTE_INFO by its index.
Definition: gpsdefs.h:12344
(rw-) MBG_TIME_MON_INST_INFO
Definition: gpsserio.h:1024
Information on an XBP node with specific index.
Definition: gpsdefs.h:18044
see MBG_MSG_RCV_CTL_BIT_DECRYPTED
Definition: gpsserio.h:1781
MBG_FW_GLB_INFO fw_glb_info
Definition: gpsserio.h:1550
(r–) MBG_TIME_MON_TARGET_EXT_DATA_SET_IDX
Definition: gpsserio.h:1027
STD_MSG_DATA_BUFF data_buf
Data portion using the number of bytes specified in the header.
Definition: gpsserio.h:1634
(rw-) MBG_LED_SETTINGS_IDX, settings of a specific LED, only if MBG_XFEATURE_LED_API ...
Definition: gpsserio.h:899
PTPv1 time drop dataset.
Definition: gpsdefs.h:14737
MBG_TAINTED_CFG tainted_cfg
Definition: gpsserio.h:1505
int chk_data_csum(const MBG_MSG_BUFF *pmb)
Check if the data checksum of a binary message is valid.
Failed to open connection.
Definition: gpsserio.h:720
(r-a) TTM, user capture events, only if RECEIVER_INFO::n_ucaps > 0
Definition: gpsserio.h:804
uint16_t GPS_CMD
The type of a GPS command code.
Definition: gpsdefs.h:719
(r–) encryption method for LAN interface
Definition: gpsserio.h:1010
(r–) MBG_GPIO_INFO_IDX, settings and capabilities, only if GPS_HAS_GPIO
Definition: gpsserio.h:841
(rw-) NTP_CLNT_MODE_INFO/NTP_CLNT_MODE_SETTINGS, only if NTP_MSK_ROLE_CLIENT
Definition: gpsserio.h:861
(rw-) (customized firmware only)
Definition: gpsserio.h:810
MSG_DATA msg_data
union of known structures
Definition: gpsserio.h:1621
MBG_OPT_SETTINGS opt_settings
Definition: gpsserio.h:1388
int MBG_TIME_MON_INST_SETTINGS_IDX
Definition: gpsserio.h:673
MBG_SNMP_V3_TRAP_SETTINGS_IDX snmp_v3_trap_settings_idx
Definition: gpsserio.h:1493
SYNTH synth
Definition: gpsserio.h:1361
MBG_SERVICE_STATUS_IDX svc_status_idx
Definition: gpsserio.h:1543
MBG_GPIO_SETTINGS_IDX gpio_settings_idx
Definition: gpsserio.h:1399
MBG_XDEV_FEATURES xdev_features
Receiver info plus extended device features.
Definition: gpsserio.h:1987
(r–) GNSS_SAT_INFO_IDX, only if MBG_GNSS_FLAG_MSK_SAT_INFO_IDX_SUPP_SER, deprecates GPS_GNSS_SAT_INF...
Definition: gpsserio.h:873
MBG_SNMP_V12_SETTINGS_IDX snmp_v12_settings_idx
Definition: gpsserio.h:1487
(r–) MBG_LNE_PORT_INFO_IDX, settings and capabilities of an LED, only if MBG_XFEATURE_LNE_API ...
Definition: gpsserio.h:894
General GPIO config info to be read from a device.
Definition: gpsdefs.h:7608
MBG_SERVICE_SETTINGS_IDX svc_settings_idx
Definition: gpsserio.h:1541
NAV_ENGINE_SETTINGS nav_engine_settings
Definition: gpsserio.h:1392
IONO iono
Definition: gpsserio.h:1566
A generic structure used to specify FDM limits.
Definition: gpsdefs.h:10114
A structure used to store extended device features.
Definition: gpsdefs.h:2438
(rw-) MBG_GNSS_MODE_INFO/MBG_GNSS_MODE_SETTINGS, GNSS operation mode
Definition: gpsserio.h:993
XBP_MSG_DATA xbp_msg_data
XBP address field plus encapsulated standard message.
Definition: gpsserio.h:1719
Query MBG_NET_INTF_ADDR_SETTINGS by its index.
Definition: gpsdefs.h:12204
MBG_GPIO_FREQ fdm_freq
Definition: gpsserio.h:1451
(r–) MBG_IO_PORT_TYPE_INFO_IDX, only supp. if MBG_XFEATURE_IO_PORTS is set in extended features and ...
Definition: gpsserio.h:923
The header of a binary message.
Definition: gpsserio.h:1331
XMR statistics for a particular source, with index.
Definition: gpsdefs.h:7403
(r–) MBG_MONITORING_LIMITS, only supp. if MBG_XFEATURE_MONITORING is set in extended features ...
Definition: gpsserio.h:925
MBG_MSG_BUFF * pmb
points to unencrypted message buffer
Definition: gpsserio.h:1791
TR_STATUS_CODES
Status codes returned by the check_transfer() function.
Definition: gpsserio.h:711
ulong msg_rcv_timeout
Binary message receive timeout [ms].
Definition: gpsserio.h:1983
LLA lla
Definition: gpsserio.h:1358
Authentication error for the specified LAN connection.
Definition: gpsserio.h:722
double d
Definition: gpsserio.h:1352
MBG_IMS_FDM_INFO fdm_info
Definition: gpsserio.h:1449
Structure that represents the current system status of an NTP device.
Definition: gpsdefs.h:16872
MBG_TLV_INFO tlv_info
Definition: gpsserio.h:1463
uint16_t BVAR_STAT
Status flags of battery buffered data.
Definition: gpsdefs.h:770
MBG_NET_INTF_LINK_SETTINGS_IDX net_intf_link_settings_idx
Definition: gpsserio.h:1432
NTP_MISC_ORPHAN_MODE_SETTINGS ntp_misc_orphan_mode_settings
Definition: gpsserio.h:1521
MBG_NET_NAME_IDX net_name_idx
Definition: gpsserio.h:1430
A message header for the eXtended Binary Protocol (XBP)
Definition: gpsserio.h:1661
PTPv2 time properties dataset.
Definition: gpsdefs.h:15009
(rw-) NTP_REFCLK_CFG_INFO_IDX, only if NTP_SRV_MODE_SETTINGS::num_refclks > 0
Definition: gpsserio.h:944
NANO_TIME_64 nano_time_64
Definition: gpsserio.h:1454
Time scale configuration settings.
Definition: gpsdefs.h:5505
MBG_EVENT_SETTINGS_IDX event_settings_idx
Definition: gpsserio.h:1508
(rw-) MBG_USER_INFO_IDX / MBG_USER_SETTINGS_IDX, index 0 .. MBG_USER_MNGMNT_SETTINGS::num_users, only supp. if MBG_XFEATURE_USER_MNGMNT
Definition: gpsserio.h:962
(rw-) MBG_IP_ADDR_IDX, DNS cfg., only if MBG_NET_GLB_CFG_INFO::n_supp_dns_srvr > 0 ...
Definition: gpsserio.h:869
SCU_STAT_SETTINGS scu_stat_settings
Definition: gpsserio.h:1573
int buf_size
size of buffer, including header
Definition: gpsserio.h:1737
(-w-) no data, clear event log command, only if GPS_HAS_EVT_LOG
Definition: gpsserio.h:844
int MBG_SOCK_FD
A socket file descriptor type.
Definition: mbg_tgt.h:991
(r–) LNO_STATE, only if ::GPS_MODEL_IS_LNO
Definition: gpsserio.h:848
NTP_MISC_LIMITS ntp_misc_limits
Definition: gpsserio.h:1519
IRIG_INFO irig_tx_info
Definition: gpsserio.h:1374
(rw-) NTP_SYMM_KEY_INFO_IDX / NTP_SYMM_KEY_SETTINGS_IDX, only if NTP_MSK_SYMM_KEYS is set in NTP_SRV_...
Definition: gpsserio.h:948
(r-a) ANT_INFO, time diff after antenna disconnect, only if GPS_MODEL_HAS_ANT_INFO ...
Definition: gpsserio.h:803
XMULTI_REF_SETTINGS_IDX xmulti_ref_settings_idx
Definition: gpsserio.h:1385
A GPIO port&#39;s current settings and limits, plus port index.
Definition: gpsdefs.h:9273
NTP_SYMM_KEY_INFO_IDX ntp_symm_key_info_idx
Definition: gpsserio.h:1513
SCU_STAT_INFO scu_stat_info
Definition: gpsserio.h:1572
(r–) NTP_REFCLK_STATE_IDX, with index 0 ... NTP_SRV_MODE_SETTINGS::num_refclks - 1 ...
Definition: gpsserio.h:955
void init_transfer(MBG_MSG_RCV_CTL *prctl)
Init reception of a binary message.
(-w-) no data, begin transaction and apply changes after GPS_END_TRANSACTION, only supp...
Definition: gpsserio.h:904
CFGH cfgh
Definition: gpsserio.h:1562
NTP symm key info, with index.
Definition: gpsdefs.h:15969
TLV structure containing information on current TLV transaction and its current data.
Definition: gpsdefs.h:18403
(rw-) req: uint16_t SV num, SV_ALM, one SV&#39;s almanac
Definition: gpsserio.h:984
(r–) HAVEQUICK_INFO for output, only if GPS_HAS_HAVEQUICK
Definition: gpsserio.h:855
MBG_GPIO_CFG_LIMITS gpio_cfg_limits
Definition: gpsserio.h:1397
Additional parameters for SMPTE ST 2059-2 profile.
Definition: gpsdefs.h:13795
(rw-) HAVEQUICK_SETTINGS for input, only if GPS_HAS_HAVEQUICK
Definition: gpsserio.h:852
uint8_t * cur
points to current pos inside receive buffer
Definition: gpsserio.h:1741
MBG_PTP_V2_PORT_DATASET_IDX ptp_v2_port_dataset_idx
Definition: gpsserio.h:1502
bool dev_has_receiver_info
Definition: gpsserio.h:1986
Information on a specific supported string format.
Definition: gpsdefs.h:3733
int _MBG_API MBG_ASYNC_DATA_RESET_FNC(MBG_MSG_CTL *pmctl)
Type of a callback function to reset handling of spurious asynchronous data bytes.
Definition: gpsserio.h:1964
A structure used to specify a variable frequency.
Definition: gpsdefs.h:7750
(rw-) MBG_DATABASE_INFO_IDX / MBG_DATABASE_SETTINGS_IDX, index 0..MBG_DATABASE_GLB_INFO::num_dbs - 1...
Definition: gpsserio.h:979
(r–) RECEIVER_INFO, model specific info, not supported by very old devices
Definition: gpsserio.h:814
int _MBG_API MBG_NACK_HANDLER_FNC(MBG_MSG_CTL *pmctl)
Type of a callback function to optionally handle NACK messages.
Definition: gpsserio.h:1918
Reference source configuration for a specific priority level.
Definition: gpsdefs.h:6749
MBG_UCAP_NET_RECV_INFO_IDX ucap_net_recv_info_idx
Definition: gpsserio.h:1475
Settings, features and flags for receivers of user captures via network.
Definition: gpsdefs.h:12613
Client settings info of an NTP device.
Definition: gpsdefs.h:16260
HAVEQUICK_SETTINGS havequick_settings
Definition: gpsserio.h:1407
connection via FTDI D2xx USB-To-Serial converter
Definition: gpsserio.h:2055
(rwa) eXtended Binary Packet, only if GPS_HAS_XBP, see eXtended Binary Protocol definitions ...
Definition: gpsserio.h:1008
BVAR_STAT bvar_stat
Definition: gpsserio.h:1355
MBG_USER_SETTINGS_IDX user_settings_idx
Definition: gpsserio.h:1537
A structure used to query current TLV capabilities.
Definition: gpsdefs.h:18263
(r–) XMULTI_REF_INSTANCES, only if GPS_HAS_XMRS_MULT_INSTC
Definition: gpsserio.h:843
(rw-) MBG_UCAP_NET_RECV_INFO_IDX/MBG_UCAP_NET_RECV_SETTINGS_IDX, only supp. if MBG_XFEATURE_UCAP_NET ...
Definition: gpsserio.h:919
int check_transfer(MBG_MSG_RCV_CTL *prctl, uint8_t c)
Check an incoming data stream for a binary message.
MBG_GNSS_MODE_INFO gnss_mode_info
Definition: gpsserio.h:1395
(rw-) MBG_PTP_V1_CURRENT_DATASET, only supp. if PTP_CFG_MSK_HAS_V1_COMMON_DATASETS is set in PTP_CFG_...
Definition: gpsserio.h:951
(r–) XBP_NODE_INFO_IDX, 0..XBP_NODE_LIMITS::node_count-1 instances can be retrieved ...
Definition: gpsserio.h:879
MBG_LNE_PORT_SETTINGS_IDX lne_port_settings_idx
Definition: gpsserio.h:1457
uint16_t ANT_CABLE_LEN
A data type used to configure the length of an antenna cable [m].
Definition: gpsdefs.h:11012
MULTI_REF_STATUS multi_ref_status
Definition: gpsserio.h:1378
(rw-) POUT_SETTINGS_IDX, programmable pulse output settings, only if RECEIVER_INFO::n_prg_out > 0 ...
Definition: gpsserio.h:819
(rwa) SCU_STAT_SETTINGS/SCU_STAT_INFO, SCU board control, only if ::GPS_MODEL_IS_SCU ...
Definition: gpsserio.h:1004
MBG_RAW_IRIG_DATA raw_irig_data
Definition: gpsserio.h:1393
STR_TYPE_INFO_IDX str_type_info_idx
Definition: gpsserio.h:1369
ALM alm
Definition: gpsserio.h:1276
(r–) MBG_NET_INTF_LINK_INFO_IDX, link status, only if MBG_NET_GLB_SUPP_STAGE_2_MASK is set in MBG_NE...
Definition: gpsserio.h:915
A structure to used to query the current configuration and capabilities of a PTP port.
Definition: gpsdefs.h:13342
MBG_EVENT_INFO_IDX event_info_idx
Definition: gpsserio.h:1507
State of FDM device.
Definition: gpsdefs.h:10158
(r–) MBG_FW_INFO_IDX, with index 0 ... MBG_FW_GLB_INFO::installed_fws - 1
Definition: gpsserio.h:973
MBG_USER_STATUS_IDX user_status_idx
Definition: gpsserio.h:1538
int xmt_tbuff(MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr)
Complete message header and transmit message.
LNO_STATE lno_state
Definition: gpsserio.h:1403
double XYZ[N_XYZ]
A position in cartesian coordinates.
Definition: gpsdefs.h:2742
(rw-) MBG_SYSLOG_INFO_IDX / MBG_SYSLOG_SETTINGS_IDX, only supp. if MBG_MONITORING_TYPE_MSK_SYSLOG is ...
Definition: gpsserio.h:971
Ionospheric correction parameters.
Definition: gpsdefs.h:18597
int32_t i32
Definition: gpsserio.h:1348
TZCODE tzcode
Definition: gpsserio.h:1578
MBG_SNMP_V3_TRAP_INFO_IDX snmp_v3_trap_info_idx
Definition: gpsserio.h:1494
(r–) MBG_DEBUG_STATUS, only if GPS_HAS_DEBUG_STATUS
Definition: gpsserio.h:830
Specific FDM settings and limits.
Definition: gpsdefs.h:10316
(rw-) MBG_GPIO_SETTINGS_IDX, settings of a specific port, only if GPS_HAS_GPIO
Definition: gpsserio.h:842
(r–) MBG_GPIO_FREQ, only if MBG_IMS_STATE_FLAG_MSK_HAS_FDM is set in MBG_IMS_STATE::flags ...
Definition: gpsserio.h:888
Index structure for PTPv2 port dataset.
Definition: gpsdefs.h:15073
XYZ xyz
Definition: gpsserio.h:1357
MBG_SERVICE_MGMT_INFO svc_mgmt_info
Definition: gpsserio.h:1540
MSG_HDR hdr
The message header.
Definition: gpsserio.h:1712
A structure used to transmit information on date and time.
Definition: gpsdefs.h:2713
(-w-) Send GPS command as payload, only supp. if MBG_XFEATURE_PUSH_MSGS
Definition: gpsserio.h:957
PTPv2 default dataset.
Definition: gpsdefs.h:14865
Index structure for PTPv1 port dataset.
Definition: gpsdefs.h:14822
MBG_UCAP_NET_GLB_INFO ucap_net_glb_info
Definition: gpsserio.h:1473
(r–) MBG_IMS_FDM_INFO, only if MBG_IMS_STATE_FLAG_MSK_HAS_FDM is set in MBG_IMS_STATE::flags ...
Definition: gpsserio.h:886
(-wa) TTM, current time or capture, or init board time
Definition: gpsserio.h:797
MBG_TIME_SCALE_SETTINGS time_scale_settings
Definition: gpsserio.h:1391
(rw-) MULTI_REF_SETTINGS, only if GPS_HAS_MULTI_REF
Definition: gpsserio.h:821
PTPv2 parent dataset.
Definition: gpsdefs.h:14947
A generic message send and receive control structure.
Definition: gpsserio.h:1972
Generic state of an IMS device.
Definition: gpsdefs.h:9790
MSG_HDR xbp_hdr
Definition: gpsserio.h:1663
(rw-) (customized firmware only)
Definition: gpsserio.h:811
GNSS mode settings.
Definition: gpsdefs.h:10677
(r–) MBG_SERVICE_MGMT_INFO, only supp. if MBG_XFEATURE_SERVICE
Definition: gpsserio.h:966
(-w-) Transmit index of MBG_FW_INFO_IDX to be activated
Definition: gpsserio.h:975
(rw-) NTP_MISC_ORPHAN_MODE_SETTINGS, only if NTP_MISC_MSK_ORPHAN_MODE is set in NTP_MISC_LIMITS::supp...
Definition: gpsserio.h:946
(r–) MBG_IMS_SENSOR_STATE_IDX, only if GPS_HAS_IMS
Definition: gpsserio.h:850
A GPIO port&#39;s current settings, plus port index.
Definition: gpsdefs.h:9184
uint32_t XMR_HOLDOVER_INTV
XMR holdover interval, or elapsed holdover time, in [s].
Definition: gpsdefs.h:7116
MBG_LED_LIMITS led_limits
Definition: gpsserio.h:1459
(r–) NTP_SYMM_KEY_LIMITS, only if NTP_MSK_SYMM_KEYS is set in NTP_SRV_MODE_SETTINGS::flags ...
Definition: gpsserio.h:947
MBG_XFEATURE_BUFFER xfeature_buffer
Definition: gpsserio.h:1452
HAVEQUICK_INFO havequick_info
Definition: gpsserio.h:1408
MBG_NET_GLB_CFG_SETTINGS net_glb_cfg_settings
Definition: gpsserio.h:1428
A binary message received over LAN could not be decrypted.
Definition: gpsserio.h:719
Global configuration info of an NTP device (client/server)
Definition: gpsdefs.h:15246
Limits to be considered when specifying PTP unicast masters.
Definition: gpsdefs.h:14231
MBG_ASYNC_DATA_HANDLER_FNC * async_data_handler_fnc
See mbgextio_register_async_data_callback.
Definition: gpsserio.h:1991
(-w-) Send GPS command as payload, only supp. if MBG_XFEATURE_PUSH_MSGS
Definition: gpsserio.h:958
void * priv_data
Definition: gpsserio.h:2041
MBG_SNMP_V12_TRAP_SETTINGS_IDX snmp_v12_trap_settings_idx
Definition: gpsserio.h:1489
(r–) MBG_TAINTED_CFG, only supp. if MBG_XFEATURE_TAINTED_CFG is set in extended features ...
Definition: gpsserio.h:941
Satellite information for a particular GNSS type.
Definition: gpsdefs.h:10749
GPS_CMD_CODES
Command codes for the binary protocol.
Definition: gpsserio.h:791
Clock resolution information.
Definition: gpsdefs.h:19853
XBP_NODE_INFO_IDX xbp_node_info_idx
Definition: gpsserio.h:1442
NTP_CLNT_MODE_SETTINGS ntp_clnt_mode_settings
Definition: gpsserio.h:1418
(r–) MBG_FW_GLB_INFO, only supp. if MBG_XFEATURE_FW_MNGMNT is set
Definition: gpsserio.h:972
An IPv4 or IPv6 network address, plus index.
Definition: gpsdefs.h:11945
(-w-) MBG_DATABASE_CMD, only supp. if MBG_XFEATURE_DATABASE
Definition: gpsserio.h:980
ROM_CSUM rom_csum
Definition: gpsserio.h:1377
Configuration settings for a specific programmable pulse output.
Definition: gpsdefs.h:6249
MBG_PWR_CTL pwr_ctl
Definition: gpsserio.h:1458
(rw-) XMR_HOLDOVER_INTV, only if ::GPS_MODEL_HAS_XMR_HOLDOVER_INTV, see also GPS_XMR_HOLDOVER_STATUS ...
Definition: gpsserio.h:851
SVNO svno
Definition: gpsserio.h:1285
Structure for monitoring event settings.
Definition: gpsdefs.h:21812
(rw-) MBG_USER_INFO_IDX / MBG_USER_SETTINGS_IDX, index 0 .. MBG_USER_MNGMNT_SETTINGS::num_levels, only supp. if MBG_XFEATURE_USER_MNGMNT
Definition: gpsserio.h:963
Structure containing state information while reading TLV data.
Definition: gpsdefs.h:18330
TZCODE ser
code retrieved via serial binary protocol
Definition: gpsserio.h:1319
A structure used to configure optional settings.
Definition: gpsdefs.h:5323
MBG_DATABASE_SETTINGS_IDX db_settings_idx
Definition: gpsserio.h:1556
int16_t MBG_REF_OFFS
A data type used to configure the ref offset.
Definition: gpsdefs.h:5297
TTM ttm
Definition: gpsserio.h:1356
#define FT_HANDLE
Definition: mbgextio.h:444
MBG_EVENT_STATUS_IDX event_status_idx
Definition: gpsserio.h:1509
MBG_PTP_V2_CURRENT_DATASET ptp_v2_current_dataset
Definition: gpsserio.h:1499
(rw-) MBG_NET_INTF_ADDR_INFO_IDX/MBG_NET_INTF_ADDR_SETTINGS_IDX, only if MBG_NET_GLB_SUPP_STAGE_2_MAS...
Definition: gpsserio.h:912
Global settings, features and flags for user captures via network.
Definition: gpsdefs.h:12493
XBP_NODE_LIMITS xbp_node_limits
Definition: gpsserio.h:1441
uint16_t ROM_CSUM
Definition: gpsdefs.h:10399
uint16_t us
Definition: gpsserio.h:1351
uint16_t IGNORE_LOCK
Definition: gpsdefs.h:10401
MBG_IMS_FDM_SETTINGS fdm_settings
Definition: gpsserio.h:1448
unsigned char uint8_t
Definition: words.h:210
MBG_USER_MNGMNT_SETTINGS user_mngmnt_settings
Definition: gpsserio.h:1535
(rw-) HAVEQUICK_SETTINGS for output, only if GPS_HAS_HAVEQUICK
Definition: gpsserio.h:854
int _MBG_API MBG_ASYNC_DATA_HANDLER_FNC(MBG_MSG_CTL *pmctl, char c)
Type of a callback function to handle spurious asynchronous data bytes.
Definition: gpsserio.h:1948
GNSS_SAT_INFO_IDX gnss_sat_info_idx
Definition: gpsserio.h:1437
(-w-) NANO_TIME_64, set time deviation, only if MBG_IMS_FDM_FLAG_MASK_CAN_SET_TDEV ...
Definition: gpsserio.h:892
IO Port Limits.
Definition: gpsdefs.h:20411
(rw-) MBG_PTP_V2_PORT_DATASET_IDX, only supp. if PTP_CFG_MSK_HAS_V2_COMMON_DATASETS is set in PTP_CFG...
Definition: gpsserio.h:940
Current configuration of an SHS controller.
Definition: gpsdefs.h:17698
NTP orphan mode info.
Definition: gpsdefs.h:16188
(r–) GNSS_SV_STATUS_IDX, only supp. if MBG_GNSS_FLAG_MSK_HAS_SV_STATUS is set
Definition: gpsserio.h:935
NTP_MISC_ORPHAN_MODE_INFO ntp_misc_orphan_mode_info
Definition: gpsserio.h:1520
int decrypt_message(MBG_MSG_CTL *pmctl)
Decrypt an encrypted binary message.
General info on supported XMR sources and instances.
Definition: gpsdefs.h:7054
(r–) SHS_STATUS, only if GPS_HAS_SHS
Definition: gpsserio.h:867
ANT_CABLE_LEN ant_cable_len
Definition: gpsserio.h:1366
#define FT_STATUS
Definition: gpsserio.h:646
(r–) MBG_FW_UFU_INFO_IDX, with index 0 ... MBG_FW_INFO::num_ufus - 1
Definition: gpsserio.h:974
int encrypt_message(MBG_MSG_CTL *pmctl, CRYPT_MSG_PREFIX *pcmp, MBG_MSG_BUFF *pmb)
Encrypt a binary message.
MBG_NET_INTF_ADDR_INFO_IDX net_intf_addr_info_idx
Definition: gpsserio.h:1433
Network host or domain name, plus index.
Definition: gpsdefs.h:12003
IO Port Info Index.
Definition: gpsdefs.h:20862
General LED info to be read from a device.
Definition: gpsdefs.h:18727
XMULTI_REF_INFO_IDX xmulti_ref_info_idx
Definition: gpsserio.h:1386
(rw-) PORT_SETTINGS_IDX, settings for specified serial port, only if RECEIVER_INFO::n_com_ports > 0 ...
Definition: gpsserio.h:817
(rw-) XYZ, current position in ECEF coordinates, only if GPS_MODEL_HAS_POS_XYZ
Definition: gpsserio.h:798
MBG_USER_INFO_IDX user_info_idx
Definition: gpsserio.h:1536
A structure used to control the reception of binary messages.
Definition: gpsserio.h:1734
Structure for monitoring event info.
Definition: gpsdefs.h:21915
(r–) NTP_MISC_LIMITS, only if NTP_MSK_MISCELLANEOUS is set in NTP_GLB_INFO::supp_flags ...
Definition: gpsserio.h:945
Almanac parameters of one specific satellite.
Definition: gpsdefs.h:18486
(r–) POUT_INFO_IDX, programmable pulse output settings and capabilities, only if RECEIVER_INFO::n_pr...
Definition: gpsserio.h:818
NTP_GLB_SETTINGS ntp_glb_settings
Definition: gpsserio.h:1416
MULTI_REF_SETTINGS multi_ref_settings
Definition: gpsserio.h:1375
(rw-) MBG_PTP_V2_TIME_PROPERTIES_DATASET, only supp. if PTP_CFG_MSK_HAS_V2_COMMON_DATASETS is set in ...
Definition: gpsserio.h:939
MBG_IO_PORT_STATUS_IDX iop_status_idx
Definition: gpsserio.h:1482
PCPS_TIME pcps_time
Definition: gpsserio.h:1576
Settings for receivers of user captures via network.
Definition: gpsdefs.h:12560
(r–) MBG_NUM_EVT_LOG_ENTRIES, num. of log entries, only if GPS_HAS_EVT_LOG
Definition: gpsserio.h:845
(r–) MBG_RAW_IRIG_DATA, only if GPS_HAS_RAW_IRIG_DATA
Definition: gpsserio.h:839
(r–) MBG_USER_STATUS for the authenticated user, see MBG_XFEATURE_USER_AUTH
Definition: gpsserio.h:960
MBG_PTP_V2_PARENT_DATASET ptp_v2_parent_dataset
Definition: gpsserio.h:1500
Device power control.
Definition: gpsdefs.h:19192
MBG_DATABASE_INFO_IDX db_info_idx
Definition: gpsserio.h:1557
(rw-) XMULTI_REF_SETTINGS_IDX, idx 0..XMULTI_REF_INSTANCES::n_xmr_settings-1, only if GPS_HAS_XMULTI_...
Definition: gpsserio.h:831
encrypted transmission, usually over network
Definition: gpsserio.h:1807
(rw-) MBG_PTP_V1_TIME_PROPERTIES_DATASET, only supp. if PTP_CFG_MSK_HAS_V1_COMMON_DATASETS is set in ...
Definition: gpsserio.h:953
One of several sets of satellite information for a particular GNSS type.
Definition: gpsdefs.h:10773
(rw-) IGNORE_LOCK, if != 0 always claim to be sync, only if GPS_HAS_IGNORE_LOCK
Definition: gpsserio.h:826
NTP_TRUSTED_KEY_INFO_IDX ntp_trusted_key_info_idx
Definition: gpsserio.h:1515
(rw-) MBG_PTP_V1_DEFAULT_DATASET, only supp. if PTP_CFG_MSK_HAS_V1_COMMON_DATASETS is set in PTP_CFG_...
Definition: gpsserio.h:950
(rw-) MBG_SNMP_GLB_INFO / MBG_SNMP_GLB_SETTINGS, only supp. if MBG_MONITORING_TYPE_MSK_SNMP is set in...
Definition: gpsserio.h:926
ANT_INFO ant_info
Definition: gpsserio.h:1362
(-w-) XMR_QL_SETTINGS, only if XMR_EXT_SRC_FEAT_FLAG_MSK_METRICS
Definition: gpsserio.h:909
MBG_SNMP_V12_TRAP_INFO_IDX snmp_v12_trap_info_idx
Definition: gpsserio.h:1490
int MBG_TIME_MON_TARGET_SETTINGS
Definition: gpsserio.h:676
MBG_ASYNC_MSG_HANDLER_FNC * async_msg_handler_fnc
See mbgextio_register_async_msg_callback.
Definition: gpsserio.h:1990
POUT_INFO_IDX pout_info_idx
Definition: gpsserio.h:1372
Time zone / daylight saving parameters.
Definition: gpsdefs.h:2940
uint32_t device_flags
See MSG_CTL_DEVICE_FLAG_MSKS.
Definition: gpsserio.h:1982
MBG_NET_INTF_ADDR_SETTINGS_IDX net_intf_addr_settings_idx
Definition: gpsserio.h:1434
MBG_CONN_TYPES
Binary message connection types.
Definition: gpsserio.h:2050
MBG_IMS_FDM_LIMITS fdm_limits
Definition: gpsserio.h:1446
(r–) LAN_IF_INFO, only if GPS_HAS_LAN_IP4
Definition: gpsserio.h:999
MBG_UCAP_NET_GLB_SETTINGS ucap_net_glb_settings
Definition: gpsserio.h:1474
MBG_SYSLOG_GLB_SETTINGS syslog_glb_settings
Definition: gpsserio.h:1546
(rw-) MBG_PTP_V2_CURRENT_DATASET, only supp. if PTP_CFG_MSK_HAS_V2_COMMON_DATASETS is set in PTP_CFG_...
Definition: gpsserio.h:937
MBG_PTP_V1_CURRENT_DATASET ptp_v1_current_dataset
Definition: gpsserio.h:1524
int MBG_HANDLE
Definition: mbg_tgt.h:966
MBG_TIME_SCALE_INFO time_scale_info
Definition: gpsserio.h:1390
(r–) MBG_IO_PORT_LIMITS, only supp. if MBG_XFEATURE_IO_PORTS is set in extended features ...
Definition: gpsserio.h:920
(r–) GPS_XMR_METRICS_IDX, only if XMR_EXT_SRC_FEAT_FLAG_MSK_METRICS
Definition: gpsserio.h:907
int MBG_TIME_MON_TARGET_SETTINGS_IDX
Definition: gpsserio.h:677
MBG_MSG_RCV_CTL_BITS
Receive control bits used to define MBG_MSG_RCV_CTL_MASKS.
Definition: gpsserio.h:1758
MBG_IMS_FDM_OUTPUT_SETTINGS_IDX fdm_output_settings_idx
Definition: gpsserio.h:1444
Peer settings for NTP devices.
Definition: gpsdefs.h:16393
GPS_CMD cmd
see GPS_CMD_CODES and GPS_CMD_CTRL_CODES
Definition: gpsserio.h:1333
MBG_STD_MSG std_msg
Encapsulated standard binary message.
Definition: gpsserio.h:1646
Synthesizer configuration parameters.
Definition: gpsdefs.h:2856
Generic state of an IMS sensor, with sensor index.
Definition: gpsdefs.h:9863
(rw-) req: uint16_t SV num, SV_EPH, one SV&#39;s ephemeris
Definition: gpsserio.h:985
Reference source capabilities and current configuration for a specific priority level.
Definition: gpsdefs.h:6839
MSG_DATA msg_data
Standard message data structures.
Definition: gpsserio.h:1717
CORR_INFO corr_info
Definition: gpsserio.h:1579
#define MAX_MSG_DATA_SIZE
Definition: gpsserio.h:1609
Definition: myutil.h:117
A buffer used to read raw IRIG data bits from an IRIG receiver.
Definition: gpsdefs.h:5423
(r–) MBG_USER_STATUS_IDX, index 0 .. MBG_USER_MNGMNT_SETTINGS::num_users, only supp. if MBG_XFEATURE_USER_MNGMNT
Definition: gpsserio.h:964
Status information on a specific GPIO port.
Definition: gpsdefs.h:9317
(r–) MULTI_REF_STATUS, only if GPS_HAS_MULTI_REF
Definition: gpsserio.h:824
ASCII_MSG ascii_msg
Definition: gpsserio.h:1567
GPS ASCII message.
Definition: gpsdefs.h:18619
PTPv1 default dataset containing global information about the device.
Definition: gpsdefs.h:14581
(r–) XMR_HOLDOVER_STATUS, only if XMRIF_MSK_HOLDOVER_STATUS_SUPP, deprecates GPS_XMR_HOLDOVER_ELAPSE...
Definition: gpsserio.h:876
(rw-) RCV_TIMEOUT, [min], only if GPS_HAS_RCV_TIMEOUT
Definition: gpsserio.h:825
(r–) HAVEQUICK_INFO for input, only if GPS_HAS_HAVEQUICK
Definition: gpsserio.h:853
NTP_SYS_STATE ntp_sys_state
Definition: gpsserio.h:1422
(rw-) IRIG_SETTINGS, only if GPS_HAS_IRIG_TX
Definition: gpsserio.h:813
(rw-) reserved for public key LAN interface
Definition: gpsserio.h:1011
A structure initiating a TLV transfer.
Definition: gpsdefs.h:18348
SVNO svno
Definition: gpsserio.h:1353
(r–) XBP_NODE_LIMITS, only if XBP_FEAT_MASK_NODES is set in XBP_LIMITS::features ...
Definition: gpsserio.h:878
int MBG_TIME_MON_TARGET_STATUS_IDX
Definition: gpsserio.h:679
Server settings of an NTP device.
Definition: gpsdefs.h:16413
uint32_t u32
Definition: gpsserio.h:1347
int SSH_DATA
Definition: gpsserio.h:594
(rw-) IONO, GPS ionospheric correction parameters
Definition: gpsserio.h:987
MBG_ASYNC_DATA_RESET_FNC * async_data_reset_fnc
See mbgextio_register_async_data_reset_callback.
Definition: gpsserio.h:1992
(r–) STAT_INFO, satellite info, mode of operation, and DAC info, only if GPS_MODEL_HAS_STAT_INFO ...
Definition: gpsserio.h:806
(rw-) MBG_IMS_FDM_SETTINGS, only if MBG_IMS_STATE_FLAG_MSK_HAS_FDM is set in MBG_IMS_STATE::flags ...
Definition: gpsserio.h:885
PZF correlation status info.
Definition: pcpsdefs.h:1562
(r–) IRIG_INFO, only if GPS_HAS_IRIG_TX
Definition: gpsserio.h:820
(r–) MBG_TIME_MON_TARGET_STATUS_IDX
Definition: gpsserio.h:1026
(rw-) MBG_OPT_SETTINGS, only if GPS_HAS_OPT_SETTINGS
Definition: gpsserio.h:834
MBG_NACK_HANDLER_FNC * nack_handler_fnc
See mbgextio_register_nack_callback.
Definition: gpsserio.h:1989
An SV number plus the SV&#39;s ephemeris data.
Definition: gpsserio.h:1283
POUT_SETTINGS_IDX pout_settings_idx
Definition: gpsserio.h:1373
XMR_STATS_IDX xmr_stats_idx
Definition: gpsserio.h:1453
(rwa) encrypted binary raw packet
Definition: gpsserio.h:1007
An SV number plus the SV&#39;s almanac data.
Definition: gpsserio.h:1273
MBG_SNMP_GLB_INFO snmp_glb_info
Definition: gpsserio.h:1486
(-w-) MBG_TLV_ANNOUNCE, send and announcement for a subsequent TLV, only if MBG_XFEATURE_TLV_API ...
Definition: gpsserio.h:902
MBG_EXT_SYS_INFO ext_sys_info
Definition: gpsserio.h:1462
PORT_INFO_IDX port_info_idx
Definition: gpsserio.h:1370
Current settings and capabilities of a HaveQuick input or output.
Definition: gpsdefs.h:9479
see MBG_MSG_RCV_CTL_BIT_DECRYPT_ERR
Definition: gpsserio.h:1780
(r–) PTP_SMPTE_PROFILE_CFG, only supp. if PTP_CFG_MSK_HAS_SMPTE_TLV_STATE is set in PTP_CFG_INFO::su...
Definition: gpsserio.h:965
A buffer for a message header plus data part.
Definition: gpsserio.h:1710
(r–) MBG_NET_INTF_ROUTE_INFO_IDX, route status, only if MBG_NET_GLB_SUPP_STAGE_2_MASK is set in MBG_...
Definition: gpsserio.h:917
Received message was too long for the message receive buffer.
Definition: gpsserio.h:724
uint16_t SVNO
the number of an SV (Space Vehicle, i.e. satellite)
Definition: gpsdefs.h:696
NTP_SYMM_KEY_SETTINGS_IDX ntp_symm_key_settings_idx
Definition: gpsserio.h:1514
int xfer_mode
transfer mode, see MBG_XFER_MODES
Definition: gpsserio.h:1793
NTP_SRV_MODE_INFO ntp_srv_mode_info
Definition: gpsserio.h:1419
Satellite receiver status information.
Definition: gpsdefs.h:10591
(rw-) IP4_SETTINGS, only if GPS_HAS_LAN_IP4
Definition: gpsserio.h:998
(rw-) MBG_PWR_CTL, set or retrieve device power state, only if MBG_XFEATURE_PWR_CTL_API ...
Definition: gpsserio.h:896
Waiting for a binary message, i.e. no START_OF_HEADER received, yet.
Definition: gpsserio.h:715
MBG_TLV tlv
Definition: gpsserio.h:1465
(r–) CORR_INFO, correlation info, only if GPS_MODEL_IS_DCF_PZF
Definition: gpsserio.h:1018
XMR_QL_INFO_IDX xmr_ql_info_idx
Definition: gpsserio.h:1468
see MBG_MSG_RCV_CTL_BIT_RCVD_HDR
Definition: gpsserio.h:1777
MBG_PTP_V1_TIME_PROPERTIES_DATASET ptp_v1_time_properties_dataset
Definition: gpsserio.h:1526
NTP_REFCLK_STATE_IDX ntp_refclk_state_idx
Definition: gpsserio.h:1529
int MBG_TIME_MON_LIMITS
Definition: gpsserio.h:671
MBG_SYSLOG_GLB_INFO syslog_glb_info
Definition: gpsserio.h:1545
int xmt_cmd_u32(MBG_MSG_CTL *pmctl, const XBP_ADDR *p_addr, GPS_CMD cmd, uint32_t u32)
Send a binary command message with 32 bit parameter.
Software revision information.
Definition: gpsdefs.h:732
A structure used to report XBP features and limits.
Definition: gpsdefs.h:17875
MBG_STD_MSG std_msg
Encapsulated standard message.
Definition: gpsserio.h:1718
Current settings and general capabilities of a specific serial port.
Definition: gpsdefs.h:3677
NTP_GLB_INFO ntp_glb_info
Definition: gpsserio.h:1415
int mbg_ftdi_ft_status_to_mbg(int status)
Translate a FTDI API status code to one of the MBG_ERROR_CODES.
A structure used to query MULTI_REF configuration parameters.
Definition: gpsdefs.h:6586
MBG_IMS_FDM_OUTPUT_STATE_IDX fdm_output_state_idx
Definition: gpsserio.h:1443
XMULTI_REF_INSTANCES xmulti_ref_instances
Definition: gpsserio.h:1400
CSUM msg_hdr_csum(const MSG_HDR *pmh)
Compute the checksum of a binary message header.
(rw-) deprecated, PORT_PARM, use PORT_SETTINGS etc. if GPS_RECEIVER_INFO supported ...
Definition: gpsserio.h:801
MBG_MSG_XMT_CTL xmt
Definition: gpsserio.h:1975
Local calendar date and time, plus sync status.
Definition: pcpsdefs.h:1128
(rw-) MBG_SERVICE_INFO_IDX / MBG_SERVICE_SETTINGS_IDX, index 0 .. MBG_SERVICE_MGMT_INFO::num_services...
Definition: gpsserio.h:967
CSUM hdr_csum
checksum of the preceding header bytes
Definition: gpsserio.h:1336
SVNO svno
Definition: gpsserio.h:1275
NTP_REFCLK_CFG_SETTINGS_IDX ntp_refclk_cfg_settings_idx
Definition: gpsserio.h:1518
(r–) MBG_GPIO_CFG_LIMITS, only if GPS_HAS_GPIO
Definition: gpsserio.h:840
(r–) MBG_IMS_STATE, only if GPS_HAS_IMS
Definition: gpsserio.h:849
double LLA[N_LLA]
A geographic position based on latitude, longitude, and altitude.
Definition: gpsdefs.h:2764
(rw-) TZDL, time zone / daylight saving, only if GPS_MODEL_HAS_TZDL
Definition: gpsserio.h:800
A structure combining all device feature information.
Definition: xdevfeat.h:88
MBG_GPIO_STATUS_IDX gpio_status_idx
Definition: gpsserio.h:1438
int16_t i16
Definition: gpsserio.h:1350
NTP_CLNT_MODE_INFO ntp_clnt_mode_info
Definition: gpsserio.h:1417
Configuration settings of an IRIG input or output.
Definition: gpsdefs.h:4999
MBG_DATABASE_GLB_INFO db_glb_info
Definition: gpsserio.h:1555
(r–) ROM_CSUM, not supported by all devices
Definition: gpsserio.h:823
#define _MBG_API
Definition: mbg_tgt.h:1020
General info to be read from an LNE device.
Definition: gpsdefs.h:18974
(r–) GNSS_SAT_INFO, GLONASS-only satellite info (deprecated by GPS_GNSS_SAT_INFO_IDX) ...
Definition: gpsserio.h:992
(rw-) UTC, GPS UTC correction parameters
Definition: gpsserio.h:986
(rw-) LLA, current position in geographic coordinates, only if GPS_MODEL_HAS_POS_LLA ...
Definition: gpsserio.h:799
(r–) first/oldest MBG_EVT_LOG_ENTRY, only if GPS_HAS_EVT_LOG
Definition: gpsserio.h:846
Query MBG_NET_INTF_ADDR_INFO by its index.
Definition: gpsdefs.h:12244
(r–) NTP_SYS_STATE
Definition: gpsserio.h:864
Current settings and general capabilities of an LED, plus index.
Definition: gpsdefs.h:18936
SHS_SETTINGS shs_settings
Definition: gpsserio.h:1425
MBG_DATABASE_CMD db_cmd
Definition: gpsserio.h:1558
MBG_USER_INFO user_info
Definition: gpsserio.h:1531
Configuration settings for a single LNE port, plus index.
Definition: gpsdefs.h:19061
The header checksum of a received message is invalid.
Definition: gpsserio.h:717
Configuration settings for a single LED, plus index.
Definition: gpsdefs.h:18883
(rw-) NTP_TRUSTED_KEY_INFO_IDX / NTP_TRUSTED_KEY_SETTINGS_IDX, only if NTP_GLB_INFO::max_trusted_keys...
Definition: gpsserio.h:949
MBG_NET_INTF_ROUTE_INFO_IDX net_intf_route_info_idx
Definition: gpsserio.h:1435
MBG_GNSS_MODE_SETTINGS gnss_mode_settings
Definition: gpsserio.h:1396
MBG_EVT_LOG_ENTRY evt_log_entry
Definition: gpsserio.h:1402
I/O error for the specified connection.
Definition: gpsserio.h:721
CSUM data_csum
checksum of the data portion appended after the header
Definition: gpsserio.h:1335
(—) settings and password for LAN interface
Definition: gpsserio.h:1012
MBG_EVENT_VALUE_IDX event_value_idx
Definition: gpsserio.h:1510
STAT_INFO stat_info
Definition: gpsserio.h:1365
MBG_SNMP_V3_INFO_IDX snmp_v3_info_idx
Definition: gpsserio.h:1492
int conn_type
One of the MBG_CONN_TYPES.
Definition: gpsserio.h:1981
PTP_CFG_INFO ptp_cfg_info
Definition: gpsserio.h:1409
GPS_CMD_CTRL_CODES
Control codes to be or&#39;ed with a particular command/type code.
Definition: gpsserio.h:738
An XBP address specifier.
Definition: gpsdefs.h:17861
uint16_t MULTI_REF_STATUS
A data type used to query MULTI_REF status information.
Definition: gpsdefs.h:6601
(r–) MBG_IO_PORT_INFO_IDX, only supp. if MBG_XFEATURE_IO_PORTS is set in extended features and from ...
Definition: gpsserio.h:922
Specific output settings and limits, plus index.
Definition: gpsdefs.h:10066
int buf_size
size of buffer, including header
Definition: gpsserio.h:1792
FDM device settings.
Definition: gpsdefs.h:10262
(r–) ASCII_MSG, the GPS ASCII message
Definition: gpsserio.h:988
MBG_SNMP_V12_INFO_IDX snmp_v12_info_idx
Definition: gpsserio.h:1488
(rw-) MBG_NET_INTF_ROUTE_INFO_IDX/MBG_NET_INTF_ROUTE_SETTINGS_IDX, only if MBG_NET_GLB_SUPP_STAGE_2_M...
Definition: gpsserio.h:913
A binary message has been received successfully.
Definition: gpsserio.h:713
MBG_PTP_V2_TIME_PROPERTIES_DATASET ptp_v2_time_properties_dataset
Definition: gpsserio.h:1501
(r–) MULTI_REF_INFO, only if GPS_HAS_MULTI_REF
Definition: gpsserio.h:822
Antenna status and error at reconnect information.
Definition: gpsdefs.h:3100
MBG_FW_UFU_FLASH_CMD fw_ufu_flash_cmd
Definition: gpsserio.h:1553
MBG_IMS_FDM_STATE fdm_state
Definition: gpsserio.h:1447
(rw-) MBG_PTP_V1_PORT_DATASET_IDX, only supp. if PTP_CFG_MSK_HAS_V1_COMMON_DATASETS is set in PTP_CFG...
Definition: gpsserio.h:954
PTP_UC_MASTER_CFG_LIMITS ptp_uc_master_cfg_limits
Definition: gpsserio.h:1412
MBG_LED_INFO_IDX led_info_idx
Definition: gpsserio.h:1460
MBG_MSG_RCV_CTL_MASKS
Receive control bit masks.
Definition: gpsserio.h:1775
MBG_PTP_V1_PARENT_DATASET ptp_v1_parent_dataset
Definition: gpsserio.h:1525
MBG_MONITORING_LIMITS monitoring_limits
Definition: gpsserio.h:1484
MBG_IO_PORT_TYPE_INFO_IDX iop_type_info_idx
Definition: gpsserio.h:1481
MULTI_REF_INFO multi_ref_info
Definition: gpsserio.h:1376
SHS_STATUS shs_status
Definition: gpsserio.h:1426
RECEIVER_INFO receiver_info
Definition: gpsserio.h:1368
NTP_PEER_STATE_IDX ntp_peer_state_idx
Definition: gpsserio.h:1423
XMR_METRICS_IDX xmr_metrics_idx
Definition: gpsserio.h:1467
MBG_USER_MNGMNT_INFO user_mngmnt_info
Definition: gpsserio.h:1534
XMR_EXT_SRC_INFO_IDX xmr_ext_src_info_idx
Definition: gpsserio.h:1450
MBG_TLV_ANNOUNCE tlv_announce
Definition: gpsserio.h:1464
to device: request acknowledge
Definition: gpsserio.h:740
(r–) MBG_IMS_FDM_STATE, only if MBG_IMS_STATE_FLAG_MSK_HAS_FDM is set in MBG_IMS_STATE::flags ...
Definition: gpsserio.h:884
(rw-) MBG_NET_GLB_CFG_INFO/MBG_NET_GLB_CFG_SETTINGS, only if GPS_HAS_NET_CFG
Definition: gpsserio.h:868
MBG_IMS_STATE ims_state
Definition: gpsserio.h:1404
pthread_mutex_t MBG_MUTEX
Definition: mbgmutex.h:181
XMR_QL_SETTINGS_IDX xmr_ql_settings_idx
Definition: gpsserio.h:1469
XMR_HOLDOVER_INTV xmr_holdover_intv
Definition: gpsserio.h:1406
(rw-) deprecated, use GPS_POUT_INFO_IDX/GPS_POUT_SETTINGS_IDX
Definition: gpsserio.h:807
IGNORE_LOCK ignore_lock
Definition: gpsserio.h:1380
Server settings info of an NTP device.
Definition: gpsdefs.h:16437
The format of a standard binary message.
Definition: gpsserio.h:1631
XBP_ADDR xbp_addr
XBP address of the transmitter or receiver.
Definition: gpsserio.h:1645
General NTP symmetric key limits to be read from a device.
Definition: gpsdefs.h:15859
(rw-) MBG_PTP_V2_DEFAULT_DATASET, only supp. if PTP_CFG_MSK_HAS_V2_COMMON_DATASETS is set in PTP_CFG_...
Definition: gpsserio.h:936
(-w-) Transmit UFU flash instructions MBG_FW_UFU_FLASH_CMD
Definition: gpsserio.h:977
MBG_GPIO_INFO_IDX gpio_info_idx
Definition: gpsserio.h:1398
MBG_SNMP_GLB_SETTINGS snmp_glb_settings
Definition: gpsserio.h:1485
(rw-) MBG_NET_INTF_LINK_INFO_IDX/MBG_NET_INTF_LINK_SETTINGS_IDX, only if MBG_NET_GLB_SUPP_STAGE_2_MAS...
Definition: gpsserio.h:911
MBG_USER_STATUS user_status
Definition: gpsserio.h:1532
see MBG_MSG_RCV_CTL_BIT_MSG_TOO_LONG
Definition: gpsserio.h:1778
ENABLE_FLAGS enable_flags
Definition: gpsserio.h:1364
Current settings and general capabilities of an LNE port, plus index.
Definition: gpsdefs.h:19116
(rw-) MBG_LNE_PORT_SETTINGS_IDX, settings of a specific LED, only if MBG_XFEATURE_LNE_API ...
Definition: gpsserio.h:895
MBG_REF_OFFS ref_offs
Definition: gpsserio.h:1383
(rw-) SHS_INFO/SHS_SETTINGS, only if GPS_HAS_SHS
Definition: gpsserio.h:866
(-w-) no data, let the device reboot itself, only supp. if MBG_XFEATURE_REBOOT
Definition: gpsserio.h:906
unsigned long ulong
Definition: words.h:292
int MBG_TIME_MON_INST_INFO
Definition: gpsserio.h:674
GNSS_SV_STATUS_IDX gnss_sv_status_idx
Definition: gpsserio.h:1496
XMULTI_REF_STATUS_IDX xmulti_ref_status_idx
Definition: gpsserio.h:1387
(r–) PTP_STATE, current PTP status, only if GPS_HAS_PTP
Definition: gpsserio.h:857
int cnt
the number of bytes to be received
Definition: gpsserio.h:1742
MSG_HDR hdr
Message header containing the command code and length of the data portion.
Definition: gpsserio.h:1633
(rw-) MBG_IMS_FDM_OUTPUT_SETTINGS_IDX, only if MBG_IMS_STATE_FLAG_MSK_HAS_FDM is set in MBG_IMS_STATE...
Definition: gpsserio.h:881
A structure used to identify a device type and supported features.
Definition: gpsdefs.h:873
Global configuration settings of an NTP device (client/server)
Definition: gpsdefs.h:15220
PTPv2 current dataset.
Definition: gpsdefs.h:14901
connection via network socket
Definition: gpsserio.h:2053
(rw-) PCPS_TIME, date/time/status, only if GPS_MODEL_IS_DCF_PZF
Definition: gpsserio.h:1015
uint16_t TZCODE
Type of variable to hold a TZ code.
Definition: gpsserio.h:1302
PCPS_TZCODE pci
code retrieved via PCI bus
Definition: gpsserio.h:1320
NTP trusted key settings, with index.
Definition: gpsdefs.h:16009
from device: error evaluating a command
Definition: gpsserio.h:742
(r–) MBG_OPT_INFO, only if GPS_HAS_OPT_SETTINGS
Definition: gpsserio.h:835
(r–) XMR_EXT_SRC_INFO_IDX, only if XMRIF_MSK_EXT_SRC_INFO_SUPP
Definition: gpsserio.h:887
Output state of FDM device plus index.
Definition: gpsdefs.h:9987
Global current network settings and supported features.
Definition: gpsdefs.h:11869
(r–) deprecated, use GPS_RECEIVER_INFO
Definition: gpsserio.h:812
MBG_CLK_RES_INFO mbg_clk_res_info
Definition: gpsserio.h:1471
(rw-) SYNTH, synthesizer settings, only if GPS_HAS_SYNTH
Definition: gpsserio.h:802
General NTP misc limits to be read from a device.
Definition: gpsdefs.h:16101
uint32_t MBG_DEBUG_STATUS
A data type used to read the board&#39;s debug status.
Definition: gpsdefs.h:5204
(r–) MBG_NET_NAME_IDX, DNS status, only if MBG_NET_GLB_CFG_INFO::n_supp_dns_srch_dom > 0 ...
Definition: gpsserio.h:872
(r–) MBG_EVENT_VALUE_IDX, only supp. if MBG_EVENT_INFO::value_dict_entries > 0
Definition: gpsserio.h:956
MBG_FW_INFO_IDX fw_info_idx
Definition: gpsserio.h:1551
NTP symmetric key settings, with index.
Definition: gpsdefs.h:15926
Simple LAN interface information.
Definition: gpsdefs.h:11274
MBG_PTP_V1_DEFAULT_DATASET ptp_v1_default_dataset
Definition: gpsserio.h:1523
(r–) IP4_SETTINGS, only if GPS_HAS_LAN_IP4
Definition: gpsserio.h:1000
(rw-) MBG_USER_MNGMNT_INFO / MBG_USER_MNGMNT_SETTINGS, only supp. if MBG_XFEATURE_USER_MNGMNT ...
Definition: gpsserio.h:961
(r–) MBG_NET_GLB_CFG_INFO, network status, only if MBG_NET_GLB_SUPP_STAGE_2_MASK is set in MBG_NET_G...
Definition: gpsserio.h:914
TZDL tzdl
Definition: gpsserio.h:1359
A structure controlling when output signals are enabled.
Definition: gpsdefs.h:3142
Current settings and general capabilities of a specific programmable pulse output.
Definition: gpsdefs.h:6351
(rw-) NAV_ENGINE_SETTINGS, only if GPS_HAS_NAV_ENGINE_SETTINGS
Definition: gpsserio.h:838
A union of all data types used with the binary protocol.
Definition: gpsserio.h:1345
(rw-) TR_DISTANCE, dist. from transmitter [km], only if GPS_MODEL_IS_DCF_PZF
Definition: gpsserio.h:1016
MBG_MSG_RCV_CTL rcv
Definition: gpsserio.h:1974
uint16_t RCV_TIMEOUT
Definition: gpsdefs.h:10400
LAN_IF_INFO lan_if_info
Definition: gpsserio.h:1570
MBG_LNE_LIMITS lne_limits
Definition: gpsserio.h:1455
UTC utc
Definition: gpsserio.h:1565
MBG_TMO_TIME tstamp
time when the first byte of the packet was received
Definition: gpsserio.h:1745
uint32_t u32
Definition: lan_util.c:100