⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mbg_gps166.h

📁 网络时间协议NTP 源码 版本v4.2.0b 该源码用于linux平台下
💻 H
字号:
/* * /src/NTP/REPOSITORY/ntp4-dev/include/mbg_gps166.h,v 4.6 2005/10/07 22:11:56 kardel RELEASE_20051008_A * * mbg_gps166.h,v 4.6 2005/10/07 22:11:56 kardel RELEASE_20051008_A * * $Created: Sun Jul 20 09:20:50 1997 $ * * File GPSSERIO.H Copyright (c) by Meinberg Funkuhren (www.meinberg.de) * * Linkage to PARSE: * Copyright (c) 1997-2005 by Frank Kardel <kardel <AT> ntp.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. Neither the name of the author nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */#ifndef MBG_GPS166_H#define MBG_GPS166_H/***************************************************************************//*                                                                         *//*   File:         GPSSERIO.H                    4.1                       *//*                                                                         *//*   Project:      Common C Library                                        *//*                                                                         *//*   Compiler:     Borland C++                                             *//*                                                                         *//*   Author:       M. Burnicki,  Meinberg Funkuhren                        *//*                                                                         *//*                                                                         *//*   Description:                                                          *//*     This file defines structures and codes to be used to access GPS166  *//*     via its serial interface COM0. COM0 should be set to a high baud    *//*     rate, default is 19200.                                             *//*                                                                         *//*     Standard GPS166 serial operation is to send a time string that is   *//*     compatible with Meinberg UA31 or PZF535 DCF77 radio remote clocks.  *//*     That string can be transmitted automatically once per second, once  *//*     per minute or on request per ASCII '?'.                             *//*                                                                         *//*     Parameter setup or parameter readout works using blocks of binary   *//*     data which have to be isolated from the standard string. A block of *//*     data starts with a SOH code (ASCII Start Of Header, 0x01) followed  *//*     by a message header with constant length and a data portion with    *//*     variable length. The first field (cmd) of the message header holds  *//*     the command code rsp. the type of data to be transmitted. The next  *//*     field (len) gives the number of data bytes that are transmitted     *//*     after the header. This number ranges from 0 to sizeof( MSG_DATA ).  *//*     The third field (data_csum) holds a checksum of all data bytes and  *//*     the last field of the header finally holds the checksum of the.     *//*     header.                                                             *//*                                                                         *//***************************************************************************//* the control codes defined below are to be or'ed with a command/type code */#define GPS_REQACK    0x8000   /* to GPS166: request acknowledge */#define GPS_ACK       0x4000   /* from GPS166: acknowledge a command */#define GPS_NACK      0x2000   /* from GPS166: error receiving command */#define GPS_CTRL_MSK  0xF000   /* masks control code from command *//* The codes below specify commands/types of data to be supplied to GPS166: *//*                            GPS166 auto-message to host            *//*                            

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -