A

Trimble Standard Interface Protocol

case ETX: /* End of message. */ rpt->status = COMPLETE; return(TRUE);

default: /* If previous message has ended, this is new ID code. */

reset_rptbuf(rpt); /* if not, this is an error. */ rpt->code = this_byte;

return(FALSE);

}

}

else if (this_byte == DLE) {

/* DLE byte without previous DLE stuffing…must be stuffing.

*/

rpt->status = HAVE_DLE; continue;

}

/* normal byte; add to report */ rpt->status = INCOMPLETE; rpt->buf[rpt->cnt] = this_byte; rpt->cnt++;

if (rpt->cnt > MAX_RPTBUF) { reset_rptbuf (rpt); return(FALSE);

}

}

}

/* Prepare for receipt of new report */ void reset_rptbuf (TSIPPKT *rpt)

{

rpt->cnt = 0; rpt->code = ETX; rpt->status = INCOMPLETE;

}

Acutime 2000 Synchronization Kit User Guide

A-137

Page 243
Image 243
Trimble Outdoors AcutimeTM2000 Synchronization Kit manual Acutime 2000 Synchronization Kit User Guide 137