Index: /trunk/FACT++/src/magicweather.cc
===================================================================
--- /trunk/FACT++/src/magicweather.cc	(revision 13866)
+++ /trunk/FACT++/src/magicweather.cc	(revision 13867)
@@ -228,4 +228,5 @@
             "Cache-Control: max-age=0\r\n"
             "\r\n";
+
         PostMessage(cmd);
     }
@@ -326,5 +327,5 @@
 #include "DimDescriptionService.h"
 
-class ConnectionDimDrive : public ConnectionWeather
+class ConnectionDimWeather : public ConnectionWeather
 {
 private:
@@ -339,5 +340,5 @@
 
 public:
-    ConnectionDimDrive(ba::io_service& ioservice, MessageImp &imp) :
+    ConnectionDimWeather(ba::io_service& ioservice, MessageImp &imp) :
         ConnectionWeather(ioservice, imp),
         fDimWeather("MAGIC_WEATHER/DATA", "S:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1",
@@ -357,17 +358,6 @@
 
 template <class T, class S>
-class StateMachineDrive : public T, public ba::io_service, public ba::io_service::work
-{
-    int Wrap(boost::function<void()> f)
-    {
-        f();
-        return T::GetCurrentState();
-    }
-
-    boost::function<int(const EventImp &)> Wrapper(boost::function<void()> func)
-    {
-        return bind(&StateMachineDrive::Wrap, this, func);
-    }
-
+class StateMachineWeather : public T, public ba::io_service, public ba::io_service::work
+{
 private:
     S fWeather;
@@ -441,5 +431,5 @@
 
 public:
-    StateMachineDrive(ostream &out=cout) :
+    StateMachineWeather(ostream &out=cout) :
         T(out, "MAGIC_WEATHER"), ba::io_service::work(static_cast<ba::io_service&>(*this)),
         fWeather(*this, *this)
@@ -464,5 +454,5 @@
         // Verbosity commands
         T::AddEvent("SET_VERBOSE", "B")
-            (bind(&StateMachineDrive::SetVerbosity, this, placeholders::_1))
+            (bind(&StateMachineWeather::SetVerbosity, this, placeholders::_1))
             ("set verbosity state"
              "|verbosity[bool]:disable or enable verbosity for received data (yes/no), except dynamic data");
@@ -470,18 +460,12 @@
         // Conenction commands
         AddEvent("DISCONNECT")
-            (bind(&StateMachineDrive::Disconnect, this))
+            (bind(&StateMachineWeather::Disconnect, this))
             ("disconnect from ethernet");
 
         AddEvent("RECONNECT", "O")
-            (bind(&StateMachineDrive::Reconnect, this, placeholders::_1))
+            (bind(&StateMachineWeather::Reconnect, this, placeholders::_1))
             ("(Re)connect ethernet connection to FTM, a new address can be given"
              "|[host][string]:new ethernet address in the form <host:port>");
 */
-        fWeather.StartConnect();
-    }
-
-    void SetEndpoint(const string &url)
-    {
-        fWeather.SetEndpoint(url);
     }
 
@@ -492,7 +476,6 @@
         fWeather.SetDebugTx(conf.Get<bool>("debug-tx"));
         fWeather.SetSite(conf.Get<string>("url"));
-
-        SetEndpoint(conf.Get<string>("addr"));
-
+        fWeather.SetEndpoint(conf.Get<string>("addr"));
+        fWeather.StartConnect();
 
         return -1;
@@ -508,10 +491,10 @@
 int RunShell(Configuration &conf)
 {
-    return Main::execute<T, StateMachineDrive<S, R>>(conf);
+    return Main::execute<T, StateMachineWeather<S, R>>(conf);
 }
 
 void SetupConfiguration(Configuration &conf)
 {
-    po::options_description control("Drive control options");
+    po::options_description control("MAGIC weather control options");
     control.add_options()
         ("no-dim,d",  po_switch(),    "Disable dim services")
@@ -538,5 +521,5 @@
 {
     cout <<
-        "The drivectrl is an interface to cosy.\n"
+        "The magicweather is an interface to the MAGIC weather data.\n"
         "\n"
         "The default is that the program is started without user intercation. "
@@ -545,6 +528,6 @@
         "help message about the usuage can be brought to the screen.\n"
         "\n"
-        "Usage: drivectrl [-c type] [OPTIONS]\n"
-        "  or:  drivectrl [OPTIONS]\n";
+        "Usage: magicweather [-c type] [OPTIONS]\n"
+        "  or:  magicweather [OPTIONS]\n";
     cout << endl;
 }
@@ -590,5 +573,5 @@
                 return RunShell<LocalStream, StateMachine, ConnectionWeather>(conf);
             else
-                return RunShell<LocalStream, StateMachineDim, ConnectionDimDrive>(conf);
+                return RunShell<LocalStream, StateMachineDim, ConnectionDimWeather>(conf);
         }
         // Cosole access w/ and w/o Dim
@@ -603,7 +586,7 @@
         {
             if (conf.Get<int>("console")==0)
-                return RunShell<LocalShell, StateMachineDim, ConnectionDimDrive>(conf);
+                return RunShell<LocalShell, StateMachineDim, ConnectionDimWeather>(conf);
             else
-                return RunShell<LocalConsole, StateMachineDim, ConnectionDimDrive>(conf);
+                return RunShell<LocalConsole, StateMachineDim, ConnectionDimWeather>(conf);
         }
     }
