- Timestamp:
- Sep 11, 2008, 11:18:34 AM (16 years ago)
- Location:
- trunk/ntripserver
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ntripserver/README
r655 r1113 119 119 -b <BaudRate> Serial input baud rate, default: 19200 bps, mandatory 120 120 if <InputMode>=1 121 -f <InitFile> Name of initialization file to be send to input device, 122 optional 121 123 122 124 <InputMode> = 2|5 (IP port | UDP port): -
trunk/ntripserver/ntripserver.c
r933 r1113 1 1 /* 2 * $Id: ntripserver.c,v 1.4 3 2008/05/21 08:01:20stuerze Exp $2 * $Id: ntripserver.c,v 1.44 2008/06/06 07:34:09 stuerze Exp $ 3 3 * 4 4 * Copyright (c) 2003...2007 … … 37 37 38 38 /* CVS revision and version */ 39 static char revisionstr[] = "$Revision: 1.4 3$";40 static char datestr[] = "$Date: 2008/0 5/21 08:01:20$";39 static char revisionstr[] = "$Revision: 1.44 $"; 40 static char datestr[] = "$Date: 2008/06/06 07:34:09 $"; 41 41 42 42 #include <ctype.h> … … 557 557 if(gps_serial == INVALID_HANDLE_VALUE) exit(1); 558 558 printf("serial input: device = %s, speed = %d\n", ttyport, ttybaud); 559 560 if(initfile) 561 { 562 char buffer[1024]; 563 FILE *fh; 564 int i; 565 566 if((fh = fopen(initfile, "r"))) 567 { 568 while((i = fread(buffer, 1, sizeof(buffer), fh)) > 0) 569 { 570 #ifndef WINDOWSVERSION 571 if((write(gps_serial, buffer, i)) != i) 572 { 573 perror("WARNING: sending init file"); 574 input_init = 0; 575 break; 576 } 577 #else 578 DWORD nWrite = -1; 579 if(!WriteFile(gps_serial, buffer, sizeof(buffer), &nWrite, NULL)) 580 { 581 fprintf(stderr,"ERROR: sending init file \n"); 582 input_init = 0; 583 break; 584 } 585 i = (int)nWrite; 586 #endif 587 } 588 if(i < 0) 589 { 590 perror("ERROR: reading init file"); 591 reconnect_sec_max = 0; 592 input_init = 0; 593 break; 594 } 595 fclose(fh); 596 } 597 else 598 { 599 fprintf(stderr, "ERROR: can't read init file <%s>\n", initfile); 600 reconnect_sec_max = 0; 601 input_init = 0; 602 break; 603 } 604 } 559 605 } 560 606 break; … … 1741 1787 fprintf(stderr, " <InputMode>=1\n"); 1742 1788 fprintf(stderr, " -b <BaudRate> Serial input baud rate, default: 19200 bps, mandatory\n"); 1743 fprintf(stderr, " if <InputMode>=1\n\n"); 1789 fprintf(stderr, " if <InputMode>=1\n"); 1790 fprintf(stderr, " -f <InitFile> Name of initialization file to be send to input device,\n"); 1791 fprintf(stderr, " optional\n\n"); 1744 1792 fprintf(stderr, " <InputMode> = 2|5 (IP port | UDP port):\n"); 1745 1793 fprintf(stderr, " -H <ServerHost> Input host name or address, default: 127.0.0.1,\n");
Note:
See TracChangeset
for help on using the changeset viewer.