mbgtools-lx  4.2.8
pcpsdefs.h
Go to the documentation of this file.
1 
2 /**************************************************************************
3  *
4  * $Id: pcpsdefs.h 1.64 2018/06/25 12:34:23 martin REL_M $
5  *
6  * Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
7  *
8  * Description:
9  * General definitions for Meinberg plug-in devices.
10  *
11  * -----------------------------------------------------------------------
12  * $Log: pcpsdefs.h $
13  * Revision 1.64 2018/06/25 12:34:23 martin
14  * Fixed spelling inside a comment.
15  * Revision 1.63 2018/02/28 16:57:38Z martin
16  * Replace references to frac_sec_from_bin() to bin_frac_32_to_dec_frac().
17  * Revision 1.62 2017/07/04 16:24:53 martin
18  * Moved definitions PCPS_HRT_FRAC_SCALE and PCPS_HRT_FRAC_SCALE_FMT
19  * back here.
20  * New types PCPS_SECONDS and PCPS_FRAC_32.
21  * Fixed typo, wording, and doxygen comments.
22  * Revision 1.61 2017/04/25 11:38:38 martin
23  * Renamed GRC181PEX to GNS181PEX.
24  * Revision 1.60 2017/03/17 12:00:05 martin
25  * Moved definitions of PCPS_HRT_FRAC_CONVERSION_TYPE,
26  * PCPS_HRT_BIN_FRAC_SCALE, and PCPS_HRT_FRAC_SCALE_FMT
27  * to cfg_hlp.h.
28  * Revision 1.59 2017/01/27 08:11:19 martin
29  * Fixed macro syntax.
30  * Revision 1.58 2016/11/08 16:42:52 martin
31  * New GPS cmd codes PC_GPS_XFEATURE_BUFFER and PC_GPS_TLV_INFO.
32  * Revision 1.57 2016/11/08 16:40:39 martin
33  * Doxygen cleanup.
34  * Revision 1.56 2016/10/26 13:22:41 martin
35  * Added definitions for GRC181PEX.
36  * New symbol IRIG_TIME_UNKNOWN_YEAR.
37  * Removed trailing spaces.
38  * Updated doxygen comments.
39  * Revision 1.55 2014/07/17 10:52:24 martin
40  * Increased safety of firmware builds.
41  * Revision 1.54 2014/07/17 09:54:19 martin
42  * New command codes PC_GPS_XMR_HOLDOVER_STATUS
43  * and PC_GPS_ALL_GPIO_STATUS.
44  * Huge update and cleanup on doxygen comments.
45  * Revision 1.53 2014/05/27 10:13:20 martin
46  * Support GPS180AMC.
47  * Moved some signal constant definitions to pcpsdefs.h.
48  * Simplified declaration of code/name tables.
49  * Huge rework of comments in doxygen format.
50  * Revision 1.52 2013/09/26 09:02:52Z martin
51  * Support GNSS API.
52  * Updated doxygen comments.
53  * Revision 1.51 2013/06/25 09:51:39 martin
54  * Support GLN180PEX.
55  * Revision 1.50 2013/01/30 15:59:54 martin
56  * Updated and fixed some doxygen comments.
57  * Revision 1.49 2012/10/02 18:53:02 martin
58  * Added structure PCPS_TIME_STATUS_X_MASKS.
59  * Added initializer for command names, useful for debugging.
60  * Revision 1.48 2011/11/25 15:02:28 martin
61  * Support on-board event logs.
62  * Revision 1.47 2011/11/25 10:22:44 martin
63  * Modified handling of pragma pack().
64  * Made command group codes obsolete. They are still supported
65  * when building firmware, though.
66  * Support PTP unicast configuration.
67  * Support GPIO configuration.
68  * Support PZF180PEX.
69  * Added commands to read CORR_INFO, read/write TR_DISTANCE,
70  * PCPS_SYNC_PZF status, and associated structures.
71  * Added an initializer for a table of GPS command code/names.
72  * Added definitions MBG_PCPS_FMT_STATUS.
73  * Updated some comments.
74  * Revision 1.46 2011/01/13 11:44:29Z martin
75  * Moved status port register definitions here.
76  * Revision 1.45 2010/09/06 07:36:24 martin
77  * Support GPS180PEX and TCR180PEX.
78  * Moved some IRIG related definitions to gpsdefs.h.
79  * Revision 1.44 2010/06/30 11:09:49 martin
80  * Added definitions for JJY longwave transmitter.
81  * Renamed MBG_RAW_IRIG_DATA::data field to data_bytes
82  * since "data" is a reserved word for C51 architecture.
83  * Revision 1.43 2010/02/09 11:20:17Z martin
84  * Renamed yet unused CORR_INFO::flags field to signal and updated comments.
85  * Revision 1.42 2010/01/12 14:02:37 daniel
86  * Added definitions to support reading the raw IRIG data bits.
87  * Revision 1.41 2009/06/19 12:16:42Z martin
88  * Added PCPS_GIVE_IRIG_TIME command and associated definitions.
89  * Revision 1.40 2009/06/08 19:29:11 daniel
90  * Support PTP configuration.
91  * Support LAN_IF configuration
92  * Added definition of PCPS_CMD_INFO.
93  * Revision 1.39 2009/03/19 08:58:09 martin
94  * Added PCPS_GET_IRIG_CTRL_BITS cmd and associated data type.
95  * Revision 1.38 2009/03/10 17:07:09 martin
96  * Support configurable time scales and GPS UTC parameters.
97  * Added ext. status flag for time scales, and PCPS_LS_ANN_NEG.
98  * Added bit mask PCPS_SCALE_MASK.
99  * Revision 1.37 2008/12/05 16:01:37Z martin
100  * Added ref types PTP, FRC, and WWVB.
101  * Added ref names MSF, PTP, FRC, and WWVB.
102  * Added device codes TCR170PEX, PTP270PEX, and FRC511PEX.
103  * Added macros to convert the endianess of structures.
104  * Moved definitions of PCPS_HRT_FRAC_SCALE and
105  * PCPS_HRT_FRAC_SCALE_FMT here.
106  * Added definitions of PCPS_HRT_FRAC_CONVERSION_TYPE
107  * and PCPS_HRT_BIN_FRAC_SCALE.
108  * Escaped '<' and '>' characters for doxygen.
109  * Modified comments for PCPS_TZDL.
110  * Removed trailing spaces and obsolete comments.
111  * Revision 1.36 2008/01/17 09:20:25Z daniel
112  * Added new REF type PCPS_REF_MSF.
113  * Revision 1.35 2008/01/17 09:18:46Z daniel
114  * Made comments compatible for doxygen parser.
115  * No sourcecode changes.
116  * Revision 1.34 2007/07/17 08:22:47Z martin
117  * Added support for TCR511PEX and GPS170PEX.
118  * Revision 1.33 2007/05/20 21:39:51Z martin
119  * Added support for PEX511.
120  * Added PCPS_GET_STATUS_PORT cmd code for devices
121  * that do not support a hardware status port.
122  * Revision 1.32 2007/03/29 12:57:32Z martin
123  * Renamed some TZCODE numbers for unique naming conventions.
124  * Added definitions of the older symbols for compatibility.
125  * Revision 1.31 2007/03/26 15:42:31Z martin
126  * Replaced PCPS_REF_OFFS and associated definitions by MBG_REF_OFFS, etc.,
127  * which are defined in gpsdefs.h.
128  * Added PCPS_GET_DEBUG_STATUS code.
129  * Revision 1.30 2006/06/29 10:13:13 martin
130  * Added some descriptive comments.
131  * Revision 1.29 2006/06/14 12:59:12Z martin
132  * Added support for TCR511PCI.
133  * Revision 1.28 2006/05/18 09:45:16 martin
134  * Added data types used with PZF receivers.
135  * Revision 1.27 2006/05/03 10:19:14Z martin
136  * Added initializers for reference source names.
137  * Revision 1.26 2006/03/10 10:24:45Z martin
138  * New definitions for PCI511.
139  * Added command codes to configure programmable pulse outputs.
140  * Revision 1.25 2005/11/03 15:05:16Z martin
141  * New definitions for GPS170PCI.
142  * New types PCPS_TIME_STATUS and PCPS_TIME_STATUS_X.
143  * Removed obsolete enumeration of PCPS_TIME fields.
144  * Revision 1.24 2005/05/03 07:56:55Z martin
145  * Added command PCPS_GET_SYNTH_STATE.
146  * Revision 1.23 2005/03/29 12:51:10Z martin
147  * New cmd code PCPS_GENERIC_IO.
148  * Revision 1.22 2004/12/09 11:03:37Z martin
149  * Support configuration of on-board frequency synthesizer.
150  * Revision 1.21 2004/11/09 12:55:32Z martin
151  * Redefined interface data types using C99 fixed-size definitions.
152  * Added workaround macros for some structure sizes because the C166
153  * compiler always reports an even structure size even if the structure
154  * size is in fact odd, which might lead to different sizes in C166 and
155  * other environments.
156  * Modifications were required in order to be able to configure IRIG
157  * settings of cards which provide both IRIG input and output.
158  * The existing codes have been renamed with .._RX.. and are used to
159  * configure the IRIG receiver (input). New codes have been defined
160  * used to configure the IRIG transmitter.
161  * Renamed PC_GPS_STAT to PC_GPS_BVAR_STAT.
162  * Use more specific data types than generic types.
163  * Revision 1.20 2004/10/14 15:01:23 martin
164  * Added support for TCR167PCI.
165  * Revision 1.19 2004/06/16 12:46:33Z martin
166  * Moved OPT_SETTINGS related definitions to gpsdefs.h,
167  * and renamed symbols from PCPS_.. to to MBG_...
168  * Revision 1.18 2004/04/26 14:27:08Z martin
169  * Added union PCPS_TIME_UNION.
170  * Revision 1.17 2003/05/27 08:50:35Z MARTIN
171  * New commands PCPS_GIVE_UCAP_ENTRIES, PCPS_GIVE_UCAP_EVENT
172  * and associated definitions which allow faster reading of
173  * user capture events and monitoring of the capture buffer
174  * fill level.
175  * Revision 1.16 2003/04/03 10:48:53 martin
176  * Support for PCI510, GPS169PCI, and TCR510PCI.
177  * New codes PCPS_GET_REF_OFFS, PCPS_SET_REF_OFFS
178  * and related structures.
179  * New codes PCPS_GET_OPT_INFO, PCPS_SET_OPT_SETTINGS
180  * and related structures.
181  * New codes PCPS_GET_IRIG_INFO, PCPS_SET_IRIG_SETTINGS.
182  * Preliminary PCPS_TZDL structure and cmd codes
183  * to read/write that structure.
184  * Revision 1.15 2002/08/08 13:24:03 MARTIN
185  * Moved definition of ref time sources here.
186  * Added new ref time source IRIG.
187  * Added new cmd to clear time capture buffer.
188  * Fixed some comments.
189  * Revision 1.14 2002/01/31 13:39:38 MARTIN
190  * Added new GPS data type codes for RECEIVER_INFO, etc.
191  * New PCPS_HR_TIME status flag PCPS_IO_BLOCKED.
192  * Moved REV_NUMs defining special features to pcpsdev.h.
193  * Removed obsolete initializer for framing string table.
194  * Updated some comments.
195  * Removed obsolete code.
196  * Revision 1.13 2001/12/03 16:15:14 martin
197  * Introduced PCPS_TIME_STAMP which allows to handle high precision
198  * time stamps.
199  * Replaced the sec/frac fields in PCPS_HR_TIME by PCPS_TIME_STAMP.
200  * This is compatible on byte level but may require source code
201  * modifications.
202  * Introduced new command PCPS_SET_EVENT_TIME which is used
203  * EXCLUSIVELY with a custom GPS firmware.
204  * Revision 1.12 2001/10/16 10:07:42 MARTIN
205  * Defined PCI509 firmware revision number which supports
206  * baud rate higher than standard.
207  * Revision 1.11 2001/03/30 13:02:39 MARTIN
208  * Control alignment of structures from new file use_pack.h.
209  * Defined initializers with valid framing parameters.
210  * Revision 1.10 2001/02/28 15:39:25 MARTIN
211  * Modified preprocessor syntax.
212  * Revision 1.9 2001/02/16 11:32:05 MARTIN
213  * Renamed "PROM" or "EPROM" in comments or and names to
214  * "FW" or firmware.
215  * This includes the cmd codes PCPS_GIVE_PROM_ID_... which have
216  * been renamed to PCPS_GIVE_FW_ID_...
217  * Renamed structure PCPS_TIME_SET to PCPS_STIME.
218  * Renamed return code PCPS_ERR_NONE to PCPS_SUCCESS.
219  * Modified some comments.
220  * Revision 1.8 2000/10/11 09:17:09 MARTIN
221  * Cleaned up comment syntax.
222  * Revision 1.7 2000/07/21 14:16:30 MARTIN
223  * Modified some comments.
224  * Added PCI definitions.
225  * Renamed PCPS_GET_GPS_DATA to PCPS_READ_GPS_DATA.
226  * Renamed PCPS_SET_GPS_DATA to PCPS_WRITE_GPS_DATA.
227  * New types PCPS_SERIAL and PCPS_TZCODE.
228  * Removed PCPS_SERIAL_BYTES and PCPS_TZCODE_BYTES, may use sizeof()
229  * the types instead.
230  * New type PCPS_TIME_SET which can be used to write date and time
231  * to the clock.
232  * Revision 1.6 2000/06/07 12:09:31 MARTIN
233  * renamed PCPS_SERIAL_GROUP to PCPS_CFG_GROUP
234  * renamed PCPS_ERR_SERIAL to PCPS_ERR_CFG
235  * modified definitions for baud rate, framing, and mode
236  * added PCPS_SN_... definitions
237  * added PCPS_GET_TZCODE and PCPS_SET_TZCODE definitions
238  * added PC_GPS_ANT_CABLE_LEN definition
239  * added RCS keywords
240  * updated some comments
241  *
242  * -----------------------------------------------------------------------
243  * Changes before put under RCS control:
244  *
245  * Revision 1.5 2000/03/24
246  * Introduced PCPS_GIVE_SERNUM.
247  * Cleaned up for definitions for serial parameter byte.
248  * Reviewed and updated comments.
249  *
250  * 1998/07/22
251  * Introduced PCPS_HR_TIME.
252  * Rearranged order of definitions.
253  * Reviewed and updated comments.
254  *
255  * 1997/06/12
256  * Added GPS definitions.
257  *
258  * 1996/01/25
259  * PCPS_TIME redefined from an array of bytes to a structure.
260  *
261  **************************************************************************/
262 
263 #ifndef _PCPSDEFS_H
264 #define _PCPSDEFS_H
265 
266 
267 /* Other headers to be included */
268 
269 #include <words.h>
270 #include <use_pack.h>
271 
272 #ifndef _USE_PCPSPRIV
273  #define _USE_PCPSPRIV _IS_MBG_FIRMWARE
274 #endif
275 
276 #if _USE_PCPSPRIV
277  #include <pcpspriv.h>
278 #endif
279 
280 /* Start of header body */
281 
282 #if defined( _USE_PACK )
283  #pragma pack( 1 ) // set byte alignment
284  #define _USING_BYTE_ALIGNMENT
285 #endif
286 
287 
292 {
303 };
304 
305 
313 #define PCPS_REF_NAME_NONE_ENG "unknown"
314 #define PCPS_REF_NAME_NONE_GER "nicht bekannt"
315 #define PCPS_REF_NAME_DCF "DCF77"
316 #define PCPS_REF_NAME_GPS "GPS"
317 #define PCPS_REF_NAME_IRIG "IRIG"
318 #define PCPS_REF_NAME_MSF "MSF"
319 #define PCPS_REF_NAME_PTP "PTP"
320 #define PCPS_REF_NAME_FRC "FRC"
321 #define PCPS_REF_NAME_WWVB "WWVB"
322 #define PCPS_REF_NAME_JJY "JJY"
323 
332 #define PCPS_REF_NAMES_ENG \
333 { \
334  PCPS_REF_NAME_NONE_ENG, \
335  PCPS_REF_NAME_DCF, \
336  PCPS_REF_NAME_GPS, \
337  PCPS_REF_NAME_IRIG, \
338  PCPS_REF_NAME_MSF, \
339  PCPS_REF_NAME_PTP, \
340  PCPS_REF_NAME_FRC, \
341  PCPS_REF_NAME_WWVB, \
342  PCPS_REF_NAME_JJY \
343 }
344 
345 
351 #define PCPS_REF_NAMES_LSTR \
352 { \
353  { PCPS_REF_NAME_NONE_ENG, PCPS_REF_NAME_NONE_GER }, \
354  { PCPS_REF_NAME_DCF, NULL }, \
355  { PCPS_REF_NAME_GPS, NULL }, \
356  { PCPS_REF_NAME_IRIG, NULL }, \
357  { PCPS_REF_NAME_MSF, NULL }, \
358  { PCPS_REF_NAME_PTP, NULL }, \
359  { PCPS_REF_NAME_FRC, NULL }, \
360  { PCPS_REF_NAME_WWVB, NULL }, \
361  { PCPS_REF_NAME_JJY, NULL } \
362 }
363 
364 
365 
371 #define PCI_VENDOR_MEINBERG 0x1360
372 
373 
384 #define PCI_DEV_PCI32 ( ( PCPS_REF_DCF << 8 ) | 0x01 )
385 #define PCI_DEV_PCI509 ( ( PCPS_REF_DCF << 8 ) | 0x02 )
386 #define PCI_DEV_PCI510 ( ( PCPS_REF_DCF << 8 ) | 0x03 )
387 #define PCI_DEV_PCI511 ( ( PCPS_REF_DCF << 8 ) | 0x04 )
388 #define PCI_DEV_PEX511 ( ( PCPS_REF_DCF << 8 ) | 0x05 )
389 #define PCI_DEV_PZF180PEX ( ( PCPS_REF_DCF << 8 ) | 0x06 )
390 
391 #define PCI_DEV_GPS167PCI ( ( PCPS_REF_GPS << 8 ) | 0x01 )
392 #define PCI_DEV_GPS168PCI ( ( PCPS_REF_GPS << 8 ) | 0x02 )
393 #define PCI_DEV_GPS169PCI ( ( PCPS_REF_GPS << 8 ) | 0x03 )
394 #define PCI_DEV_GPS170PCI ( ( PCPS_REF_GPS << 8 ) | 0x04 )
395 #define PCI_DEV_GPS170PEX ( ( PCPS_REF_GPS << 8 ) | 0x05 )
396 #define PCI_DEV_GPS180PEX ( ( PCPS_REF_GPS << 8 ) | 0x06 )
397 #define PCI_DEV_GLN180PEX ( ( PCPS_REF_GPS << 8 ) | 0x07 )
398 #define PCI_DEV_GPS180AMC ( ( PCPS_REF_GPS << 8 ) | 0x08 )
399 #define PCI_DEV_GNS181PEX ( ( PCPS_REF_GPS << 8 ) | 0x09 )
400 
401 #define PCI_DEV_TCR510PCI ( ( PCPS_REF_IRIG << 8 ) | 0x01 )
402 #define PCI_DEV_TCR167PCI ( ( PCPS_REF_IRIG << 8 ) | 0x02 )
403 #define PCI_DEV_TCR511PCI ( ( PCPS_REF_IRIG << 8 ) | 0x03 )
404 #define PCI_DEV_TCR511PEX ( ( PCPS_REF_IRIG << 8 ) | 0x04 )
405 #define PCI_DEV_TCR170PEX ( ( PCPS_REF_IRIG << 8 ) | 0x05 )
406 #define PCI_DEV_TCR180PEX ( ( PCPS_REF_IRIG << 8 ) | 0x06 )
407 
408 #define PCI_DEV_PTP270PEX ( ( PCPS_REF_PTP << 8 ) | 0x01 )
409 
410 #define PCI_DEV_FRC511PEX ( ( PCPS_REF_FRC << 8 ) | 0x01 )
411 
432 
433 
452 #define PCPS_ST_BUSY 0x01
453 #define PCPS_ST_IRQF 0x02
454 #define PCPS_ST_MOD 0x20
455 #define PCPS_ST_SEC 0x40
456 #define PCPS_ST_MIN 0x80
457 
458 
467 #define MBG_PCPS_FMT_STATUS \
468  "\177\20b\0FREER\0b\1DL_ENB\0b\2SYNCD\0b\3DL_ANN\0b\4UTC\0b\5LS_ANN\0b\6IFTM\0b\7INVT" \
469  "\0b\x08LS_ENB\0b\11ANT_FAIL\0b\x0aLS_ANN_NEG\0b\x0bSCALE_GPS\0b\x0cSCALE_TAI\0\0"
470 
471 
472 
712 #define PCPS_GIVE_TIME 0x00
713 #define PCPS_GIVE_TIME_NOCLEAR 0x01
714 #define PCPS_GIVE_SYNC_TIME 0x02
715 #define PCPS_GIVE_HR_TIME 0x03
716 #define PCPS_GIVE_IRIG_TIME 0x04
717 
718 #define PCPS_SET_TIME 0x10
719 
720 #define PCPS_SET_EVENT_TIME 0x14
721 
722 #define PCPS_IRQ_NONE 0x20
723 #define PCPS_IRQ_1_SEC 0x21
724 #define PCPS_IRQ_1_MIN 0x22
725 #define PCPS_IRQ_10_MIN 0x24
726 #define PCPS_IRQ_30_MIN 0x28
727 
728 #define PCPS_GET_SERIAL 0x30
729 #define PCPS_SET_SERIAL 0x31
730 
731 #define PCPS_GET_TZCODE 0x32
732 #define PCPS_SET_TZCODE 0x33
733 
734 #define PCPS_GET_PCPS_TZDL 0x34
735 #define PCPS_SET_PCPS_TZDL 0x35
736 
737 #define PCPS_GET_REF_OFFS 0x36
738 #define PCPS_SET_REF_OFFS 0x37
739 
740 #define PCPS_GET_OPT_INFO 0x38
741 #define PCPS_SET_OPT_SETTINGS 0x39
742 
743 #define PCPS_GET_IRIG_RX_INFO 0x3A
744 #define PCPS_SET_IRIG_RX_SETTINGS 0x3B
745 
746 #define PCPS_GET_IRIG_TX_INFO 0x3C
747 #define PCPS_SET_IRIG_TX_SETTINGS 0x3D
748 
749 #define PCPS_GET_SYNTH 0x3E
750 #define PCPS_SET_SYNTH 0x3F
751 
752 #define PCPS_GIVE_FW_ID_1 0x40
753 #define PCPS_GIVE_FW_ID_2 0x41
754 #define PCPS_GIVE_SERNUM 0x42
755 #define PCPS_GENERIC_IO 0x43
756 #define PCPS_GET_SYNTH_STATE 0x44
757 #define PCPS_GET_IRIG_CTRL_BITS 0x45
758 #define PCPS_GET_RAW_IRIG_DATA 0x46
759 
760 #define PCPS_GET_STATUS_PORT 0x4B
761 #define PCPS_GET_DEBUG_STATUS 0x4C
762 
763 
765 #define PCPS_READ_GPS_DATA 0x50
766 #define PCPS_WRITE_GPS_DATA 0x51
767 
768 #define PCPS_CLR_UCAP_BUFF 0x60
769 #define PCPS_GIVE_UCAP_ENTRIES 0x61
770 #define PCPS_GIVE_UCAP_EVENT 0x62
771 
772 #define PCPS_GET_CORR_INFO 0x63
773 #define PCPS_GET_TR_DISTANCE 0x64
774 #define PCPS_SET_TR_DISTANCE 0x65
775 
776 #define PCPS_CLR_EVT_LOG 0x66
777 #define PCPS_NUM_EVT_LOG_ENTRIES 0x67
778 #define PCPS_FIRST_EVT_LOG_ENTRY 0x68
779 #define PCPS_NEXT_EVT_LOG_ENTRY 0x69
780 
781 #define PCPS_FORCE_RESET 0x80
782 
783 
789 #if _IS_MBG_FIRMWARE
790 
801 #define PCPS_GIVE_TIME_GROUP 0x00
802 #define PCPS_SET_TIME_GROUP 0x10
803 #define PCPS_IRQ_GROUP 0x20
804 #define PCPS_CFG_GROUP 0x30
805 #define PCPS_GIVE_DATA_GROUP 0x40
806 #define PCPS_GPS_DATA_GROUP 0x50
807 #define PCPS_CTRL_GROUP 0x60
808 #define PCPS_CFG2_GROUP 0x70
809 
812 #endif // _IS_MBG_FIRMWARE
813 
814 
815 
816 #if !defined( MBG_CMD_TABLE_EXT )
817  #define MBG_CMD_TABLE_EXT _mbg_cn_table_end()
818 #endif
819 
828 #define PCPS_CMD_CODES_TABLE \
829 { \
830  _mbg_cn_table_entry( PCPS_GIVE_TIME ), /* 0x00 */ \
831  _mbg_cn_table_entry( PCPS_GIVE_TIME_NOCLEAR ), /* 0x01 */ \
832  _mbg_cn_table_entry( PCPS_GIVE_SYNC_TIME ), /* 0x02 */ \
833  _mbg_cn_table_entry( PCPS_GIVE_HR_TIME ), /* 0x03 */ \
834  _mbg_cn_table_entry( PCPS_GIVE_IRIG_TIME ), /* 0x04 */ \
835  _mbg_cn_table_entry( PCPS_SET_TIME ), /* 0x10 */ \
836  _mbg_cn_table_entry( PCPS_SET_EVENT_TIME ), /* 0x14 */ \
837  _mbg_cn_table_entry( PCPS_IRQ_NONE ), /* 0x20 */ \
838  _mbg_cn_table_entry( PCPS_IRQ_1_SEC ), /* 0x21 */ \
839  _mbg_cn_table_entry( PCPS_IRQ_1_MIN ), /* 0x22 */ \
840  _mbg_cn_table_entry( PCPS_IRQ_10_MIN ), /* 0x24 */ \
841  _mbg_cn_table_entry( PCPS_IRQ_30_MIN ), /* 0x28 */ \
842  _mbg_cn_table_entry( PCPS_GET_SERIAL ), /* 0x30 */ \
843  _mbg_cn_table_entry( PCPS_SET_SERIAL ), /* 0x31 */ \
844  _mbg_cn_table_entry( PCPS_GET_TZCODE ), /* 0x32 */ \
845  _mbg_cn_table_entry( PCPS_SET_TZCODE ), /* 0x33 */ \
846  _mbg_cn_table_entry( PCPS_GET_PCPS_TZDL ), /* 0x34 */ \
847  _mbg_cn_table_entry( PCPS_SET_PCPS_TZDL ), /* 0x35 */ \
848  _mbg_cn_table_entry( PCPS_GET_REF_OFFS ), /* 0x36 */ \
849  _mbg_cn_table_entry( PCPS_SET_REF_OFFS ), /* 0x37 */ \
850  _mbg_cn_table_entry( PCPS_GET_OPT_INFO ), /* 0x38 */ \
851  _mbg_cn_table_entry( PCPS_SET_OPT_SETTINGS ), /* 0x39 */ \
852  _mbg_cn_table_entry( PCPS_GET_IRIG_RX_INFO ), /* 0x3A */ \
853  _mbg_cn_table_entry( PCPS_SET_IRIG_RX_SETTINGS ), /* 0x3B */ \
854  _mbg_cn_table_entry( PCPS_GET_IRIG_TX_INFO ), /* 0x3C */ \
855  _mbg_cn_table_entry( PCPS_SET_IRIG_TX_SETTINGS ), /* 0x3D */ \
856  _mbg_cn_table_entry( PCPS_GET_SYNTH ), /* 0x3E */ \
857  _mbg_cn_table_entry( PCPS_SET_SYNTH ), /* 0x3F */ \
858  _mbg_cn_table_entry( PCPS_GIVE_FW_ID_1 ), /* 0x40 */ \
859  _mbg_cn_table_entry( PCPS_GIVE_FW_ID_2 ), /* 0x41 */ \
860  _mbg_cn_table_entry( PCPS_GIVE_SERNUM ), /* 0x42 */ \
861  _mbg_cn_table_entry( PCPS_GENERIC_IO ), /* 0x43 */ \
862  _mbg_cn_table_entry( PCPS_GET_SYNTH_STATE ), /* 0x44 */ \
863  _mbg_cn_table_entry( PCPS_GET_IRIG_CTRL_BITS ), /* 0x45 */ \
864  _mbg_cn_table_entry( PCPS_GET_RAW_IRIG_DATA ), /* 0x46 */ \
865  _mbg_cn_table_entry( PCPS_GET_STATUS_PORT ), /* 0x4B */ \
866  _mbg_cn_table_entry( PCPS_GET_DEBUG_STATUS ), /* 0x4C */ \
867  _mbg_cn_table_entry( PCPS_READ_GPS_DATA ), /* 0x50 */ \
868  _mbg_cn_table_entry( PCPS_WRITE_GPS_DATA ), /* 0x51 */ \
869  _mbg_cn_table_entry( PCPS_CLR_UCAP_BUFF ), /* 0x60 */ \
870  _mbg_cn_table_entry( PCPS_GIVE_UCAP_ENTRIES ), /* 0x61 */ \
871  _mbg_cn_table_entry( PCPS_GIVE_UCAP_EVENT ), /* 0x62 */ \
872  _mbg_cn_table_entry( PCPS_GET_CORR_INFO ), /* 0x63 */ \
873  _mbg_cn_table_entry( PCPS_GET_TR_DISTANCE ), /* 0x64 */ \
874  _mbg_cn_table_entry( PCPS_SET_TR_DISTANCE ), /* 0x65 */ \
875  _mbg_cn_table_entry( PCPS_CLR_EVT_LOG ), /* 0x66 */ \
876  _mbg_cn_table_entry( PCPS_NUM_EVT_LOG_ENTRIES ), /* 0x67 */ \
877  _mbg_cn_table_entry( PCPS_FIRST_EVT_LOG_ENTRY ), /* 0x68 */ \
878  _mbg_cn_table_entry( PCPS_NEXT_EVT_LOG_ENTRY ), /* 0x69 */ \
879  _mbg_cn_table_entry( PCPS_FORCE_RESET ), /* 0x80 */ \
880  MBG_CMD_TABLE_EXT, \
881  _mbg_cn_table_end() \
882 }
883 
884 
885 
894 #define PCPS_SUCCESS 0
895 #define PCPS_ERR_STIME -1
896 #define PCPS_ERR_CFG -2
897 
898 
902 #if !defined( BITMASK )
903  #define BITMASK( b ) ( ( 1 << b ) - 1 )
904 #endif
905 
906 
908 #define PCPS_FIFO_SIZE 16
909 
912 
913 
915 #define PCPS_ID_SIZE ( 2 * PCPS_FIFO_SIZE + 1 )
916 
917 
918 typedef char PCPS_ID_STR[PCPS_ID_SIZE];
919 
920 
922 #define PCPS_SN_SIZE ( PCPS_FIFO_SIZE + 1 )
923 
924 
925 typedef char PCPS_SN_STR[PCPS_SN_SIZE];
926 
927 
936 typedef uint32_t PCPS_SECONDS;
937 
938 #define _mbg_swab_pcps_seconds( _p ) \
939 do \
940 { \
941  _mbg_swab32( _p ); \
942 } while ( 0 )
943 
944 
945 
959 typedef uint32_t PCPS_FRAC_32;
960 
961 #define _mbg_swab_pcps_frac_32( _p ) \
962 do \
963 { \
964  _mbg_swab32( _p ); \
965 } while ( 0 )
966 
967 
968 
972 typedef struct
973 {
976 
978 
979 #define _mbg_swab_pcps_time_stamp( _p ) \
980 do \
981 { \
982  _mbg_swab_pcps_seconds( &(_p)->sec ); \
983  _mbg_swab_pcps_frac_32( &(_p)->frac ); \
984 } while ( 0 )
985 
986 
987 
988 #ifndef PCPS_HRT_FRAC_SCALE
989 
996  #define PCPS_HRT_FRAC_SCALE 10000000UL
997 #endif
998 
999 #ifndef PCPS_HRT_FRAC_SCALE_FMT
1000 
1008  #define PCPS_HRT_FRAC_SCALE_FMT "%07lu"
1009 #endif
1010 
1011 
1012 
1023 
1024 #define _mbg_swab_pcps_time_status_x( _p ) _mbg_swab16( _p )
1025 
1026 
1027 typedef struct
1028 {
1031 
1033 
1034 #define _mbg_swab_pcps_time_status_x_masks( _p ) \
1035 do \
1036 { \
1037  _mbg_swab_pcps_time_status_x( &(_p)->set_mask ); \
1038  _mbg_swab_pcps_time_status_x( &(_p)->clr_mask ); \
1039 } while ( 0 )
1040 
1041 
1042 
1052 
1053 // The following constants are used to draw a signal bar
1054 // depending on a DCF77 clock's signal value:
1055 #define PCPS_SIG_BIAS 55
1056 #define PCPS_SIG_ERR 1
1057 #define PCPS_SIG_MIN 20
1058 #define PCPS_SIG_MAX 68
1059 
1060 // These constants are used by non-DCF77 devices to indicate
1061 // if an input signal is available or not:
1062 #define PCPS_SIG_LVL_SIG_NOT_AVAIL 0
1063 #define PCPS_SIG_LVL_SIG_AVAIL 128
1064 
1085 typedef struct
1086 {
1088  int32_t utc_offs;
1091 
1092 } PCPS_HR_TIME;
1093 
1094 #define _mbg_swab_pcps_hr_time( _p ) \
1095 do \
1096 { \
1097  _mbg_swab_pcps_time_stamp( &(_p)->tstamp ); \
1098  _mbg_swab32( &(_p)->utc_offs ); \
1099  _mbg_swab_pcps_time_status_x( &(_p)->status ); \
1100 } while ( 0 )
1101 
1102 
1113 
1114 
1115 
1128 typedef struct
1129 {
1134 
1139 
1143 
1144 } PCPS_TIME;
1145 
1146 
1147 
1156 typedef struct
1157 {
1162 
1167 
1169 
1170 } PCPS_STIME;
1171 
1172 #ifdef _C166
1173  // This is a workaround to specify some structure sizes. The C166 compiler
1174  // always reports an even structure size although the structure size may
1175  // be odd due to the number of bytes. This might lead to errors between
1176  // the C166 and other build environments.
1177  #define sizeof_PCPS_TIME ( sizeof( PCPS_TIME ) - 1 )
1178  #define sizeof_PCPS_STIME ( sizeof( PCPS_STIME ) - 1 )
1179 #else
1180  #define sizeof_PCPS_TIME sizeof( PCPS_TIME )
1181  #define sizeof_PCPS_STIME sizeof( PCPS_STIME )
1182 #endif
1183 
1184 typedef union
1185 {
1188 
1189 } PCPS_TIME_UNION;
1190 
1191 
1192 
1207 typedef struct
1208 {
1217  PCPS_SIG_VAL signal;
1220 
1221 } PCPS_IRIG_TIME;
1222 
1223 #define _mbg_swab_pcps_irig_time( _p ) \
1224 do \
1225 { \
1226  _mbg_swab_pcps_time_status_x( &(_p)->status ); \
1227  _mbg_swab16( &(_p)->offs_utc ); \
1228  _mbg_swab16( &(_p)->yday ); \
1229  _mbg_swab16( &(_p)->frac ); \
1230 } while ( 0 )
1231 
1232 
1238 #define IRIG_TIME_UNKNOWN_YEAR 0xFF
1239 
1240 
1241 
1253 {
1254  PCPS_FREER = 0x01,
1255  PCPS_DL_ENB = 0x02,
1256  PCPS_SYNCD = 0x04,
1257  PCPS_DL_ANN = 0x08,
1258  PCPS_UTC = 0x10,
1259  PCPS_LS_ANN = 0x20,
1260  PCPS_IFTM = 0x40,
1261  PCPS_INVT = 0x80
1262 };
1263 
1264 
1271 {
1272  PCPS_LS_ENB = 0x0100,
1273  PCPS_ANT_FAIL = 0x0200,
1274  PCPS_LS_ANN_NEG = 0x0400,
1275  PCPS_SCALE_GPS = 0x0800,
1276  PCPS_SCALE_TAI = 0x1000,
1277 
1280 
1287  PCPS_SYNC_PZF = 0x2000,
1288 
1300 };
1301 
1302 
1303 
1308 #define PCPS_SCALE_MASK ( PCPS_SCALE_TAI | PCPS_SCALE_GPS )
1309 
1310 
1343 
1344 
1356 {
1365 };
1366 
1367 #define PCPS_BD_BITS 4
1368 #define PCPS_BD_SHIFT 0
1369 
1370 
1371 
1384 {
1390 };
1391 
1392 #define PCPS_FR_BITS 2
1393 #define PCPS_FR_SHIFT PCPS_BD_BITS
1394 
1395 
1396 
1408 {
1414 };
1415 
1416 #define PCPS_MOD_BITS 2
1417 #define PCPS_MOD_SHIFT ( PCPS_BD_BITS + PCPS_FR_BITS )
1418 
1419 
1433 
1434 
1439 {
1445 };
1446 
1447 /* the definitions below are for compatibily only: */
1448 #define PCPS_TZCODE_MEZMESZ PCPS_TZCODE_CET_CEST
1449 #define PCPS_TZCODE_MEZ PCPS_TZCODE_CET
1450 #define PCPS_TZCODE_OEZ PCPS_TZCODE_EET_EEST
1451 
1452 
1461 typedef struct
1462 {
1468 
1469 } PCPS_DL_ONOFF;
1470 
1471 #define _mbg_swab_pcps_dl_onoff( _p ) \
1472 do \
1473 { \
1474  _mbg_swab16( &(_p)->year_or_wday ); \
1475 } while ( 0 )
1476 
1492 #define DL_AUTO_FLAG 0x8000 // also defined in gpsdefs.h
1493 
1494 
1504 typedef struct
1505 {
1510 
1511 } PCPS_TZDL;
1512 
1513 #define _mbg_swab_pcps_tzdl( _p ) \
1514 do \
1515 { \
1516  _mbg_swab16( &(_p)->offs ); \
1517  _mbg_swab16( &(_p)->offs_dl ); \
1518  _mbg_swab_pcps_dl_onoff( &(_p)->tm_on ); \
1519  _mbg_swab_pcps_dl_onoff( &(_p)->tm_off ); \
1520 } while ( 0 )
1521 
1522 
1523 
1529 typedef struct
1530 {
1531  uint32_t used;
1532  uint32_t max;
1533 
1535 
1536 #define _mbg_swab_pcps_ucap_entries( _p ) \
1537 do \
1538 { \
1539  _mbg_swab32( &(_p)->used ); \
1540  _mbg_swab32( &(_p)->max ); \
1541 } while ( 0 )
1542 
1543 
1544 
1554 
1555 #define _mbg_swab_tr_distance( _p ) \
1556  _mbg_swab16( _p )
1557 
1558 
1562 typedef struct
1563 {
1566  char corr_dir;
1568 
1569 } CORR_INFO;
1570 
1571 #define _mbg_swab_corr_info( _p ) \
1572  _nop_macro_fnc()
1573 
1574 
1579 {
1584 };
1585 
1586 
1587 #define PZF_CORR_STATE_NAME_RAW_ENG "Searching"
1588 #define PZF_CORR_STATE_NAME_CHECK_ENG "Correlating"
1589 #define PZF_CORR_STATE_NAME_FINE_ENG "Locked"
1590 
1591 #define PZF_CORR_STATE_NAME_RAW_GER "suchen"
1592 #define PZF_CORR_STATE_NAME_CHECK_GER "korrelieren"
1593 #define PZF_CORR_STATE_NAME_FINE_GER "eingerastet"
1594 
1595 
1596 #define PZF_CORR_STATE_NAMES_ENG \
1597 { \
1598  PZF_CORR_STATE_NAME_RAW_ENG, \
1599  PZF_CORR_STATE_NAME_CHECK_ENG, \
1600  PZF_CORR_STATE_NAME_FINE_ENG \
1601 }
1602 
1603 
1604 #define PZF_CORR_STATE_NAMES_LSTR \
1605 { \
1606  { PZF_CORR_STATE_NAME_RAW_ENG, PZF_CORR_STATE_NAME_RAW_GER }, \
1607  { PZF_CORR_STATE_NAME_CHECK_ENG, PZF_CORR_STATE_NAME_CHECK_GER }, \
1608  { PZF_CORR_STATE_NAME_FINE_ENG, PZF_CORR_STATE_NAME_FINE_GER } \
1609 }
1610 
1634 {
1643 
1652 
1661 
1670 
1679 
1683 
1684  // GPS data
1685  PC_GPS_CFGH = 0x80,
1691 };
1692 
1693 
1694 
1703 #define PC_GPS_CMD_CODES_TABLE \
1704 { \
1705  _mbg_cn_table_entry( PC_GPS_TZDL ), \
1706  _mbg_cn_table_entry( PC_GPS_SW_REV ), \
1707  _mbg_cn_table_entry( PC_GPS_BVAR_STAT ), \
1708  _mbg_cn_table_entry( PC_GPS_TIME ), \
1709  _mbg_cn_table_entry( PC_GPS_POS_XYZ ), \
1710  _mbg_cn_table_entry( PC_GPS_POS_LLA ), \
1711  _mbg_cn_table_entry( PC_GPS_PORT_PARM ), \
1712  _mbg_cn_table_entry( PC_GPS_ANT_INFO ), \
1713  _mbg_cn_table_entry( PC_GPS_UCAP ), \
1714  _mbg_cn_table_entry( PC_GPS_ENABLE_FLAGS ), \
1715  _mbg_cn_table_entry( PC_GPS_STAT_INFO ), \
1716  _mbg_cn_table_entry( PC_GPS_CMD ), \
1717  _mbg_cn_table_entry( PC_GPS_IDENT ), \
1718  _mbg_cn_table_entry( PC_GPS_POS ), \
1719  _mbg_cn_table_entry( PC_GPS_ANT_CABLE_LEN ), \
1720  _mbg_cn_table_entry( PC_GPS_RECEIVER_INFO ), \
1721  _mbg_cn_table_entry( PC_GPS_ALL_STR_TYPE_INFO ), \
1722  _mbg_cn_table_entry( PC_GPS_ALL_PORT_INFO ), \
1723  _mbg_cn_table_entry( PC_GPS_PORT_SETTINGS_IDX ), \
1724  _mbg_cn_table_entry( PC_GPS_ALL_POUT_INFO ), \
1725  _mbg_cn_table_entry( PC_GPS_POUT_SETTINGS_IDX ), \
1726  _mbg_cn_table_entry( PC_GPS_TIME_SCALE ), \
1727  _mbg_cn_table_entry( PC_GPS_LAN_IF_INFO ), \
1728  _mbg_cn_table_entry( PC_GPS_IP4_STATE ), \
1729  _mbg_cn_table_entry( PC_GPS_IP4_SETTINGS ), \
1730  _mbg_cn_table_entry( PC_GPS_PTP_STATE ), \
1731  _mbg_cn_table_entry( PC_GPS_PTP_CFG ), \
1732  _mbg_cn_table_entry( PC_GPS_PTP_UC_MASTER_CFG_LIMITS ), \
1733  _mbg_cn_table_entry( PC_GPS_ALL_PTP_UC_MASTER_INFO ), \
1734  _mbg_cn_table_entry( PC_GPS_PTP_UC_MASTER_SETTINGS_IDX ), \
1735  _mbg_cn_table_entry( PC_GPS_GPIO_CFG_LIMITS ), \
1736  _mbg_cn_table_entry( PC_GPS_ALL_GPIO_INFO ), \
1737  _mbg_cn_table_entry( PC_GPS_GPIO_SETTINGS_IDX ), \
1738  _mbg_cn_table_entry( PC_GPS_GNSS_MODE ), \
1739  _mbg_cn_table_entry( PC_GPS_ALL_GNSS_SAT_INFO ), \
1740  _mbg_cn_table_entry( PC_GPS_XMR_INSTANCES ), \
1741  _mbg_cn_table_entry( PC_GPS_XMR_SETTINGS_IDX ), \
1742  _mbg_cn_table_entry( PC_GPS_ALL_XMR_INFO ), \
1743  _mbg_cn_table_entry( PC_GPS_ALL_XMR_STATUS ), \
1744  _mbg_cn_table_entry( PC_GPS_XMR_HOLDOVER_STATUS ), \
1745  _mbg_cn_table_entry( PC_GPS_ALL_GPIO_STATUS ), \
1746  _mbg_cn_table_entry( PC_GPS_XFEATURE_BUFFER ), \
1747  _mbg_cn_table_entry( PC_GPS_TLV_INFO ), \
1748  \
1749  _mbg_cn_table_entry( PC_GPS_CFGH ), \
1750  _mbg_cn_table_entry( PC_GPS_ALM ), \
1751  _mbg_cn_table_entry( PC_GPS_EPH ), \
1752  _mbg_cn_table_entry( PC_GPS_UTC ), \
1753  _mbg_cn_table_entry( PC_GPS_IONO ), \
1754  _mbg_cn_table_entry( PC_GPS_ASCII_MSG ), \
1755  _mbg_cn_table_end() \
1756 }
1757 
1758 
1759 
1765 enum PC_GPS_COMMANDS //##++++++++++++++
1766 {
1772 };
1773 
1774 
1775 
1788 
1789 
1790 #if defined( _USING_BYTE_ALIGNMENT )
1791  #pragma pack() // set default alignment
1792  #undef _USING_BYTE_ALIGNMENT
1793 #endif
1794 
1795 /* End of header body */
1796 
1797 #endif /* _PCPSDEFS_H */
1798 
events read too slow (capture events only)
Definition: pcpsdefs.h:1279
char corr_dir
space, &#39;<&#39;, or &#39;>&#39;, just for information
Definition: pcpsdefs.h:1566
uint16_t TR_DISTANCE
Receiver distance from transmitter [km].
Definition: pcpsdefs.h:1553
int16_t offs
offset from UTC to local time [min] (local time = UTC + offs)
Definition: pcpsdefs.h:1506
unknown, or not defined
Definition: pcpsdefs.h:293
East European Time, CET/CEST + 1h.
Definition: pcpsdefs.h:1443
(r/w) UTC, UTC corr. param., only if PCPS_HAS_UTC_PARM
Definition: pcpsdefs.h:1688
uint8_t PCPS_TZCODE
Type of variable to hold a TZ code.
Definition: pcpsdefs.h:1432
invalid time because battery had been disconnected, or absolute time can&#39;t be decoded safely ...
Definition: pcpsdefs.h:1261
uint8_t year
year of the century, 0..99
Definition: pcpsdefs.h:1138
number of possible codes
Definition: pcpsdefs.h:1413
(r/-) IDENT, serial number, deprecated by PC_GPS_RECEIVER_INFO
Definition: pcpsdefs.h:1648
(-/w) POUT_SETTINGS_IDX, settings for one programmable output
Definition: pcpsdefs.h:1657
time stamp is GPS scale
Definition: pcpsdefs.h:1275
(r/w) TTM, current time, deprecated by PCPS_GIVE_HR_TIME
Definition: pcpsdefs.h:1638
the number of valid codes
Definition: pcpsdefs.h:1444
uint32_t used
the number of saved capture events
Definition: pcpsdefs.h:1531
(r/w) ENABLE_FLAGS, when to enable serial, pulses, and synth, only if GPS_MODEL_HAS_ENABLE_FLAGS ...
Definition: pcpsdefs.h:1645
PCPS_TIME_STATUS status
status bits, see PCPS_TIME_STATUS_FLAGS_COMMON
Definition: pcpsdefs.h:1168
uint8_t mday
day of month, 0..31
Definition: pcpsdefs.h:1135
(-/-) SV_ALM, one SV&#39;s num and almanac (yet not used)
Definition: pcpsdefs.h:1686
(r/-) PTP_UC_MASTER_CFG_LIMITS, only if PTP_CFG_MSK_SUPPORT_PTP_UNICAST
Definition: pcpsdefs.h:1665
PCPS_TIME_STATUS_FLAGS_EXT
Extended time status flags.
Definition: pcpsdefs.h:1270
uint8_t sec100
hundredths of seconds, 0..99, 10 ms resolution
Definition: pcpsdefs.h:1130
uint8_t hour
hours, 0..23
Definition: pcpsdefs.h:1215
PTP/IEEE1588 network protocol.
Definition: pcpsdefs.h:298
Daylight changeover specification.
Definition: pcpsdefs.h:1461
(r/-) MBG_TLV_INFO, only if MBG_XFEATURE_TLV_API
Definition: pcpsdefs.h:1682
short int16_t
Definition: words.h:212
number of codes
Definition: pcpsdefs.h:1364
(-/w) MBG_GPIO_SETTINGS_IDX, settings for a specific port, only if GPS_HAS_GPIO
Definition: pcpsdefs.h:1671
(r/-) XMR_HOLDOVER_STATUS, only if XMRIF_MSK_HOLDOVER_STATUS_SUPP
Definition: pcpsdefs.h:1678
uint8_t hour
hours, 0..23
Definition: pcpsdefs.h:1161
number of valid codes
Definition: pcpsdefs.h:1389
PCPS_TZCODES
Enumeration of codes used with PCPS_TZCODE.
Definition: pcpsdefs.h:1438
(-/-) SV_EPH, one SV&#39;s num and ephemeris (yet not used)
Definition: pcpsdefs.h:1687
time string once per second
Definition: pcpsdefs.h:1410
time string once per minute
Definition: pcpsdefs.h:1411
unsigned short uint16_t
Definition: words.h:213
PCPS_SECONDS sec
seconds since 1970, usually UTC scale
Definition: pcpsdefs.h:974
trying raw correlation, combi receivers running in AM mode
Definition: pcpsdefs.h:1580
uint16_t frac
fractions of seconds, 0.1 ms units
Definition: pcpsdefs.h:1212
announced leap second is negative
Definition: pcpsdefs.h:1274
uint8_t PCPS_STATUS_PORT
Type of the status register port.
Definition: pcpsdefs.h:431
(-/-) CFGH, SVs&#39; config. and health codes (yet not used)
Definition: pcpsdefs.h:1685
uint32_t PCPS_FRAC_32
32 bit binary fraction of a second
Definition: pcpsdefs.h:959
PCPS_MOD_CODES
Deprecated codes for modes of operation.
Definition: pcpsdefs.h:1407
(-/w) PORT_SETTINGS_IDX, settings for specified serial port, only if RECEIVER_INFO::n_com_ports > 0 ...
Definition: pcpsdefs.h:1655
uint8_t PCPS_SERIAL
Legacy definitions used to configure a device&#39;s serial port.
Definition: pcpsdefs.h:1342
PCPS_TIME_STATUS_X status
status bits, see PCPS_TIME_STATUS_FLAGS
Definition: pcpsdefs.h:1209
uint8_t mday
day of month, 0..31
Definition: pcpsdefs.h:1163
uint8_t month
month, 1..12
Definition: pcpsdefs.h:1165
char int8_t
Definition: words.h:209
uint16_t year_or_wday
The full year number, or 0..6 == Sun..Sat if the DL_AUTO_FLAG is set.
Definition: pcpsdefs.h:1463
uint8_t min
minutes, 0..59
Definition: pcpsdefs.h:1160
(r/-) n * MBG_GPIO_INFO_IDX, all GPIO info, only if GPS_HAS_GPIO
Definition: pcpsdefs.h:1669
uint8_t min
[0..59]
Definition: pcpsdefs.h:1467
uint8_t sec
seconds, 0..59, or 60 if leap second
Definition: pcpsdefs.h:1159
#define PCPS_ID_SIZE
The maximum length of an ID string, including terminating 0.
Definition: pcpsdefs.h:915
uint8_t mday
[1..31]
Definition: pcpsdefs.h:1465
(-/w) XYZ, current position in ECEF coordinates, only if GPS_MODEL_HAS_POS_XYZ
Definition: pcpsdefs.h:1639
(r/w) TZDL, time zone / daylight saving, only if GPS_MODEL_HAS_TZDL
Definition: pcpsdefs.h:1635
(r/w) ANT_CABLE_LEN, length of antenna cable, only if GPS_MODEL_HAS_ANT_CABLE_LEN ...
Definition: pcpsdefs.h:1650
uint8_t val
correlation value, or check count if status ==:: PZF_CORR_CHECK
Definition: pcpsdefs.h:1564
Status of the time capture FIFO buffer.
Definition: pcpsdefs.h:1529
(r/-) BVAR_STAT, status of buffered variables, only if GPS_MODEL_HAS_BVAR_STAT
Definition: pcpsdefs.h:1637
uint8_t status
status codes, see PZF_CORR_STATES
Definition: pcpsdefs.h:1565
(-/w) LLA, current position in geographic coordinates, only if GPS_MODEL_HAS_POS_LLA ...
Definition: pcpsdefs.h:1640
antenna failure
Definition: pcpsdefs.h:1273
initialize the oscillator disciplining values
Definition: pcpsdefs.h:1770
number of defined ref time sources
Definition: pcpsdefs.h:302
int32_t utc_offs
UTC offs [sec] (loc_time = tstamp + utc_offs)
Definition: pcpsdefs.h:1088
Specification of a local time zone.
Definition: pcpsdefs.h:1504
Free Running Clock.
Definition: pcpsdefs.h:299
(r/-) IP4_SETTINGS, LAN interface state, only if PCPS_HAS_LAN_INTF
Definition: pcpsdefs.h:1660
PCPS_TIME_STATUS_X status
status bits, see PCPS_TIME_STATUS_FLAGS
Definition: pcpsdefs.h:1089
current second is leap second
Definition: pcpsdefs.h:1272
reserved
Definition: pcpsdefs.h:1412
time string on request &#39;?&#39; only
Definition: pcpsdefs.h:1409
(-/w) GPS_CMD, send one of the PC_GPS_COMMANDS
Definition: pcpsdefs.h:1647
#define PCPS_FIFO_SIZE
The size of a bus level device&#39;s command/data FIFO.
Definition: pcpsdefs.h:908
uint8_t sec
seconds, 0..59, may be 60 for leap second
Definition: pcpsdefs.h:1213
Date time and status used with the PCPS_SET_TIME command.
Definition: pcpsdefs.h:1156
uint32_t max
capture buffer size
Definition: pcpsdefs.h:1532
IRIG or similar time code, see http://www.meinberg.de/english/info/irig.htm.
Definition: pcpsdefs.h:296
PCPS_DL_ONOFF tm_on
date/time when daylight saving starts
Definition: pcpsdefs.h:1508
uint8_t min
minutes, 0..59
Definition: pcpsdefs.h:1214
(r/w) MBG_GNSS_MODE_INFO / MBG_GNSS_MODE_SETTINGS, only if PCPS_IS_GNSS
Definition: pcpsdefs.h:1672
force a GPS receiver to boot mode
Definition: pcpsdefs.h:1767
(-/w) XMULTI_REF_SETTINGS_IDX, idx 0..XMULTI_REF_INSTANCES::n_xmr_settings-1, only if GPS_HAS_XMULTI_...
Definition: pcpsdefs.h:1675
(r/-) n * MBG_GPIO_STATUS_IDX, where n == MBG_GPIO_CFG_LIMITS::num_io, only if MBG_GPIO_CFG_LIMIT_FLA...
Definition: pcpsdefs.h:1680
(r/-) XMULTI_REF_INSTANCES, only if GPS_HAS_XMULTI_REF and GPS_HAS_XMRS_MULT_INSTC ...
Definition: pcpsdefs.h:1674
PCPS_STIME stime
Definition: pcpsdefs.h:1187
PCPS_FRAC_32 frac
binary fractions of second, see PCPS_FRAC_32
Definition: pcpsdefs.h:975
daylight saving currently enabled
Definition: pcpsdefs.h:1255
(r/w) PTP_CFG_SETTINGS / PTP_CFG_INFO, only if PCPS_HAS_PTP
Definition: pcpsdefs.h:1664
raw correlation achieved, doing plausibility checks
Definition: pcpsdefs.h:1581
uint8_t PCPS_SIG_VAL
Definitions used to report a signal strength.
Definition: pcpsdefs.h:1051
char PCPS_SN_STR[(16+1)]
A buffer for a serial number string, including terminating 0.
Definition: pcpsdefs.h:925
PCPS_TIME_STAMP tstamp
High resolution time stamp (UTC)
Definition: pcpsdefs.h:1087
uint32_t PCPS_SECONDS
Seconds since epoch 1970-01-01, usually UTC scale.
Definition: pcpsdefs.h:936
returned time is always UTC instead of some local time
Definition: pcpsdefs.h:1258
(r/w) IP4_SETTINGS, LAN interface configuration, only if PCPS_HAS_LAN_INTF
Definition: pcpsdefs.h:1662
long wave or time code receiver has sync&#39;ed at least once after pwr up, sat receiver is synchronized ...
Definition: pcpsdefs.h:1256
PCPS_BD_CODES
Deprecated baud rate indices.
Definition: pcpsdefs.h:1355
the current time has been set by an API call, for very old clocks see REV_PCPS_IFTM_PC31PS31 ...
Definition: pcpsdefs.h:1260
PC_GPS_CMD_CODES
GPS Command codes passed via the system bus.
Definition: pcpsdefs.h:1633
uint16_t yday
day of year, 1..365/366
Definition: pcpsdefs.h:1211
reset the clock&#39;s user parameters to defaults
Definition: pcpsdefs.h:1769
PCPS_TIME_STATUS_FLAGS_COMMON
Time status flags.
Definition: pcpsdefs.h:1252
PCPS_REF_TYPES
Enumeration of the ref time signal sources used by Meinberg devices.
Definition: pcpsdefs.h:291
unsigned char uint8_t
Definition: words.h:210
(r/-) PTP_STATE, only if PCPS_HAS_PTP
Definition: pcpsdefs.h:1663
no command, just the number of known commands
Definition: pcpsdefs.h:1771
char PCPS_ID_STR[(2 *16+1)]
A buffer for an ID string, including terminating 0.
Definition: pcpsdefs.h:918
#define PCPS_SN_SIZE
The maximum length of a serial number string, including terminating 0.
Definition: pcpsdefs.h:922
(r/-) n * PORT_INFO_IDX, settings and capabilities of all serial ports, only if RECEIVER_INFO::n_com_...
Definition: pcpsdefs.h:1654
(r/-) POS, position XYZ, LLA, and DMS combined, only if GPS_MODEL_HAS_POS
Definition: pcpsdefs.h:1649
PCPS_TIME t
Definition: pcpsdefs.h:1186
(r/-) n * GNSS_SAT_INFO_IDX, satellite info, only if PCPS_IS_GNSS
Definition: pcpsdefs.h:1673
DCF77 long wave signal (Germany), see http://www.meinberg.de/english/info/dcf77.htm.
Definition: pcpsdefs.h:294
uint8_t year
year of the century, 0..99
Definition: pcpsdefs.h:1166
default as broadcast by DCF77 (UTC+1h/UTC+2h)
Definition: pcpsdefs.h:1440
(r/-) MBG_GPIO_CFG_LIMITS, only if GPS_HAS_GPIO
Definition: pcpsdefs.h:1668
int8_t offs_utc
[hours], 0 if not _pcps_has_utc_offs
Definition: pcpsdefs.h:1142
uint8_t year
Definition: pcpsdefs.h:1216
fine correlation achieved
Definition: pcpsdefs.h:1582
JJY long wave signal (Japan)
Definition: pcpsdefs.h:301
uint8_t sec100
hundredths of seconds, 0..99, 10 ms resolution
Definition: pcpsdefs.h:1158
Raw IRIG time.
Definition: pcpsdefs.h:1207
(r/-) RECEIVER_INFO, rcvr model info, only if PCPS_HAS_RECEIVER_INFO
Definition: pcpsdefs.h:1651
(r/-) LAN_IF_INFO, LAN interface info, only if PCPS_HAS_LAN_INTF
Definition: pcpsdefs.h:1659
(r/w) MBG_TIME_SCALE_SETTINGS / MBG_TIME_SCALE_INFO, only if PCPS_HAS_TIME_SCALE
Definition: pcpsdefs.h:1658
uint8_t hour
hours, 0..23
Definition: pcpsdefs.h:1133
PCPS_TIME_STATUS_X set_mask
Definition: pcpsdefs.h:1029
MSF long wave signal (UK)
Definition: pcpsdefs.h:297
uint8_t hour
[0..23]
Definition: pcpsdefs.h:1466
a change in daylight saving status is announced
Definition: pcpsdefs.h:1257
(r/-) MBG_XFEATURE_BUFFER, only if GPS_HAS_XFEATURE
Definition: pcpsdefs.h:1681
(r/-) n * PTP_UC_MASTER_INFO_IDX, only if PTP_CFG_MSK_SUPPORT_PTP_UNICAST
Definition: pcpsdefs.h:1666
always CET (UTC+1h), discard DST
Definition: pcpsdefs.h:1441
GPS satellite system, see http://www.meinberg.de/english/info/gps.htm.
Definition: pcpsdefs.h:295
PZF correlation status info.
Definition: pcpsdefs.h:1562
uint8_t wday
day of week, 1..7, 1 = Monday
Definition: pcpsdefs.h:1164
High resolution time including status and local time offset.
Definition: pcpsdefs.h:1085
(-/-) ASCII_MSG, the GPS ASCII message (yet not used)
Definition: pcpsdefs.h:1690
(r/w) PORT_PARM, param. of the serial ports, deprecated by PC_GPS_ALL_PORT_INFO
Definition: pcpsdefs.h:1641
int8_t PCPS_BUFF[16]
A data buffer for a bus level device&#39;s command/data.
Definition: pcpsdefs.h:911
always UTC
Definition: pcpsdefs.h:1442
let the clock clear its system variables
Definition: pcpsdefs.h:1768
(r/-) GPS_STAT_INFO, satellite info, mode of operation, and DAC info, only if GPS_MODEL_HAS_STAT_INFO...
Definition: pcpsdefs.h:1646
PCPS_SIG_VAL signal
signal strength, see PCPS_SIG_VAL_DEFS
Definition: pcpsdefs.h:1141
PCPS_SIG_VAL signal
signal strength, see PCPS_SIG_VAL_DEFS, or capture input channel number
Definition: pcpsdefs.h:1090
Local calendar date and time, plus sync status.
Definition: pcpsdefs.h:1128
PZF_CORR_STATES
Codes used with CORR_INFO::status.
Definition: pcpsdefs.h:1578
uint16_t PCPS_TIME_STATUS_X
Extended status code.
Definition: pcpsdefs.h:1022
time stamp is TAI scale
Definition: pcpsdefs.h:1276
A high resolution time stamp.
Definition: pcpsdefs.h:972
(r/-) n * XMULTI_REF_INFO_IDX, where n == XMULTI_REF_INSTANCES::n_xmr_settings, only if GPS_HAS_XMULT...
Definition: pcpsdefs.h:1676
(-/w) PTP_UC_MASTER_SETTINGS_IDX, only if PTP_CFG_MSK_SUPPORT_PTP_UNICAST
Definition: pcpsdefs.h:1667
WWVB long wave signal (U.S.)
Definition: pcpsdefs.h:300
(-/-) IONO, ionospheric corr. param. (yet not used)
Definition: pcpsdefs.h:1689
PCPS_SIG_VAL signal
signal strength, see PCPS_SIG_VAL_DEFS
Definition: pcpsdefs.h:1567
PCPS_FR_CODES
Deprecated framing code indices.
Definition: pcpsdefs.h:1383
int16_t offs_dl
additional offset if DST enabled [min] (DST time = local time + offs_dl)
Definition: pcpsdefs.h:1507
(r/w) n * XMULTI_REF_STATUS_IDX, where n == XMULTI_REF_INSTANCES::n_xmr_settings, one structure on wr...
Definition: pcpsdefs.h:1677
PCPS_DL_ONOFF tm_off
date/time when daylight saving ends
Definition: pcpsdefs.h:1509
uint8_t reserved
currently not used, always 0
Definition: pcpsdefs.h:1219
(r/-) SW_REV, software revision, deprecated by PC_GPS_RECEIVER_INFO
Definition: pcpsdefs.h:1636
uint8_t min
minutes, 0..59
Definition: pcpsdefs.h:1132
uint8_t PCPS_TIME_STATUS
Time synchronization status.
Definition: pcpsdefs.h:1112
int16_t offs_utc
[minutes], 0 unless supported by the code format, see MSK_ICODE_RX_HAS_TZI
Definition: pcpsdefs.h:1210
(r/-) TTM, user capture events, deprecated by PCPS_GIVE_UCAP_EVENT
Definition: pcpsdefs.h:1644
(r/-) ANT_INFO, time diff at sync. after antenna had been disconn., only if GPS_MODEL_HAS_ANT_INFO ...
Definition: pcpsdefs.h:1642
uint16_t PCPS_CMD_INFO
A type used to store an unambiguous command code.
Definition: pcpsdefs.h:1787
long wave or time code receiver running on xtal, satellite receiver has not verified its position ...
Definition: pcpsdefs.h:1254
(r/-) n * POUT_INFO_IDX, all programmable output info
Definition: pcpsdefs.h:1656
uint8_t month
[1..12]
Definition: pcpsdefs.h:1464
PCPS_TIME_STATUS_X clr_mask
Definition: pcpsdefs.h:1030
uint8_t month
month, 1..12
Definition: pcpsdefs.h:1137
events interval too short (capture events only)
Definition: pcpsdefs.h:1278
PCPS_TIME_STATUS status
status bits, see PCPS_TIME_STATUS_FLAGS_COMMON
Definition: pcpsdefs.h:1140
uint8_t sec
seconds, 0..59, or 60 if leap second
Definition: pcpsdefs.h:1131
leap second announced, for very old clocks see REV_PCPS_LS_ANN_PC31PS31
Definition: pcpsdefs.h:1259
uint8_t wday
day of week, 1..7, 1 = Monday
Definition: pcpsdefs.h:1136
(r/-) n * STR_TYPE_INFO_IDX, names and capabilities of all supp. string types, only if RECEIVER_INFO:...
Definition: pcpsdefs.h:1653
PC_GPS_COMMANDS
Codes used with PC_GPS_CMD.
Definition: pcpsdefs.h:1765