PageRenderTime 26ms CodeModel.GetById 2ms app.highlight 18ms RepoModel.GetById 1ms app.codeStats 0ms

/contrib/ntp/libntp/clocktypes.c

https://bitbucket.org/freebsd/freebsd-head/
C | 118 lines | 111 code | 4 blank | 3 comment | 4 complexity | 90cccafd32c5a00d177545c18bfe9abb MD5 | raw file
  1/*
  2 * Data for pretty printing clock types
  3 */
  4#include <stdio.h>
  5
  6#include "ntp_fp.h"
  7#include "ntp.h"
  8#include "lib_strbuf.h"
  9#include "ntp_refclock.h"
 10#include "ntp_stdlib.h"
 11
 12struct clktype clktypes[] = {
 13	{ REFCLK_NONE,		"unspecified type (0)",
 14	  "UNKNOWN" },
 15	{ REFCLK_LOCALCLOCK,	"Undisciplined local clock (1)",
 16	  "LOCAL" },
 17	{ REFCLK_GPS_TRAK,	"TRAK 8810 GPS Receiver (2)",
 18	  "GPS_TRAK" },
 19	{ REFCLK_WWV_PST,	"PSTI/Traconex WWV/WWVH Receiver (3)",
 20	  "WWV_PST" },
 21	{ REFCLK_SPECTRACOM,	"Spectracom (generic) Receivers (4)",
 22	  "SPECTRACOM" },
 23	{ REFCLK_TRUETIME,	"TrueTime (generic) Receivers (5)",
 24	  "TRUETIME" },
 25	{ REFCLK_IRIG_AUDIO,	"IRIG Audio Decoder (6)",
 26	  "IRIG_AUDIO" },
 27	{ REFCLK_CHU_AUDIO,	"CHU Audio Demodulator/Decoder (7)",
 28	  "CHU_AUDIO" },
 29	{ REFCLK_PARSE,		"Generic reference clock driver (8)",
 30	  "GENERIC" },
 31	{ REFCLK_GPS_MX4200,	"Magnavox MX4200 GPS Receiver (9)",
 32	  "GPS_MX4200" },
 33	{ REFCLK_GPS_AS2201,	"Austron 2201A GPS Receiver (10)",
 34	  "GPS_AS2201" },
 35	{ REFCLK_GPS_ARBITER,	"Arbiter 1088A/B GPS Receiver (11)",
 36	  "GPS_ARBITER" },
 37	{ REFCLK_IRIG_TPRO,	"KSI/Odetics TPRO/S IRIG Interface (12)",
 38	  "IRIG_TPRO" },
 39	{ REFCLK_ATOM_LEITCH,	"Leitch CSD 5300 Master Clock Controller (13)",
 40	  "ATOM_LEITCH" },
 41	{ REFCLK_MSF_EES,	"EES M201 MSF Receiver (14)",
 42	  "MSF_EES" },
 43	{ REFCLK_NONE,		"not used (15)",
 44	  "NOT_USED" },
 45	{ REFCLK_IRIG_BANCOMM,	"Bancomm GPS/IRIG Receiver (16)",
 46	  "GPS_BANC" },
 47	{ REFCLK_GPS_DATUM,	"Datum Precision Time System (17)",
 48	  "GPS_DATUM" },
 49	{ REFCLK_ACTS,		"Automated Computer Time Service (18)",
 50	  "ACTS_MODEM" },
 51	{ REFCLK_WWV_HEATH,	"Heath WWV/WWVH Receiver (19)",
 52	  "WWV_HEATH" },
 53	{ REFCLK_GPS_NMEA,	"Generic NMEA GPS Receiver (20)",
 54	  "GPS_NMEA" },
 55	{ REFCLK_GPS_VME,	"TrueTime GPS-VME Interface (21)",
 56	  "GPS_VME" },
 57	{ REFCLK_ATOM_PPS,	"PPS Clock Discipline (22)",
 58	  "PPS" },
 59	{ REFCLK_NONE,		"not used (23)",
 60	  "NOT_USED" },
 61	{ REFCLK_NONE,		"not used (24)",
 62	  "NOT_USED" },
 63	{ REFCLK_NONE,		"not used (25)",
 64	  "NOT_USED" },
 65	{ REFCLK_GPS_HP,	"HP 58503A GPS Time & Frequency Receiver (26)",
 66	  "GPS_HP" },
 67	{ REFCLK_ARCRON_MSF,	"ARCRON MSF (and DCF77) Receiver (27)",
 68	  "MSF_ARCRON" },
 69	{ REFCLK_SHM,		"Clock attached thru shared Memory (28)",
 70	  "SHM" },
 71        { REFCLK_PALISADE,      "Trimble Navigation Palisade GPS (29)",
 72          "GPS_PALISADE" },
 73	{ REFCLK_ONCORE,	"Motorola UT Oncore GPS (30)",
 74	  "GPS_ONCORE" },
 75	{ REFCLK_GPS_JUPITER,	"Rockwell Jupiter GPS (31)",
 76	  "GPS_JUPITER" },
 77	{ REFCLK_CHRONOLOG,	"Chrono-log K (32)",
 78	  "CHRONOLOG" },
 79	{ REFCLK_DUMBCLOCK,	"Dumb generic hh:mm:ss local clock (33)",
 80	  "DUMBCLOCK" },
 81	{ REFCLK_ULINK,         "Ultralink M320 WWVB receiver (34)",
 82	  "ULINK_M320"},
 83	{ REFCLK_PCF,		"Conrad parallel port radio clock (35)",
 84	  "PCF"},
 85	{ REFCLK_WWV_AUDIO,	"WWV/H Audio Demodulator/Decoder (36)",
 86	  "WWV_AUDIO"},
 87	{ REFCLK_FG,		"Forum Graphic GPS Dating Station (37)",
 88	  "GPS_FG"},
 89	{ REFCLK_HOPF_SERIAL,	"hopf Elektronic serial line receiver (38)",
 90	  "HOPF_S"},
 91	{ REFCLK_HOPF_PCI,	"hopf Elektronic PCI receiver (39)",
 92	  "HOPF_P"},
 93	{ REFCLK_JJY,		"JJY receiver (40)",
 94	  "JJY"},
 95	{ REFCLK_TT560,		"TrueTime 560 IRIG-B decoder (41)",
 96	  "TT_IRIG"},
 97	{ REFCLK_ZYFER,		"Zyfer GPStarplus receiver (42)",
 98	  "GPS_ZYFER" },
 99	{ REFCLK_RIPENCC,	"RIPE NCC Trimble driver (43)",
100	  "GPS_RIPENCC" },
101	{ REFCLK_NEOCLOCK4X,	"NeoClock4X DCF77 / TDF receiver (44)",
102	  "NEOCLK4X"},
103	{ -1,			"", "" }
104};
105
106const char *
107clockname(
108	int num
109	)
110{
111	register struct clktype *clk;
112  
113	for (clk = clktypes; clk->code != -1; clk++) {
114		if (num == clk->code)
115		    return (clk->abbrev);
116	}
117	return (NULL);
118}