Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
hardware
open2300
_service:download_url:DumpConfigTool-1.0.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:download_url:DumpConfigTool-1.0.patch of Package open2300
diff --git a/Makefile b/Makefile index 92a2cc0..2632308 100755 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ FETCHOBJ = fetch2300.o rw2300.o linux2300.o win2300.o WUOBJ = wu2300.o rw2300.o linux2300.o win2300.o CWOBJ = cw2300.o rw2300.o linux2300.o win2300.o DUMPOBJ = dump2300.o rw2300.o linux2300.o win2300.o +DUMPCONFIGOBJ = dumpconfig2300.o rw2300.o linux2300.o win2300.o HISTOBJ = history2300.o rw2300.o linux2300.o win2300.o HISTLOGOBJ = histlog2300.o rw2300.o linux2300.o win2300.o DUMPBINOBJ = bin2300.o rw2300.o linux2300.o win2300.o @@ -47,7 +48,7 @@ INSTALL = install ####### Build rules -all: open2300 dump2300 log2300 fetch2300 wu2300 cw2300 history2300 histlog2300 bin2300 xml2300 light2300 interval2300 minmax2300 mysql2300 mysqlhistlog2300 +all: open2300 dump2300 dumpconfig2300 log2300 fetch2300 wu2300 cw2300 history2300 histlog2300 bin2300 xml2300 light2300 interval2300 minmax2300 open2300 : $(OBJ) $(CC) $(CFLAGS) -o $@ $(OBJ) $(CC_LDFLAGS) @@ -55,6 +56,9 @@ open2300 : $(OBJ) dump2300 : $(DUMPOBJ) $(CC) $(CFLAGS) -o $@ $(DUMPOBJ) $(CC_LDFLAGS) +dumpconfig2300 : $(DUMPCONFIGOBJ) + $(CC) $(CFLAGS) -o $@ $(DUMPCONFIGOBJ) $(CC_LDFLAGS) + log2300 : $(LOGOBJ) $(CC) $(CFLAGS) -o $@ $(LOGOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) diff --git a/dumpconfig2300.c b/dumpconfig2300.c new file mode 100644 index 0000000..19baedb --- /dev/null +++ b/dumpconfig2300.c @@ -0,0 +1,59 @@ +/* openconfig2300 - dumpconfig2300.c + * + * Version 1.10 + * + * Dump the open2300 configuration + * + * Copyright 2010, Wesley Moore + * This program is published under the GNU General Public license + */ + +#include <stdlib.h> +#include <stdio.h> + +#include "rw2300.h" + +/********** MAIN PROGRAM ************************************************ + * + * This program prints out the content of the open2300 configuration + * file passed as the first argument or the first configuration file + * found in the standard search paths. + * + ***********************************************************************/ +int main(int argc, char *argv[]) +{ + struct config_type config; + char *config_path = NULL; + int i; + if(argc >= 2) config_path = argv[1]; + + // Get serial port from config file. + get_configuration(&config, config_path); + + printf("serial_device_name\t%s\n", config.serial_device_name); + printf("citizen_weather_id\t%s\n", config.citizen_weather_id); + printf("citizen_weather_latitude\t%s\n", config.citizen_weather_latitude); + printf("citizen_weather_longitude\t%s\n", config.citizen_weather_longitude); + for(i = 0; i < config.num_hosts; i++) + { + printf("aprs_host %d\t%s:%d\n", i, config.aprs_host[i].name, config.aprs_host[i].port); + } + printf("weather_underground_id\t%s\n", config.weather_underground_id); + printf("weather_underground_password\t%s\n", config.weather_underground_password); + printf("timezone\t%s\n", config.timezone); + printf("wind_speed_conv_factor\t%lf\n", config.wind_speed_conv_factor); + printf("temperature_conv\t%d\n", config.temperature_conv); + printf("rain_conv_factor\t%lf\n", config.rain_conv_factor); + printf("pressure_conv_factor\t%lf\n", config.pressure_conv_factor); + printf("mysql_host\t%s\n", config.mysql_host); + printf("mysql_user\t%s\n", config.mysql_user); + printf("mysql_passwd\t%s\n", config.mysql_passwd); + printf("mysql_database\t%s\n", config.mysql_database); + printf("mysql_port\t%d\n", config.mysql_port); + printf("pgsql_connect\t%s\n", config.pgsql_connect); + printf("pgsql_table\t%s\n", config.pgsql_table); + printf("pgsql_station\t%s\n", config.pgsql_station); + + return(EXIT_SUCCESS); +} +
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor