diff --git a/README b/README index 4de22d0b..32ec24f5 100644 --- a/README +++ b/README @@ -16,9 +16,16 @@ Features - get fetch data from ebus participant - set adjust data of ebus participant - cyc fetch data from collected cycle messages - - log change loglevel - dump toggle dump on/off + - log change loglevel - quit close connection + - help print help page + + +Dependency +---------- + * libebus (https://github.com/yuhu-/libebus) + * glibc Build diff --git a/src/baseloop.cpp b/src/baseloop.cpp index 2b3e1323..c03cbc01 100644 --- a/src/baseloop.cpp +++ b/src/baseloop.cpp @@ -213,6 +213,16 @@ std::string BaseLoop::decodeMessage(const std::string& data) result << "done"; break; + case help: + result << " get - fetch ebus data [get class cmd (sub)]" << std::endl + << " set - set ebus values [set class cmd value]" << std::endl + << " cyc - fetch cycle data [cyc class cmd (sub)]" << std::endl + << " dump - change dump state [dump on|off]" << std::endl + << " log - change log level [log error|event|trace|debug]" << std::endl + << " quit - close connection" << std::endl + << " help - print this page"; + break; + default: break; } diff --git a/src/baseloop.h b/src/baseloop.h index f2cf3d0c..1ecb7951 100644 --- a/src/baseloop.h +++ b/src/baseloop.h @@ -70,6 +70,7 @@ private: cyc, // fetch cycle data dump, // change dump state log, // change log level + help, // print commands notfound }; @@ -81,6 +82,7 @@ private: if (strcasecmp(item.c_str(), "cyc") == 0) return cyc; if (strcasecmp(item.c_str(), "dump") == 0) return dump; if (strcasecmp(item.c_str(), "log") == 0) return log; + if (strcasecmp(item.c_str(), "help") == 0) return help; return notfound; }