cleanup specfile for packaging
[profile/ivi/gpsd.git] / packet_states.h
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
7 #ifdef NMEA_ENABLE
8    NMEA_DOLLAR,         /* we've seen first character of NMEA leader */
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 A of possible marine AIS message */
25    AIS_LEAD_2,          /* seen I of possible marine AIS message */
26
27    SEATALK_LEAD_1,      /* SeaTalk/Garmin packet leader 'I' */
28 #endif /* NMEA_ENABLE */
29
30    DLE_LEADER,          /* we've seen the TSIP/EverMore leader (DLE) */
31
32 #ifdef TRIPMATE_ENABLE
33    ASTRAL_1,            /* ASTRAL leader A */
34    ASTRAL_2,            /* ASTRAL leader S */
35    ASTRAL_3,            /* ASTRAL leader T */
36    ASTRAL_4,            /* ASTRAL leader R */
37    ASTRAL_5,            /* ASTRAL leader A */
38 #endif /* TRIPMATE_ENABLE */
39
40 #ifdef EARTHMATE_ENABLE
41    EARTHA_1,            /* EARTHA leader E */
42    EARTHA_2,            /* EARTHA leader A */
43    EARTHA_3,            /* EARTHA leader R */
44    EARTHA_4,            /* EARTHA leader T */
45    EARTHA_5,            /* EARTHA leader H */
46 #endif /* EARTHMATE_ENABLE */
47
48 #ifdef SIRF_ENABLE
49    SIRF_LEADER_1,       /* we've seen first character of SiRF leader */
50    SIRF_LEADER_2,       /* seen second character of SiRF leader */
51    SIRF_LENGTH_1,       /* seen first byte of SiRF length */
52    SIRF_PAYLOAD,        /* we're in a SiRF payload part */
53    SIRF_DELIVERED,      /* saw last byte of SiRF payload/checksum */
54    SIRF_TRAILER_1,      /* saw first byte of SiRF trailer */ 
55    SIRF_RECOGNIZED,     /* saw second byte of SiRF trailer */
56 #endif /* SIRF_ENABLE */
57
58 #ifdef ZODIAC_ENABLE
59    ZODIAC_EXPECTED,     /* expecting Zodiac packet */
60    ZODIAC_LEADER_1,     /* saw leading 0xff */
61    ZODIAC_LEADER_2,     /* saw leading 0x81 */
62    ZODIAC_ID_1,         /* saw first byte of ID */
63    ZODIAC_ID_2,         /* saw second byte of ID */
64    ZODIAC_LENGTH_1,     /* saw first byte of Zodiac packet length */
65    ZODIAC_LENGTH_2,     /* saw second byte of Zodiac packet length */
66    ZODIAC_FLAGS_1,      /* saw first byte of FLAGS */
67    ZODIAC_FLAGS_2,      /* saw second byte of FLAGS */
68    ZODIAC_HSUM_1,       /* saw first byte of Header sum */
69    ZODIAC_PAYLOAD,      /* we're in a Zodiac payload */
70    ZODIAC_RECOGNIZED,   /* found end of the Zodiac packet */
71 #endif /* ZODIAC_ENABLE */
72
73 #if defined(TNT_ENABLE) || defined(GARMINTXT_ENABLE) || defined(ONCORE_ENABLE)
74    AT1_LEADER,          /* saw True North status leader '@' */
75                         /* Garmin Simple Text starts with @ leader */
76                         /* Oncore starts with @ leader */
77    GTXT_RECOGNIZED,     /* */
78 #endif
79
80 #ifdef EVERMORE_ENABLE
81    EVERMORE_LEADER_1,   /* a DLE after having seen EverMore data */
82    EVERMORE_LEADER_2,   /* seen opening STX of EverMore packet */
83    EVERMORE_PAYLOAD,    /* in payload part of EverMore packet */
84    EVERMORE_PAYLOAD_DLE,/* DLE in payload part of EverMore packet */
85    EVERMORE_RECOGNIZED, /* found end of EverMore packet */
86 #endif /* EVERMORE_ENABLE */
87
88 #ifdef ITRAX_ENABLE
89    ITALK_LEADER_1,      /* saw leading < of iTalk packet */
90    ITALK_LEADER_2,      /* saw leading ! of iTalk packet */
91    ITALK_LENGTH,        /* saw packet length */
92    ITALK_PAYLOAD,       /* in payload part of iTalk Packet */
93    ITALK_DELIVERED,     /* seen end of payload */
94    ITALK_TRAILER,       /* saw iTalk trailer byte */
95    ITALK_RECOGNIZED,    /* found end of the iTalk packet */
96 #endif /* ITRAX_ENABLE */
97
98 #ifdef NAVCOM_ENABLE
99    NAVCOM_EXPECTED,     /* expecting Navcom packet */
100    NAVCOM_LEADER_1,     /* saw leading 0x02 */
101    NAVCOM_LEADER_2,     /* saw leading 0x99 */
102    NAVCOM_LEADER_3,     /* saw leading 0x66 */
103    NAVCOM_ID,           /* saw message ID */
104    NAVCOM_LENGTH_1,     /* saw first byte of Navcom packet length */
105    NAVCOM_LENGTH_2,     /* saw second byte of Navcom packet length */
106    NAVCOM_PAYLOAD,      /* we're in a Navcom payload */
107    NAVCOM_CSUM,         /* saw checksum */
108    NAVCOM_RECOGNIZED,   /* found end of the Navcom packet */
109 #endif /* NAVCOM_ENABLE */
110
111 #ifdef UBX_ENABLE
112    UBX_LEADER_1,        /* first constant leader byte found */
113    UBX_LEADER_2,        /* second constant leader byte found */
114    UBX_CLASS_ID,        /* classid read */
115    UBX_MESSAGE_ID,      /* message id read */
116    UBX_LENGTH_1,        /* first length byte read (le) */
117    UBX_LENGTH_2,        /* second length byte read (le) */
118    UBX_PAYLOAD,         /* payload eating */
119    UBX_CHECKSUM_A,      /* checksum A byte (tcp checksum) */
120    UBX_RECOGNIZED,      /* this is also UBX_CHECKSUM_B */
121 #endif
122
123 #ifdef SUPERSTAR2_ENABLE
124    SUPERSTAR2_LEADER,   /* leading SOH */
125    SUPERSTAR2_ID1,      /* message type */
126    SUPERSTAR2_ID2,      /* message type xor 0xff */
127    SUPERSTAR2_PAYLOAD,  /* length of the actual packet data */
128    SUPERSTAR2_CKSUM1,
129    SUPERSTAR2_CKSUM2,
130    SUPERSTAR2_RECOGNIZED,
131 #endif
132
133 #ifdef ONCORE_ENABLE
134    ONCORE_AT2,          /* second @ */
135    ONCORE_ID1,          /* first character of command type */
136    ONCORE_PAYLOAD,      /* payload eating */
137    ONCORE_CHECKSUM,     /* checksum byte */
138    ONCORE_CR,           /* closing CR */
139    ONCORE_RECOGNIZED,   /* closing LF */
140 #endif
141
142
143 /*
144  * Packet formats without checksums start here.  We list them last so
145  * that if a format with a conflicting structure *and* a checksum can
146  * be recognized, that will be preferred.
147  */
148
149 #if defined(TSIP_ENABLE) || defined(GARMIN_ENABLE)
150    TSIP_LEADER,         /* a DLE after having seen TSIP data */
151    TSIP_PAYLOAD,        /* we're in TSIP payload */
152    TSIP_DLE,            /* we've seen a DLE in TSIP payload */
153    TSIP_RECOGNIZED,     /* found end of the TSIP packet */
154    GARMIN_RECOGNIZED,   /* found end of Garmin packet */
155 #endif /* TSIP_ENABLE GARMIN_ENABLE */
156
157 #ifdef RTCM104V2_ENABLE
158    RTCM2_SYNC_STATE,    /* we have sync lock */
159    RTCM2_SKIP_STATE,    /* we have sync lock, but this character is bad */
160    RTCM2_RECOGNIZED,    /* we have an RTCM packet */
161 #endif /* RTCM104V2_ENABLE */
162
163 #ifdef RTCM104V3_ENABLE
164    RTCM3_LEADER_1,      /* constant leader byte found */
165    RTCM3_LEADER_2,      /* second leader byte found (high 6 bits zero) */
166    RTCM3_PAYLOAD,       /* gathering payload */
167    RTCM3_RECOGNIZED,    /* RTCM3 packet recognized */
168 #endif
169
170 /* end of packet_states.h */