Lines Matching defs:msg_buf
222 struct msg_buf
260 sizeof(struct msg_buf) /* no private data (complete packets) */
601 struct msg_buf *msg_buf;
603 msg_buf = (struct msg_buf *)parseio->parse_pdata;
607 if (!msg_buf)
610 if ( msg_buf->phase == MBG_NONE )
617 msg_buf->len = sizeof( header ); /* prepare to receive msg header */
618 msg_buf->phase = MBG_HEADER; /* receiving header */
624 msg_buf->len = 0;
625 msg_buf->phase = MBG_STRING; /* prepare to receive ASCII ETX delimited message */
643 if ((msg_buf->phase == MBG_STRING) &&
651 msg_buf->phase = MBG_NONE; /* buffer overflow - discard */
658 switch (msg_buf->phase)
662 msg_buf->len--;
664 if ( msg_buf->len ) /* transfer not complete */
667 parseprintf(DD_PARSE, ("gps_input: %s complete\n", (msg_buf->phase == MBG_DATA) ? "data" : "header"));
674 msg_buf->phase = MBG_NONE;
690 if ( msg_buf->phase == MBG_HEADER )
708 msg_buf->phase = MBG_NONE; /* back to hunting mode */
715 msg_buf->phase = MBG_NONE; /* back to hunting mode */
721 msg_buf->len = header.len;/* save number of bytes to wait for */
722 msg_buf->phase = MBG_DATA; /* flag header already complete */
731 msg_buf->phase = MBG_NONE; /* back to hunting mode */