Index: trunk/FACT++/src/evtserver.cc
===================================================================
--- trunk/FACT++/src/evtserver.cc	(revision 19380)
+++ trunk/FACT++/src/evtserver.cc	(revision 19381)
@@ -33,4 +33,9 @@
 class StateMachineEventServer : public StateMachineDim
 {
+public:
+    static bool fIsServer;
+
+private:
+
     DimDescribedState fDimFadControl;
 
@@ -53,6 +58,4 @@
 
     Time fTimer;
-
-private:
 
     int Execute()
@@ -154,6 +157,6 @@
                 fMax[i] /= 1000;
 
-            for (int i=8; i<1440; i+=9)
-                fMax[i] = fMax[i-2];
+            //for (int i=8; i<1440; i+=9)
+            //    fMax[i] = fMax[i-2];
 
             // construct output
@@ -240,7 +243,13 @@
     }
 
+    int Print() const
+    {
+        Out() << fDimFadControl << endl;
+        return GetCurrentState();
+    }
+
 
 public:
-    StateMachineEventServer(ostream &out=cout) : StateMachineDim(out, "EVENT_SERVER"),
+    StateMachineEventServer(ostream &out=cout) : StateMachineDim(out, fIsServer?"EVENT_SERVER":""),
         fDimFadControl("FAD_CONTROL"), fStartDate(0), fNight(0), fIn(0), fMax(1440)
 
@@ -269,4 +278,8 @@
             (bind(&StateMachineEventServer::StopServer, this))
             ("Stop serving the smartfact camera file");
+
+        AddEvent("PRINT")
+            (bind(&StateMachineEventServer::Print, this))
+            ("Print current status");
     }
     ~StateMachineEventServer()
@@ -285,4 +298,6 @@
 };
 
+bool StateMachineEventServer::fIsServer = false;
+
 // ------------------------------------------------------------------------
 
@@ -292,4 +307,5 @@
 int RunShell(Configuration &conf)
 {
+    StateMachineEventServer::fIsServer = !conf.Get<bool>("client");
     return Main::execute<T, StateMachineEventServer>(conf);
 }
@@ -302,4 +318,5 @@
         ("out-path", var<string>("www/smartfact/data"), "Path where the output camera file should be written.")
         ("interval", var<uint32_t>(5000), "Interval of updates in milliseconds.")
+        ("client",   po_bool(false), "For a standalone client choose this option.")
         ;
 
