Index: trunk/FACT++/src/mcp.cc
===================================================================
--- trunk/FACT++/src/mcp.cc	(revision 13569)
+++ trunk/FACT++/src/mcp.cc	(revision 13570)
@@ -72,4 +72,6 @@
     DimStampedInfo fLog;
     DimStampedInfo fRC;
+
+    DimDescribedService fService;
 
     pair<Time, int> GetNewState(DimStampedInfo &info) const
@@ -272,16 +274,18 @@
         Message(str);
 
+        Update(kStateConfiguring1);
+
         return kStateConfiguring1;
     }
 
-    void ConfigureFAD()
-    {
-        struct Value
-        {
-            uint64_t time;
-            uint64_t nevts;
-            char type[];
-        };
-
+    struct Value
+    {
+        uint64_t time;
+        uint64_t nevts;
+        char type[];
+    };
+
+    Value *GetBuffer()
+    {
         const size_t len = sizeof(Value)+fRunType.length()+1;
 
@@ -295,6 +299,22 @@
         strcpy(val->type, fRunType.c_str());
 
+        return val;
+    }
+
+    void Update(int newstate)
+    {
+        Value *buf = GetBuffer();
+        fService.setQuality(newstate);
+        fService.setData(buf, sizeof(Value)+fRunType.length()+1);
+        fService.Update();
+        delete buf;
+    }
+
+    void ConfigureFAD()
+    {
+        Value *buf = GetBuffer();
+
 	Message("Configuring FAD");
-        Dim::SendCommand("FAD_CONTROL/CONFIGURE", buf, len);
+        Dim::SendCommand("FAD_CONTROL/CONFIGURE", buf, sizeof(Value)+fRunType.length()+1);
 
         delete buf;
@@ -326,4 +346,5 @@
 		Message("Configuring Trigger (FTM)");
                 Dim::SendCommand("FTM_CONTROL/CONFIGURE", fRunType);
+                Update(kStateConfiguring2);
                 return kStateConfiguring2;
             }
@@ -345,4 +366,5 @@
 
                 ConfigureFAD();
+                Update(kStateConfiguring3);
                 return kStateConfiguring3;
             }
@@ -357,4 +379,5 @@
                 Message("Starting Trigger (FTM)");
                 Dim::SendCommand("FTM_CONTROL/START_TRIGGER");
+                Update(kStateConfigured);
                 return kStateConfigured;
             }
@@ -364,4 +387,6 @@
                 if (fStatusFTM.second != FTM::kTriggerOn)
                     return GetCurrentState();
+
+                Update(kStateIdle);
 
                 // Now we are taking data... we could now wait for
@@ -403,5 +428,6 @@
         fFAD("FAD_CONTROL/STATE",      (void*)NULL, 0, this),
         fLog("DATA_LOGGER/STATE",      (void*)NULL, 0, this),
-        fRC("RATE_CONTROL/STATE",      (void*)NULL, 0, this)
+        fRC("RATE_CONTROL/STATE",      (void*)NULL, 0, this),
+        fService("CONFIGURATION", "X:1;X:1;C", "")
     {
         // ba::io_service::work is a kind of keep_alive for the loop.
