Lines Matching refs:msg_buf
224 struct msg_buf
262 sizeof(struct msg_buf) /* no private data (complete packets) */
603 struct msg_buf *msg_buf;
605 msg_buf = (struct msg_buf *)parseio->parse_pdata;
609 if (!msg_buf)
612 if ( msg_buf->phase == MBG_NONE )
619 msg_buf->len = sizeof( header ); /* prepare to receive msg header */
620 msg_buf->phase = MBG_HEADER; /* receiving header */
626 msg_buf->len = 0;
627 msg_buf->phase = MBG_STRING; /* prepare to receive ASCII ETX delimited message */
645 if ((msg_buf->phase == MBG_STRING) &&
653 msg_buf->phase = MBG_NONE; /* buffer overflow - discard */
660 switch (msg_buf->phase)
664 msg_buf->len--;
666 if ( msg_buf->len ) /* transfer not complete */
669 parseprintf(DD_PARSE, ("gps_input: %s complete\n", (msg_buf->phase == MBG_DATA) ? "data" : "header"));
676 msg_buf->phase = MBG_NONE;
692 if ( msg_buf->phase == MBG_HEADER )
710 msg_buf->phase = MBG_NONE; /* back to hunting mode */
717 msg_buf->phase = MBG_NONE; /* back to hunting mode */
723 msg_buf->len = header.len;/* save number of bytes to wait for */
724 msg_buf->phase = MBG_DATA; /* flag header already complete */
733 msg_buf->phase = MBG_NONE; /* back to hunting mode */