Index: trunk/FACT++/src/LocalControl.h
===================================================================
--- trunk/FACT++/src/LocalControl.h	(revision 11049)
+++ trunk/FACT++/src/LocalControl.h	(revision 11050)
@@ -26,4 +26,6 @@
 #include <boost/filesystem.hpp>
 
+#include "tools.h"
+
 #include "WindowLog.h"
 #include "StateMachineImp.h"
@@ -49,5 +51,5 @@
     LocalControl(const char *name) : T(name), 
         fStateMachine(0), lout(T::GetStreamIn()),
-        fName(boost::filesystem::path(name).filename().c_str())
+        fName(boost::filesystem::path(name).filename())
     { }
 
@@ -57,4 +59,5 @@
         lout << " " << kUnderline << "Specific commands:" << endl;
         lout << kBold << "   st,states    " << kReset << "Display a list of the available states with description." << endl;
+        lout << kBold << "   # <text>     " << kReset << "Echo <text> to the output stream" << endl;
         lout << kBold << "   .s           " << kReset << "Wait for the state-machine to change to the given state." << endl;
         lout <<          "                "              "     .s <state> [<timeout>]" << endl;
@@ -103,5 +106,5 @@
             }
 
-            const Time timeout = Time()+boost::posix_time::millisec(ms);
+            const Time timeout = ms<=0 ? Time(Time::none) : Time()+boost::posix_time::millisec(ms);
 
             const int target = atoi(str.c_str()+3);
@@ -112,4 +115,10 @@
         }
 
+        if (str[0]=='#')
+        {
+            lout << Tools::Trim(str.substr(1)) << endl;
+            return true;
+        }
+
         if (T::Process(str))
             return true;
@@ -121,4 +130,23 @@
 
     void SetReceiver(StateMachineImp &imp) { fStateMachine = &imp; }
+};
+
+// **************************************************************************
+/** @class LocalStream
+
+@brief Derives the LocalControl from ConsoleStream
+
+This is basically a LocalControl, which derives through the template
+argument from the ConsoleStream class. 
+
+ */
+// **************************************************************************
+#include "Console.h"
+
+class LocalStream : public LocalControl<ConsoleStream>
+{
+public:
+    LocalStream(const char *name, bool = false)
+        : LocalControl<ConsoleStream>(name) { }
 };
 
@@ -134,5 +162,4 @@
  */
 // **************************************************************************
-#include "Console.h"
 #include "tools.h"
 
