Index: trunk/FACT++/src/Converter.cc
===================================================================
--- trunk/FACT++/src/Converter.cc	(revision 10655)
+++ trunk/FACT++/src/Converter.cc	(revision 10657)
@@ -895,7 +895,6 @@
        for (int j=0; j<n; j++)
        {
- //ETIENNE moved the +s-1 to the second argument and removed the -1
            reverse_copy(charSrc,  charSrc+s, charDest);
-		
+
            charSrc  += s;
            charDest += s;
@@ -933,9 +932,2 @@
     return Print(cout);
 }
-
-
-
-
-
-
-
Index: trunk/FACT++/src/Converter.h
===================================================================
--- trunk/FACT++/src/Converter.h	(revision 10655)
+++ trunk/FACT++/src/Converter.h	(revision 10657)
@@ -13,4 +13,5 @@
 
 #include <iostream>
+
 class Converter
 {
@@ -114,5 +115,5 @@
         for (size_t i=0; i<size/sizeof(T); i++)
         {
-            if (prefix && i%col==0)
+            if (prefix && col!=0 && i%col==0)
                 text << std::setfill('0') << std::setw(w) << i << "| ";
 
@@ -143,5 +144,5 @@
 
 // ***************************************************************************
-/** @fn GetHex(const void *dat, size_t size)
+/** @fn GetHex(const void *dat, size_t size, size_t col, bool prefix)
 
 Converts from a binary block into a hex representation.
@@ -154,5 +155,10 @@
 
 @param col
-    Number of columns before new line
+    Number of columns before new line (zero <default> to write a
+    continous stream
+
+@param prefix
+    Boolean which defines whether each line should be prefixed with a counter,
+    the default is true. It is ignored if col==0
 
 @tparam T
@@ -163,5 +169,4 @@
     The string
 
-
 **/
 // ***************************************************************************
Index: trunk/FACT++/src/Dim.cc
===================================================================
--- trunk/FACT++/src/Dim.cc	(revision 10655)
+++ trunk/FACT++/src/Dim.cc	(revision 10657)
@@ -1,2 +1,9 @@
+// **************************************************************************
+/** @namespace Dim
+
+@brief Namespace to host some global Dim helper functions
+
+*/
+// **************************************************************************
 #include "Dim.h"
 
@@ -10,8 +17,18 @@
 using namespace std;
 
-string Dim::GetLocalIp()
+// --------------------------------------------------------------------------
+//
+//! Tries to determine the local IP address with which we will connect
+//! to the DIM dns.
+//!
+//! @param dns
+//!     Address of the Dim-dns
+//!
+//! @returns
+//!     The IP Address through which the connection to the DNS will
+//!     take place.
+//!
+string Dim::GetLocalIp(const string &dns)
 {
-    const char *kDnsIp = getenv("DIM_DNS_NODE");
-
     struct addrinfo hints, *servinfo, *p;
 
@@ -21,8 +38,8 @@
 
     int rv;
-    if ((rv = getaddrinfo(kDnsIp, NULL, &hints, &servinfo)) != 0)
+    if ((rv = getaddrinfo(dns.c_str(), NULL, &hints, &servinfo)) != 0)
     {
         cout << "WARNING - getaddrinfo: " << gai_strerror(rv) << endl;
-        return kDnsIp;
+        return dns;
     }
 
@@ -68,10 +85,19 @@
     freeaddrinfo(servinfo); // all done with this structure
 
-    return kDnsIp;
+    return dns;
 }
 
+// --------------------------------------------------------------------------
+//
+//! Set the environment variable DIM_DNS_NODE to the given string and
+//! DIM_HOST_NODE to the IP-address through which this machine connects
+//! to the dns.
+//!
+//! @param dns
+//!     Address of the Dim-dns
+//!
 void Dim::Setup(const std::string &dns)
 {
-    setenv("DIM_DNS_NODE",  dns.c_str(),          1);
-    setenv("DIM_HOST_NODE", GetLocalIp().c_str(), 1);
+    setenv("DIM_DNS_NODE",  dns.c_str(),             1);
+    setenv("DIM_HOST_NODE", GetLocalIp(dns).c_str(), 1);
 }
Index: trunk/FACT++/src/Dim.h
===================================================================
--- trunk/FACT++/src/Dim.h	(revision 10655)
+++ trunk/FACT++/src/Dim.h	(revision 10657)
@@ -8,4 +8,20 @@
 namespace Dim
 {
+    std::string GetLocalIp(const std::string &dns);
+    void Setup(const std::string &dns);
+
+    // --------------------------------------------------------------------------
+    //
+    //! Simplification wrapper to send a command without data
+    //!
+    //! Example:
+    //!   - Dim::SendCommand("SERVER/COMMAND");
+    //!
+    //! @param command
+    //!     Dim command identifier
+    //!
+    //! @returns
+    //!     the return value of DimClient::sendCommand
+    //!
     inline bool SendCommand(const std::string &command)
     {
@@ -13,4 +29,26 @@
     }
 
+    // --------------------------------------------------------------------------
+    //
+    //! Simplification wrapper to send a command with the given data
+    //!
+    //! Example:
+    //!   - Dim::SendCommand("SERVER/COMMAND", uint16_t(42));
+    //!   - struct tm t; Dim::SendCommand("SERVER/TIME", t);
+    //!
+    //! @param command
+    //!     Dim command identifier
+    //!
+    //! @param t
+    //!     object to be sent, the pointer to the data to be sent is
+    //!     set to &t
+    //!
+    //! @template T
+    //!     type of the data to be sent. The size of the data to be sent
+    //!     is determined as sizeof(T)
+    //!
+    //! @returns
+    //!     the return value of DimClient::sendCommand
+    //!
     template<typename T>
         inline bool SendCommand(const std::string &command, const T &t)
@@ -18,8 +56,4 @@
         return DimClient::sendCommand(command.c_str(), (void*)&t, sizeof(t));
     }
-
-    std::string GetLocalIp();
-
-    void Setup(const std::string &dns);
 }
 
Index: trunk/FACT++/src/DimDescriptionService.cc
===================================================================
--- trunk/FACT++/src/DimDescriptionService.cc	(revision 10655)
+++ trunk/FACT++/src/DimDescriptionService.cc	(revision 10657)
@@ -25,8 +25,8 @@
 The description should contain as many descriptions as format chunks, e.g.
 
-I:1          should contain one description chunks
-I:1;F:1      should contain two description chunks
-I:2;F:1      should contain two description chunks
-I:2;I:1;F:1  should contain three description chunks
+ - I:1          should contain one description chunks
+ - I:1;F:1      should contain two description chunks
+ - I:2;F:1      should contain two description chunks
+ - I:2;I:1;F:1  should contain three description chunks
 
 */
Index: trunk/FACT++/src/DimErrorRedirecter.cc
===================================================================
--- trunk/FACT++/src/DimErrorRedirecter.cc	(revision 10655)
+++ trunk/FACT++/src/DimErrorRedirecter.cc	(revision 10657)
@@ -1,4 +1,24 @@
 // **************************************************************************
 /** @class DimErrorRedirecter
+
+@brief A base class taking care of padding, exit handler and error handlers
+
+This class first switches off padding for the DimServer and the DimClient
+(dis and dic). Furthermore, it redirects both error handlers to the
+DimErrorRedirecter. Redirect the exit handler.
+
+Only one instance of this class is allowed, since all Dim handlers are
+global.
+
+In the destructor of the class the handlers are correctly restored.
+The padding setup is kept.
+
+For FACT++ all Dim data is transmitted without padding!
+
+To catch the error messages overwrite the errorHandler. The errorHandler
+of the DimErrorRedirecter redirects the error messages to the logging
+stream given in the constructor.
+
+To catch the exit requests overwrite the exitHandler.
 
 */
@@ -15,4 +35,11 @@
 int DimErrorRedirecter::cnt = 0;
 
+// --------------------------------------------------------------------------
+//
+//! - disable padding for dim server and dim client
+//! - redirect DimClient error handler
+//! - redirect DimServer error handler
+//! - set exit handler of DimServer
+//
 DimErrorRedirecter::DimErrorRedirecter(MessageImp &imp) : fMsg(imp)
 {
@@ -31,4 +58,10 @@
 }
 
+// --------------------------------------------------------------------------
+//
+//! - reset DimClient error handler
+//! - reset DimServer error handler
+//! - reset exit handler of DimServer
+//
 DimErrorRedirecter::~DimErrorRedirecter()
 {
Index: trunk/FACT++/src/DimServerList.cc
===================================================================
--- trunk/FACT++/src/DimServerList.cc	(revision 10655)
+++ trunk/FACT++/src/DimServerList.cc	(revision 10657)
@@ -122,4 +122,10 @@
 // --------------------------------------------------------------------------
 //
+//! @param server
+//!     server-name to check for
+//!
+//! @returns
+//!     whether the server with the given name is online or not
+//!
 bool DimServerList::HasServer(const std::string &server) const
 {
Index: trunk/FACT++/src/EventImp.cc
===================================================================
--- trunk/FACT++/src/EventImp.cc	(revision 10655)
+++ trunk/FACT++/src/EventImp.cc	(revision 10657)
@@ -208,4 +208,8 @@
 //! @param out
 //!    An ostream to which the output should be redirected.
+//!
+//! @param strip
+//!    defines whether a possible SERVER name in the event name
+//!    should be stripped or not.
 //!
 void EventImp::Print(ostream &out, bool strip) const
@@ -277,4 +281,8 @@
 //
 //! Calls Print(std::cout)
+//!
+//! @param strip
+//!    defines whether a possible SERVER name in the event name
+//!    should be stripped or not.
 //
 void EventImp::Print(bool strip) const
Index: trunk/FACT++/src/FACT.cc
===================================================================
--- trunk/FACT++/src/FACT.cc	(revision 10655)
+++ trunk/FACT++/src/FACT.cc	(revision 10657)
@@ -1,2 +1,9 @@
+// **************************************************************************
+/** @namespace FACT
+
+@brief Namespace to help with some general things in the program initialization
+
+*/
+// **************************************************************************
 #include "FACT.h"
 
@@ -5,22 +12,32 @@
 #include <boost/filesystem.hpp>
 
-/*
- The first line of the --version information is assumed to be in one
- of the following formats:
-
-   <version>
-   <program> <version>
-   {GNU,Free} <program> <version>
-   <program> ({GNU,Free} <package>) <version>
-   <program> - {GNU,Free} <package> <version>
-
- and separated from any copyright/author details by a blank line.
-
- Handle multi-line bug reporting sections of the form:
-
-   Report <program> bugs to <addr>
-   GNU <package> home page: <url>
-   ...
-*/
+// --------------------------------------------------------------------------
+//
+//! Print version information about FACT++
+//!
+//! From help2man:
+//!
+//! The first line of the --version information is assumed to be in one
+//! of the following formats:
+//!
+//!  - <version>
+//!  - <program> <version>
+//!  - {GNU,Free} <program> <version>
+//!  - <program> ({GNU,Free} <package>) <version>
+//!  - <program> - {GNU,Free} <package> <version>
+//!
+//!  and separated from any copyright/author details by a blank line.
+//!
+//! Handle multi-line bug reporting sections of the form:
+//!
+//!  - Report <program> bugs to <addr>
+//!  - GNU <package> home page: <url>
+//!  - ...
+//!
+//!
+//! @param name
+//!     name of the program (usually argv[0]). A possible leading "lt-"
+//!     is removed.
+//!
 void FACT::PrintVersion(const char *name)
 {
Index: trunk/FACT++/src/StateMachineImp.cc
===================================================================
--- trunk/FACT++/src/StateMachineImp.cc	(revision 10655)
+++ trunk/FACT++/src/StateMachineImp.cc	(revision 10657)
@@ -295,4 +295,7 @@
 //!    size of the memory which should be attached to the event
 //!
+//! @returns
+//!    false if the event is ignored, true otherwise.
+//!
 //! @todo
 //!    - Shell we check for the validity of a command at the current state, too?
@@ -333,4 +336,7 @@
 //!    event should be for.
 //!
+//! @returns
+//!    false if the event is ignored, true otherwise.
+//!
 //! @todo
 //!    - Shell we check for the validity of a command at the current state, too?
@@ -357,4 +363,12 @@
 }
 
+// --------------------------------------------------------------------------
+//
+//! Return all event names of the StateMachine
+//!
+//! @returns
+//!    A vector of strings with all event names of the state machine.
+//!    The event names all have the SERVER/ pre-fix removed.
+//
 const vector<string> StateMachineImp::GetEventNames() const
 {
@@ -1010,5 +1024,6 @@
 //!    if functions are assigned directly to any event to simulate
 //!    a running loop (e.g. block until Stop() was called or fExitRequested
-//!    was set by an EXIT command.
+//!    was set by an EXIT command.  If dummy==true, fRunning is not set
+//!    to true to allow handling events directly from the event handler.
 //!
 //! @returns
