From 9101d5dd33410eaa51ac79ad146247fafa476991 Mon Sep 17 00:00:00 2001
From: Florian Pose <fp@igh-essen.com>
Date: Tue, 22 Jul 2008 15:24:46 +0000
Subject: [PATCH] Updated first part of command documentation.

---
 tool/cmd_config.cpp       | 19 ++++++++++++++++++-
 tool/cmd_data.cpp         |  2 +-
 tool/cmd_debug.cpp        | 13 +++++++++++--
 tool/cmd_domain.cpp       | 28 +++++++++++++++++++++++++++-
 tool/cmd_master.cpp       |  4 +++-
 tool/cmd_pdos.cpp         |  1 +
 tool/cmd_sdo_download.cpp |  1 +
 tool/cmd_sdo_upload.cpp   |  1 +
 tool/cmd_sdos.cpp         |  1 +
 tool/cmd_sii_read.cpp     |  1 +
 tool/cmd_sii_write.cpp    |  1 +
 tool/cmd_slaves.cpp       |  1 +
 tool/cmd_states.cpp       |  1 +
 tool/cmd_xml.cpp          |  1 +
 14 files changed, 69 insertions(+), 6 deletions(-)

diff --git a/tool/cmd_config.cpp b/tool/cmd_config.cpp
index ff0e6b71..ec060a6c 100644
--- a/tool/cmd_config.cpp
+++ b/tool/cmd_config.cpp
@@ -17,8 +17,25 @@ using namespace std;
 const char *help_config =
     "[OPTIONS]\n"
     "\n"
+    "Output information about the slave configurations supplied by the\n"
+    "application.\n"
     "\n"
-    "Command-specific options:\n";
+    "Without the --verbose option, each line of output shows one slave\n"
+    "configuration. Example:\n"
+    "\n"
+    "1001:0  0x0000003b/0x02010000  -  -\n"
+    "|       |                      |  |\n"
+    "|       |                      |  \\- Slave is operational.\n"
+    "|       |                      \\- Slave has been found.\n"
+    "|       \\- Hexadecimal vendor ID and product code, separated by a\n"
+    "|          slash.\n"
+    "\\- Decimal alias and position, separated by a colon.\n"
+    "\n"
+    "With the --verbose option given, the configured Pdos and Sdos are\n"
+    "additionally printed.\n"
+    "\n"
+    "Command-specific options:\n"
+    "  --verbose  -v  Show detailed configurations.\n";
 
 /*****************************************************************************/
 
diff --git a/tool/cmd_data.cpp b/tool/cmd_data.cpp
index 42e0113f..f567ef83 100644
--- a/tool/cmd_data.cpp
+++ b/tool/cmd_data.cpp
@@ -19,7 +19,7 @@ const char *help_data =
     "Command-specific options:\n"
     "  --domain -d <index> Positive numerical domain index. If this option\n"
     "                      is not specified, data of all domains are\n"
-    "                      output.\n";
+    "                      concatenated.\n";
 
 /****************************************************************************/
 
diff --git a/tool/cmd_debug.cpp b/tool/cmd_debug.cpp
index 7d5277a4..fe229e5e 100644
--- a/tool/cmd_debug.cpp
+++ b/tool/cmd_debug.cpp
@@ -13,10 +13,19 @@ using namespace std;
 /*****************************************************************************/
 
 const char *help_debug =
-    "[OPTIONS]\n"
+    "<LEVEL>\n"
     "\n"
+    "Set the master debug level.\n"
     "\n"
-    "Command-specific options:\n";
+    "Debug messages are printed to syslog.\n"
+    "\n"
+    "Arguments:\n"
+    "  LEVEL must be an unsigned integer, specified\n"
+    "        either in decimal (no prefix), octal (prefix '0')\n"
+    "        or hexadecimal (prefix '0x').\n"
+    "        0 stands for no debugging output,\n"
+    "        1 means some debug messages, and\n"
+    "        2 outputs all frame data (use with caution!).\n";
 
 /****************************************************************************/
 
diff --git a/tool/cmd_domain.cpp b/tool/cmd_domain.cpp
index a1f3c189..aa559ea0 100644
--- a/tool/cmd_domain.cpp
+++ b/tool/cmd_domain.cpp
@@ -15,8 +15,34 @@ using namespace std;
 const char *help_domains =
     "[OPTIONS]\n"
     "\n"
+    "Show information about the application's configured domains.\n"
     "\n"
-    "Command-specific options:\n";
+    "Without the --verbose option, one domain is displayed per line.\n"
+    "Example:\n"
+    "\n"
+    "Domain0: LogBaseAddr 0x00000000, Size   6, WorkingCounter 0/1\n"
+    "\n"
+    "The domain's base address for the logical datagram (LRD/LWR/LRW)\n"
+    "is displayed followed by the domain's process data size in byte.\n"
+    "The last values are the current datagram working counter sum and\n"
+    "the expected working counter sum. If the values are equal, all\n"
+    "Pdos are exchanged.\n"
+    "\n"
+    "If the --verbose option is given, the participating slave\n"
+    "configurations/FMMUs and the current process data are additionally\n"
+    "displayed:\n"
+    "\n"
+    "Domain1: LogBaseAddr 0x00000006, Size   6, WorkingCounter 0/1\n"
+    "  SlaveConfig 1001:0, SM3 ( Input), LogAddr 0x00000006, Size 6\n"
+    "    00 00 00 00 00 00\n"
+    "\n"
+    "The process data are displayed as raw hexadecimal bytes.\n"
+    "\n"
+    "Command-specific options:\n"
+    "  --domain   -d <index> Positive numerical domain index. If this\n"
+    "                        option is not specified, all domains are\n"
+    "                        displayed.\n"
+    "  --verbose  -v         Show FMMUs and process data.\n";
 
 /****************************************************************************/
 
