FreeCalypso > hg > fc-rfcal-tools
changeset 21:a3f48378658d
autocal: beginning of fc-rfcal-vcxo
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 22 May 2017 20:51:55 +0000 |
parents | 7ac866c3baf6 |
children | e8bcead3aa9b |
files | autocal/Makefile autocal/sockopts.c autocal/vcxomain.c |
diffstat | 3 files changed, 58 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/autocal/Makefile Mon May 22 20:35:42 2017 +0000 +++ b/autocal/Makefile Mon May 22 20:51:55 2017 +0000 @@ -1,6 +1,6 @@ CC= gcc CFLAGS= -O2 -I/opt/freecalypso/include -OBJS= l1tmops.o rvinterf.o tsidsock.o +OBJS= l1tmops.o rvinterf.o sockopts.o tsidsock.o vcxomain.o all: ${OBJS}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/autocal/sockopts.c Mon May 22 20:51:55 2017 +0000 @@ -0,0 +1,34 @@ +/* + * This module contains the common code for handling + * -s and -t command line options. + */ + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <rvinterf/exitcodes.h> + +extern char *rvif_socket_pathname, *tsid_socket_pathname; + +socket_pathname_options(argc, argv) + char **argv; +{ + extern char *optarg; + int c; + + while ((c = getopt(argc, argv, "s:t:")) != EOF) { + switch (c) { + case 's': + rvif_socket_pathname = optarg; + continue; + case 't': + tsid_socket_pathname = optarg; + continue; + case '?': + default: + /* error msg already printed */ + exit(ERROR_USAGE); + } + } + return(0); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/autocal/vcxomain.c Mon May 22 20:51:55 2017 +0000 @@ -0,0 +1,23 @@ +/* + * This module contains the main() function for fc-rfcal-vcxo. + */ + +#include <stdio.h> +#include <stdlib.h> +#include <rvinterf/l1tm.h> +#include <rvinterf/exitcodes.h> +#include "stdband.h" + +#define VCXOCAL_BAND 900 +#define VCXOCAL_BAND_RFPW RFPW_STD_BAND(6, 0) +#define VCXOCAL_ARFCN 40 + +main(argc, argv) + char **argv; +{ + socket_pathname_options(argc, argv); + connect_rvinterf_socket(); + connect_tsid_socket(); + + +}