ioctl (fd, GETDATA, &get);
4.4.3. Example 1: GPS Packet 46 - Health Packet Sample
int i;
char rbuf[STFP_MAX_READ];
printf ("\n\nGPS PACKET 46 - GPS HEALTH PACKET\n\n");
ioctl (fd, REQGPSPACKET, 0x46);
read (fd, rbuf, STFP_MAX_READ);
printf ("Raw Data: ");
for (i = 0; i < 18; i++)
printf ("%02X ", rbuf[i] & 0xff);
printf ("\nID: \t%02X \nStatus: 0x%02X \nError: \t0x%02X\n",
rbuf[1] & 0xff, rbuf[2] & 0xff, rbuf[3] & 0xff);
Note: Symmetricom bus cards support different GPS receivers. Please consult the Users Guide for
your bus card to access the GPS receiver commands that apply to your card.
4.4.4. Example 2: 1PPS Interrupt Sample
main ()
{
/* Open device */
open ("/dev/stfp0", O_RDWR);
/* Initialize to free Running Mode */
ioctl (fd, SELTIMINGMODE, MODE_FREERUN);
/* Initialize to binary time format */
ioctl (fd, SELTIMEFORMAT, TIME_BINARY);
/* Setup interrupt signal handler */
signal (SIGUSR1, sigHandler);
printf ("Hit RETURN to quit. . .\n");
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
- 217 -
5.4. Example Program
Need help?
Do you have a question about the bc635PCI-V2 and is the answer not in the manual?