1 /* edit packet_states.h to add new packet types. */
2  "GROUND_STATE",	/* we don't know what packet type to expect */
3 
4  "COMMENT_BODY",	/* pound comment for a test load */
5  "COMMENT_RECOGNIZED",	/* comment recognized */
6  "NMEA_DOLLAR",		/* we've seen first character of NMEA leader */
7 
8 #ifdef NMEA0183_ENABLE
9  "NMEA_BANG",		/* we've seen first character of an AIS message '!' */
10  "NMEA_PUB_LEAD",	/* seen second character of NMEA G leader */
11  "NMEA_VENDOR_LEAD",	/* seen second character of NMEA P leader */
12  "NMEA_LEADER_END",	/* seen end char of NMEA leader, in body */
13  "NMEA_PASHR_A",	/* grind through recognizing $PASHR */
14  "NMEA_PASHR_S",	/* grind through recognizing $PASHR */
15  "NMEA_PASHR_H",	/* grind through recognizing $PASHR */
16  "NMEA_BINARY_BODY",	/* Ashtech-style binary packet body, skip until \r\n */
17  "NMEA_BINARY_CR",	/* \r on end of Ashtech-style binary packet */
18  "NMEA_BINARY_NL",	/* \n on end of Ashtech-style binary packet */
19  "NMEA_CR",	   	/* seen terminating \r of NMEA packet */
20  "NMEA_RECOGNIZED",	/* saw trailing \n of NMEA packet */
21 
22  "SIRF_ACK_LEAD_1",	/* seen A of possible SiRF Ack */
23  "SIRF_ACK_LEAD_2",	/* seen c of possible SiRF Ack */
24  "AIS_LEAD_1",		/* seen initial A of possible AIS message */
25  "AIS_LEAD_2",		/* seen second I/B/N/X of possible AIS message */
26  "AIS_LEAD_ALT1",	/* seen initial B of possible AIS message */
27  "AIS_LEAD_ALT2",	/* seen second S of possible AIS message */
28  "AIS_LEAD_ALT3",	/* seen initial S of possible AIS message */
29  "AIS_LEAD_ALT4",	/* seen second A of possible AIS message */
30 
31  "SEATALK_LEAD_1",	/* SeaTalk/Garmin packet leader 'I' */
32  "WEATHER_LEAD_1",	/* Weather instrument packet leader 'W' */
33  "HEADCOMP_LEAD_1",	/* Heading/compass packet leader 'H' */
34  "TURN_LEAD_1",		/* Turn indicator packet leader 'T' */
35  "ECDIS_LEAD_1",	/* ECDIS packet leader 'E' */
36  "SOUNDER_LEAD_1",	/* Depth sounder packet leader 'S' */
37  "TRANSDUCER_LEAD_1",	/* Generic transducer packet leader 'Y' */
38  "BEIDOU_LEAD_1",	/* Beidou leader */
39  "QZSS_LEAD_1",		/* Quasi-Zenith Satellite System leader */
40 #endif /* NMEA0183_ENABLE */
41 
42  "DLE_LEADER",		/* we've seen the TSIP/EverMore leader (DLE) */
43 
44 #ifdef TRIPMATE_ENABLE
45  "ASTRAL_1",		/* ASTRAL leader A */
46  "ASTRAL_2",	 	/* ASTRAL leader S */
47  "ASTRAL_3",		/* ASTRAL leader T */
48  "ASTRAL_4",		/* ASTRAL leader R */
49  "ASTRAL_5",		/* ASTRAL leader A */
50 #endif /* TRIPMATE_ENABLE */
51 
52 #ifdef EARTHMATE_ENABLE
53  "EARTHA_1",		/* EARTHA leader E */
54  "EARTHA_2",		/* EARTHA leader A */
55  "EARTHA_3",		/* EARTHA leader R */
56  "EARTHA_4",		/* EARTHA leader T */
57  "EARTHA_5",		/* EARTHA leader H */
58 #endif /* EARTHMATE_ENABLE */
59 
60 #if defined(SIRF_ENABLE) || defined(SKYTRAQ_ENABLE)
61  "SIRF_LEADER_1",	/* seen first character of SiRF/Skytraq leader <0x0A> */
62 #endif /* SIRF_ENABLE || SKYTRAQ_ENABLE */
63 #ifdef SIRF_ENABLE
64  "SIRF_LEADER_2",	/* seen second character of SiRF leader */
65  "SIRF_LENGTH_1",	/* seen first byte of SiRF length */
66  "SIRF_PAYLOAD",	/* we're in a SiRF payload part */
67  "SIRF_DELIVERED",	/* saw last byte of SiRF payload/checksum */
68  "SIRF_TRAILER_1",	/* saw first byte of SiRF trailer */
69  "SIRF_RECOGNIZED",	/* saw second byte of SiRF trailer */
70 #endif /* SIRF_ENABLE */
71 
72 #ifdef SKYTRAQ_ENABLE
73    /* <0xA0,0xA1><Len><Message ID><Message Body><csum><0x0D,0x0A> */
74    /* Len is two bytes, is the length of Message ID and Message Body */
75    /* Skytraq leader 1 same as SIRF_LEADER_1 */
76  "SKY_LEADER_2",	/* saw leader 2 <0xA1> */
77  "SKY_LENGTH_1",	/* saw first byte of packet length */
78  "SKY_LENGTH_2",	/* saw second byte of packet length */
79  "SKY_PAYLOAD",		/* we're in a Skytraq payload */
80  "SKY_DELIVERED",	/* saw last byte of Skytraq payload */
81  "SKY_CSUM",		/* saw Skytraq checksum */
82  "SKY_TRAILER_1",	/* saw first byte of Skytraq trailer <0x0D> */
83  "SKY_RECOGNIZED",	/* found end of the Skytraq packet */
84 #endif /* SKYTRAQ_ENABLE */
85 
86 #ifdef ZODIAC_ENABLE
87  "ZODIAC_EXPECTED",	/* expecting Zodiac packet */
88  "ZODIAC_LEADER_1",	/* saw leading 0xff */
89  "ZODIAC_LEADER_2",	/* saw leading 0x81 */
90  "ZODIAC_ID_1", 	/* saw first byte of ID */
91  "ZODIAC_ID_2", 	/* saw second byte of ID */
92  "ZODIAC_LENGTH_1",	/* saw first byte of Zodiac packet length */
93  "ZODIAC_LENGTH_2",	/* saw second byte of Zodiac packet length */
94  "ZODIAC_FLAGS_1", 	/* saw first byte of FLAGS */
95  "ZODIAC_FLAGS_2", 	/* saw second byte of FLAGS */
96  "ZODIAC_HSUM_1", 	/* saw first byte of Header sum */
97  "ZODIAC_PAYLOAD",	/* we're in a Zodiac payload */
98  "ZODIAC_RECOGNIZED",	/* found end of the Zodiac packet */
99 #endif /* ZODIAC_ENABLE */
100 
101 #if defined(TNT_ENABLE) || defined(GARMINTXT_ENABLE) || defined(ONCORE_ENABLE)
102  "AT1_LEADER",		/* saw True North status leader '@' */
103 			/* Garmin Simple Text starts with @ leader */
104 			/* Oncore starts with @ leader */
105  "GTXT_RECOGNIZED",     /* */
106 #endif
107 
108 #ifdef EVERMORE_ENABLE
109  "EVERMORE_LEADER_1",	/* a DLE after having seen EverMore data */
110  "EVERMORE_LEADER_2",	/* seen opening STX of EverMore packet */
111  "EVERMORE_PAYLOAD",	/* in payload part of EverMore packet */
112  "EVERMORE_PAYLOAD_DLE",/* DLE in payload part of EverMore packet */
113  "EVERMORE_RECOGNIZED",	/* found end of EverMore packet */
114 #endif /* EVERMORE_ENABLE */
115 
116 #ifdef ITRAX_ENABLE
117  "ITALK_LEADER_1",	/* saw leading < of iTalk packet */
118  "ITALK_LEADER_2",	/* saw leading ! of iTalk packet */
119  "ITALK_LENGTH",	/* saw packet length */
120  "ITALK_PAYLOAD",	/* in payload part of iTalk Packet */
121  "ITALK_DELIVERED",	/* seen end of payload */
122  "ITALK_TRAILER",	/* saw iTalk trailer byte */
123  "ITALK_RECOGNIZED",	/* found end of the iTalk packet */
124 #endif /* ITRAX_ENABLE */
125 
126 #ifdef NAVCOM_ENABLE
127  "NAVCOM_EXPECTED",	/* expecting Navcom NCT packet */
128  "NAVCOM_LEADER_1",	/* saw leading 0x02 */
129  "NAVCOM_LEADER_2",	/* saw leading 0x99 */
130  "NAVCOM_LEADER_3",	/* saw leading 0x66 */
131  "NAVCOM_ID",   	/* saw message ID */
132  "NAVCOM_LENGTH_1",	/* saw first byte of Navcom packet length */
133  "NAVCOM_LENGTH_2",	/* saw second byte of Navcom packet length */
134  "NAVCOM_PAYLOAD",	/* we're in a Navcom payload */
135  "NAVCOM_CSUM", 	/* saw checksum */
136  "NAVCOM_RECOGNIZED",	/* found end of the Navcom packet */
137 #endif /* NAVCOM_ENABLE */
138 
139 #ifdef UBLOX_ENABLE
140  "UBX_LEADER_1",        /* first constant leader byte found */
141  "UBX_LEADER_2",        /* second constant leader byte found */
142  "UBX_CLASS_ID",        /* classid read */
143  "UBX_MESSAGE_ID",      /* message id read */
144  "UBX_LENGTH_1",        /* first length byte read (le) */
145  "UBX_LENGTH_2",        /* second length byte read (le) */
146  "UBX_PAYLOAD",         /* payload eating */
147  "UBX_CHECKSUM_A",      /* checksum A byte (tcp checksum) */
148  "UBX_RECOGNIZED",      /* this is also UBX_CHECKSUM_B */
149 #endif
150 
151 #ifdef SUPERSTAR2_ENABLE
152  "SUPERSTAR2_LEADER",	/* leading SOH */
153  "SUPERSTAR2_ID1",	/* message type */
154  "SUPERSTAR2_ID2",	/* message type xor 0xff */
155  "SUPERSTAR2_PAYLOAD",	/* length of the actual packet data */
156  "SUPERSTAR2_CKSUM1",
157  "SUPERSTAR2_CKSUM2",
158  "SUPERSTAR2_RECOGNIZED",
159 #endif
160 
161 #ifdef ONCORE_ENABLE
162  "ONCORE_AT2",		/* second @ */
163  "ONCORE_ID1",		/* first character of command type */
164  "ONCORE_PAYLOAD",	/* payload eating */
165  "ONCORE_CHECKSUM",	/* checksum byte */
166  "ONCORE_CR",		/* closing CR */
167  "ONCORE_RECOGNIZED",	/* closing LF */
168 #endif
169 
170 #ifdef GEOSTAR_ENABLE
171  "GEOSTAR_LEADER_1",        /* first constant leader byte found */
172  "GEOSTAR_LEADER_2",        /* second constant leader byte found */
173  "GEOSTAR_LEADER_3",        /* third constant leader byte found */
174  "GEOSTAR_LEADER_4",        /* forth constant leader byte found */
175  "GEOSTAR_MESSAGE_ID_1",    /* first message id read */
176  "GEOSTAR_MESSAGE_ID_2",    /* second message id read */
177  "GEOSTAR_LENGTH_1",        /* first length byte read */
178  "GEOSTAR_LENGTH_2",        /* second length byte read */
179  "GEOSTAR_PAYLOAD",         /* payload eating */
180  "GEOSTAR_CHECKSUM_A",      /* checksum A byte (xor checksum) */
181  "GEOSTAR_CHECKSUM_B",      /* checksum B byte (xor checksum) */
182  "GEOSTAR_CHECKSUM_C",      /* checksum C byte (xor checksum) */
183  "GEOSTAR_RECOGNIZED",      /* this is also GEOSTAR_CHECKSUM_D */
184 #endif
185 
186 #ifdef GREIS_ENABLE
187  "GREIS_EXPECTED",          /* expecting GREIS packet */
188  "GREIS_REPLY_1",           /* saw first byte of a reply */
189  "GREIS_REPLY_2",           /* saw second byte of a reply */
190  "GREIS_ID_1",              /* saw first byte of ID */
191  "GREIS_ID_2",              /* saw second byte of ID */
192  "GREIS_LENGTH_1",          /* saw first length byte */
193  "GREIS_LENGTH_2",          /* saw second length byte */
194  "GREIS_PAYLOAD",           /* we're in a GREIS payload */
195  "GREIS_RECOGNIZED",        /* found end of the GREIS packet */
196 #endif
197 
198 /*
199  * Packet formats without checksums start here.  We list them last so
200  * that if a format with a conflicting structure *and* a checksum can
201  * be recognized, that will be preferred.
202  */
203 
204 #if defined(TSIP_ENABLE) || defined(GARMIN_ENABLE)
205  "TSIP_LEADER",		/* a DLE after having seen TSIP data */
206  "TSIP_PAYLOAD",	/* we're in TSIP payload */
207  "TSIP_DLE",		/* we've seen a DLE in TSIP payload */
208  "TSIP_RECOGNIZED",	/* found end of the TSIP packet */
209  "GARMIN_RECOGNIZED",	/* found end of Garmin packet */
210 #endif /* TSIP_ENABLE GARMIN_ENABLE */
211 
212 #ifdef RTCM104V2_ENABLE
213  "RTCM2_SYNC_STATE",	/* we have sync lock */
214  "RTCM2_SKIP_STATE",	/* we have sync lock, but this character is bad */
215  "RTCM2_RECOGNIZED",	/* we have an RTCM packet */
216 #endif /* RTCM104V2_ENABLE */
217 
218 #ifdef RTCM104V3_ENABLE
219  "RTCM3_LEADER_1",      /* constant leader byte found */
220  "RTCM3_LEADER_2",      /* second leader byte found (high 6 bits zero) */
221  "RTCM3_PAYLOAD",       /* gathering payload */
222  "RTCM3_RECOGNIZED",    /* RTCM3 packet recognized */
223 #endif
224 
225 #ifdef PASSTHROUGH_ENABLE
226  "JSON_LEADER",         /* JSON leading { found */
227  "JSON_STRINGLITERAL",  /* start of JSON string literal seen */
228  "JSON_STRING_SOLIDUS", /* backslash in string */
229  "JSON_END_ATTRIBUTE",  /* end of JSON attribute */
230  "JSON_EXPECT_VALUE",   /* just after colon */
231  "JSON_END_VALUE",      /* end of JSON value */
232  "JSON_NUMBER",         /* inside a JSON numeric literal */
233  "JSON_SPECIAL",        /* inside a JSON special literal (true,false,null) */
234  "JSON_RECOGNIZED",     /* JSON packet recognized */
235 #endif
236 
237 #ifdef STASH_ENABLE
238  "STASH_RECOGNIZED",    /* stashable prefix recognized */
239 #endif
240 
241 /* end of packet_states.h */
242