Trimble Standard Interface Protocol

A

A.19 Sample TSIP Routines

The following sections give sample routines that use command packet 0x1F and report packet 045 for getting software version information from the ACE UTC GPS via COM1. Source code for a working TSIP monitor program is available at www.trimble.com/ support/files.

Sending out TSIP command packet 0x1F

In general, all TSIP packets use the structure TSIPPKT:

#define MAX_RPTBUF

256

 

typedef struct {

 

 

short

 

 

cnt;

/*

size of buf */

unsigned char

 

 

status,

/*

TSIP packet format and parse status */

code,

/*

TSIP id code */

buf[MAX_RPTBUF]; /*

command or report string */

} TSIPPKT;

 

 

Communication with the ACE UTC GPS is accomplished through command routines and report routines. Each command routine use send_cmd() which supplies the DLE stuffing to the command string and sends the command to the serial port using the primitive function sendb().

A-134

Acutime 2000 Synchronization Kit User Guide

Page 240
Image 240
Trimble Outdoors Part Number 45005-00-ENG manual Sample Tsip Routines, Sending out Tsip command packet 0x1F