aboutsummaryrefslogtreecommitdiffstats
path: root/modbuslog.c
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2011-10-15 14:44:28 +0100
committerJonathan McCrohan <jmccrohan@gmail.com>2011-10-15 14:44:28 +0100
commita2b89c88185d680051076e9b341c8b8f6cf5b25d (patch)
tree2d8457d844d57a4696c948e1b59b4404dd58925d /modbuslog.c
parente60a7cc135af7ee738d67ecc7bd02ce18963ace6 (diff)
downloadverteco-a2b89c88185d680051076e9b341c8b8f6cf5b25d.tar.gz
Add GPLv3 licence.
Diffstat (limited to '')
-rw-r--r--modbuslog.c (renamed from verteco.c)24
-rw-r--r--modbuslog.cfg11
2 files changed, 33 insertions, 2 deletions
diff --git a/verteco.c b/modbuslog.c
index 91391dd..a73dd94 100644
--- a/verteco.c
+++ b/modbuslog.c
@@ -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;
+};