diff options
Diffstat (limited to '')
-rw-r--r-- | modbuslog.c (renamed from verteco.c) | 24 | ||||
-rw-r--r-- | modbuslog.cfg | 11 |
2 files changed, 33 insertions, 2 deletions
@@ -1,4 +1,24 @@ -/ gcc verteco.c -o verteco `pkg-config --libs --cflags libmodbus libconfig` +/* + * modbuslog + * + * Copyright (C) 2011 Jonathan McCrohan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +// gcc modbuslog.c -o modbuslog `pkg-config --libs --cflags libmodbus libconfig` + #include <stdio.h> #include <unistd.h> @@ -16,7 +36,7 @@ int main(int argc, char *argv[]) { -const char *CONFIG_FILE = "verteco.cfg"; +const char *CONFIG_FILE = "modbuslog.cfg"; config_t cfg; //config_setting_t *setting; diff --git a/modbuslog.cfg b/modbuslog.cfg new file mode 100644 index 0000000..ac325dc --- /dev/null +++ b/modbuslog.cfg @@ -0,0 +1,11 @@ +// verteco modbus logger + +cfg_version = 0.99; + +modbus = { + device = "/dev/ttyUSB1"; + baud = 19200; + data_bits = 8; + parity = "E" + stop_bits = 1; +}; |