From 03d542ac64a481ea7199058591d2444eb3b29e0b Mon Sep 17 00:00:00 2001
From: g0dil <g0dil@wiback.org>
Date: Sun, 5 Oct 2008 22:08:10 +0000
Subject: [PATCH] Scheduler: Console 'events' command documentation

---
 Scheduler/Console/Executor.cc      |  2 +-
 Scheduler/Console/Executor.test.cc |  2 +-
 Scheduler/EventManager.cc          | 12 +++++++++++-
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/Scheduler/Console/Executor.cc b/Scheduler/Console/Executor.cc
index 80d632fb5..5a6337dd3 100644
--- a/Scheduler/Console/Executor.cc
+++ b/Scheduler/Console/Executor.cc
@@ -232,7 +232,7 @@ prefix_ void senf::console::Executor::help(std::ostream & output,
                                            ParseCommandInfo::TokensRange path)
 {
     GenericNode const & node (traverseNode(path));
-    output << prettyName(typeid(node)) << " at " << node.path() << "\n\n";
+    // output << prettyName(typeid(node)) << " at " << node.path() << "\n\n";
     node.help(output);
     output << std::flush;
 }
diff --git a/Scheduler/Console/Executor.test.cc b/Scheduler/Console/Executor.test.cc
index a2b98abe5..2c3367781 100644
--- a/Scheduler/Console/Executor.test.cc
+++ b/Scheduler/Console/Executor.test.cc
@@ -148,7 +148,7 @@ BOOST_AUTO_UNIT_TEST(executor)
         parser.parse("help /dir2", &setCommand);
         executor(os, commands.back());
         BOOST_CHECK_EQUAL( commands.back().builtin(), senf::console::ParseCommandInfo::BuiltinHELP );
-        BOOST_CHECK_EQUAL( os.str(), "senf::console::DirectoryNode at /dir2\n\nHelptext\n" );
+        BOOST_CHECK_EQUAL( os.str(), "Helptext\n" );
     }
 
     {
diff --git a/Scheduler/EventManager.cc b/Scheduler/EventManager.cc
index fdea03aba..aaf1622a1 100644
--- a/Scheduler/EventManager.cc
+++ b/Scheduler/EventManager.cc
@@ -39,7 +39,17 @@
 prefix_ senf::scheduler::detail::EventManager::EventManager()
 {
 #ifndef SENF_DISABLE_CONSOLE
-    consoleDir_().add("events", senf::membind(&EventManager::consoleEvents, this));
+    consoleDir_().add("events", senf::membind(&EventManager::consoleEvents, this))
+        .doc("List all scheduler events sorted by priority\n"
+             "\n"
+             "Columns:\n"
+             "    TP      event type: fd - file descriptor, tm - timer, si - UNIX signal\n"
+             "    NAME    descriptive event name\n"
+             "    ADDRESS address of event class instance\n"
+             "    RUNCNT  number of times, the event was called\n"
+             "    S       state: R - runnable, W - Waiting, '-' - event disabled\n"
+             "    INFO    further event specific information");
+
     senf::console::sysdir().add("scheduler", consoleDir_());
 #endif
 }
-- 
GitLab