From 9a07c5d4927a3414d7c3327bcb3a6e546ff4704a Mon Sep 17 00:00:00 2001 From: Roland Jax Date: Tue, 28 Oct 2014 11:07:11 +0100 Subject: [PATCH] 'config list' removed; 'config reload' renamed to 'reload'. --- .gitignore | 13 +++++++++++-- ChangeLog | 3 +++ README | 13 ++++++++----- src/ebusd/baseloop.cpp | 19 ++++--------------- src/ebusd/baseloop.h | 4 ++-- 5 files changed, 28 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index b7906a5b..119040b6 100644 --- a/.gitignore +++ b/.gitignore @@ -6,10 +6,19 @@ Makefile.in /autom4te.cache/ /config.* /configure -/ebusd /ebusd*.tar.* /stamp-h? .deps/ *.o *.dirstamp -/ebusctl +/src/libcore/libcore.a +/src/libebus/libebus.a +/src/ebusd/ebusd +/src/tools/ebusctl +/src/test/test_bus +/src/test/test_port +/src/test/test_configfile +/src/test/test_commands +/src/test/test_decode +/src/test/test_encode +/src/test/test_symbol diff --git a/ChangeLog b/ChangeLog index 0f1913ce..e758e4da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ ebusd - ChangeLog ----------------- +2014-10-28 Roland Jax +* libebus project merged into ebusd project. + 2014-10-21 Roland Jax * class EBusLoop: recvBuffer removed. diff --git a/README b/README index 58e6aa89..677ccbd1 100644 --- a/README +++ b/README @@ -17,21 +17,24 @@ Features - set adjust data of ebus participant - cyc fetch data from collected cycle messages - hex send given hex value to ebus (ZZ PB SB NN Dx) + - dump toggle dump on/off + - log areas change log areas - log level change log level - - config list not implemented yes - - config reload reload ebus configuration + + - reload reload ebus configuration + - stop stop daemon + - quit close connection + - help print help page Dependency ---------- - * libebus (https://github.com/yuhu-/libebus) * glibc - * pkgconfig Build @@ -51,7 +54,7 @@ See ./ebusd -h Vendor specific configuration files ----------------------------------- -See https://github.com/yuhu-/ebusd_config +See https://github.com/yuhu-/ebus-configuration Tools diff --git a/src/ebusd/baseloop.cpp b/src/ebusd/baseloop.cpp index d3a4426d..4ef45f93 100644 --- a/src/ebusd/baseloop.cpp +++ b/src/ebusd/baseloop.cpp @@ -328,20 +328,13 @@ std::string BaseLoop::decodeMessage(const std::string& data) break; - case config: - if (cmd.size() != 2) { - result << "usage: 'config list'" << std::endl - << " 'config reload'"; + case reload: + if (cmd.size() != 1) { + result << "usage: 'reload'"; break; } - // ToDo: ... - if (strcasecmp(cmd[1].c_str(), "LIST") == 0) { - result << "not implemented yet"; - break; - } - - if (strcasecmp(cmd[1].c_str(), "RELOAD") == 0) { + { // create Commands DB Commands* commands = ConfigCommands(A.getParam("p_ebusconfdir"), CSV).getCommands(); L.log(bas, trace, "ebus configuration dir: %s", A.getParam("p_ebusconfdir")); @@ -357,10 +350,6 @@ std::string BaseLoop::decodeMessage(const std::string& data) break; } - result << "usage: 'config list'" << std::endl - << " 'config reload'"; - break; - case help: result << "commands:" << std::endl << " get - fetch ebus data 'get class cmd (sub)'" << std::endl diff --git a/src/ebusd/baseloop.h b/src/ebusd/baseloop.h index b2de5b7c..9f66f57c 100644 --- a/src/ebusd/baseloop.h +++ b/src/ebusd/baseloop.h @@ -52,7 +52,7 @@ private: hex, // send hex value dump, // change dump state log, // logger settings - config, // ebus configuration + reload, // reload ebus configuration help, // print commands notfound }; @@ -65,7 +65,7 @@ private: if (strcasecmp(item.c_str(), "HEX") == 0) return hex; if (strcasecmp(item.c_str(), "DUMP") == 0) return dump; if (strcasecmp(item.c_str(), "LOG") == 0) return log; - if (strcasecmp(item.c_str(), "CONFIG") == 0) return config; + if (strcasecmp(item.c_str(), "RELOAD") == 0) return reload; if (strcasecmp(item.c_str(), "HELP") == 0) return help; return notfound;