diff --git a/tool/cmd_master.cpp b/tool/cmd_master.cpp
index e6c650ee..5d40762d 100644
--- a/tool/cmd_master.cpp
+++ b/tool/cmd_master.cpp
@@ -15,8 +15,10 @@ using namespace std;
 const char *help_master =
     "[OPTIONS]\n"
     "\n"
+    "Show master and Ethernet device information.\n"
     "\n"
-    "Command-specific options:\n";
+    "Command-specific options:\n"
+    "  --master  -m <master>  Index of the master to use. Default: 0\n";
 
 /****************************************************************************/
 
diff --git a/tool/cmd_pdos.cpp b/tool/cmd_pdos.cpp
index f590d4c0..a64e27e2 100644
--- a/tool/cmd_pdos.cpp
+++ b/tool/cmd_pdos.cpp
@@ -12,6 +12,7 @@ using namespace std;
 
 /****************************************************************************/
 
+// FIXME
 const char *help_pdos =
     "[OPTIONS]\n"
     "\n"
diff --git a/tool/cmd_sdo_download.cpp b/tool/cmd_sdo_download.cpp
index f8577ae4..1e606e5e 100644
--- a/tool/cmd_sdo_download.cpp
+++ b/tool/cmd_sdo_download.cpp
@@ -13,6 +13,7 @@ using namespace std;
 
 /****************************************************************************/
 
+// FIXME
 const char *help_sdo_download =
     "[OPTIONS]\n"
     "\n"
diff --git a/tool/cmd_sdo_upload.cpp b/tool/cmd_sdo_upload.cpp
index e4baf1ff..4911c5a1 100644
--- a/tool/cmd_sdo_upload.cpp
+++ b/tool/cmd_sdo_upload.cpp
@@ -13,6 +13,7 @@ using namespace std;
 
 /****************************************************************************/
 
+// FIXME
 const char *help_sdo_upload =
     "[OPTIONS]\n"
     "\n"
diff --git a/tool/cmd_sdos.cpp b/tool/cmd_sdos.cpp
index d5933230..8d7d0bc3 100644
--- a/tool/cmd_sdos.cpp
+++ b/tool/cmd_sdos.cpp
@@ -13,6 +13,7 @@ using namespace std;
 
 /****************************************************************************/
 
+// FIXME
 const char *help_sdos =
     "[OPTIONS]\n"
     "\n"
diff --git a/tool/cmd_sii_read.cpp b/tool/cmd_sii_read.cpp
index db23486d..a0fae1df 100644
--- a/tool/cmd_sii_read.cpp
+++ b/tool/cmd_sii_read.cpp
@@ -12,6 +12,7 @@ using namespace std;
 
 /****************************************************************************/
 
+// FIXME
 const char *help_sii_read =
     "[OPTIONS]\n"
     "\n"
diff --git a/tool/cmd_sii_write.cpp b/tool/cmd_sii_write.cpp
index a37315a8..ecfe38ee 100644
--- a/tool/cmd_sii_write.cpp
+++ b/tool/cmd_sii_write.cpp
@@ -14,6 +14,7 @@ using namespace std;
 
 /****************************************************************************/
 
+// FIXME
 const char *help_sii_write =
     "[OPTIONS]\n"
     "\n"
diff --git a/tool/cmd_slaves.cpp b/tool/cmd_slaves.cpp
index 8ee30bc5..b9a0c4f7 100644
--- a/tool/cmd_slaves.cpp
+++ b/tool/cmd_slaves.cpp
@@ -13,6 +13,7 @@ using namespace std;
 
 /****************************************************************************/
 
+// FIXME
 const char *help_slaves =
     "[OPTIONS]\n"
     "\n"
diff --git a/tool/cmd_states.cpp b/tool/cmd_states.cpp
index e254acb3..2810341c 100644
--- a/tool/cmd_states.cpp
+++ b/tool/cmd_states.cpp
@@ -11,6 +11,7 @@ using namespace std;
 
 /****************************************************************************/
 
+// FIXME
 const char *help_states =
     "[OPTIONS]\n"
     "\n"
diff --git a/tool/cmd_xml.cpp b/tool/cmd_xml.cpp
index 48aa79b1..8c3e841b 100644
--- a/tool/cmd_xml.cpp
+++ b/tool/cmd_xml.cpp
@@ -12,6 +12,7 @@ using namespace std;
 
 /****************************************************************************/
 
+// FIXME
 const char *help_xml =
     "[OPTIONS]\n"
     "\n"
-- 
GitLab