class BaseLoop: help page added; ReadMe adapted.
This commit is contained in:
@@ -16,9 +16,16 @@ Features
|
|||||||
- get fetch data from ebus participant
|
- get fetch data from ebus participant
|
||||||
- set adjust data of ebus participant
|
- set adjust data of ebus participant
|
||||||
- cyc fetch data from collected cycle messages
|
- cyc fetch data from collected cycle messages
|
||||||
- log change loglevel
|
|
||||||
- dump toggle dump on/off
|
- dump toggle dump on/off
|
||||||
|
- log change loglevel
|
||||||
- quit close connection
|
- quit close connection
|
||||||
|
- help print help page
|
||||||
|
|
||||||
|
|
||||||
|
Dependency
|
||||||
|
----------
|
||||||
|
* libebus (https://github.com/yuhu-/libebus)
|
||||||
|
* glibc
|
||||||
|
|
||||||
|
|
||||||
Build
|
Build
|
||||||
|
|||||||
@@ -213,6 +213,16 @@ std::string BaseLoop::decodeMessage(const std::string& data)
|
|||||||
result << "done";
|
result << "done";
|
||||||
break;
|
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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ private:
|
|||||||
cyc, // fetch cycle data
|
cyc, // fetch cycle data
|
||||||
dump, // change dump state
|
dump, // change dump state
|
||||||
log, // change log level
|
log, // change log level
|
||||||
|
help, // print commands
|
||||||
|
|
||||||
notfound
|
notfound
|
||||||
};
|
};
|
||||||
@@ -81,6 +82,7 @@ private:
|
|||||||
if (strcasecmp(item.c_str(), "cyc") == 0) return cyc;
|
if (strcasecmp(item.c_str(), "cyc") == 0) return cyc;
|
||||||
if (strcasecmp(item.c_str(), "dump") == 0) return dump;
|
if (strcasecmp(item.c_str(), "dump") == 0) return dump;
|
||||||
if (strcasecmp(item.c_str(), "log") == 0) return log;
|
if (strcasecmp(item.c_str(), "log") == 0) return log;
|
||||||
|
if (strcasecmp(item.c_str(), "help") == 0) return help;
|
||||||
|
|
||||||
return notfound;
|
return notfound;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user