Index: /trunk/FACT++/src/feedback.cc
===================================================================
--- /trunk/FACT++/src/feedback.cc	(revision 13843)
+++ /trunk/FACT++/src/feedback.cc	(revision 13844)
@@ -65,10 +65,8 @@
     PixelMap fMap;
 
-    DimServiceInfoListImp fNetwork;
-
     DimVersion fDim;
-    DimState   fDimFAD;
-    DimState   fDimFSC;
-    DimState   fDimBias;
+    DimDescribedState fDimFAD;
+    DimDescribedState fDimFSC;
+    DimDescribedState fDimBias;
 
     DimDescribedService fDimReference;
@@ -769,65 +767,14 @@
     }
 
-    const State GetState(const DimState &s) const
-    {
-        return fNetwork.GetState(s.name(), s.state());
-    }
-
-    void PrintState(const DimState &state) const
-    {
-        const State rc = GetState(state);
-
-        Out() << state.time().GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";
-        Out() << kBold << state.name() << ": ";
-        if (rc.index==-3)
-        {
-            Out() << kReset << "Offline" << endl;
-            return;
-        }
-        if (rc.index==-2)
-            Out() << state.state();
-        else
-            Out() << rc.name << "[" << rc.index << "]";
-        Out() << kReset << " - " << kBlue << rc.comment << endl;
-    }
-
     int Print() const
     {
-        Out() << fDim.time().GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";
-        Out() << kBold << "DIM_DNS: " << fDim.version() << endl;
-
-        PrintState(fDimFAD);
-        PrintState(fDimFSC);
-        PrintState(fDimBias);
-
-        return GetCurrentState();
-    }
-/*
-    void PrintState(const pair<Time,int> &state, const char *server)
-    {
-        const State rc = fNetwork.GetState(server, state.second);
-
-        Out() << state.first.GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";
-        Out() << kBold << server << ": ";
-        Out() << rc.name << "[" << rc.index << "]";
-        Out() << kReset << " - " << kBlue << rc.comment << endl;
-    }
-
-    int Print()
-    {
-        Out() << fStatusDim.first.GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";
-        Out() << kBold << "DIM_DNS: ";
-        if (fStatusDim.second==0)
-            Out() << "Offline" << endl;
-        else
-            Out() << "V" << fStatusDim.second/100 << 'r' << fStatusDim.second%100 << endl;
-
-        PrintState(fStatusFAD,  "FAD_CONTROL");
-        PrintState(fStatusFSC,  "FSC_CONTROL");
-        PrintState(fStatusBias, "BIAS_CONTROL");
-
-        return GetCurrentState();
-    }
-*/
+        Out() << fDim << endl;
+        Out() << fDimFAD << endl;
+        Out() << fDimFSC << endl;
+        Out() << fDimBias << endl;
+
+        return GetCurrentState();
+    }
+
     int PrintCalibration()
     {
Index: /trunk/FACT++/src/mcp.cc
===================================================================
--- /trunk/FACT++/src/mcp.cc	(revision 13843)
+++ /trunk/FACT++/src/mcp.cc	(revision 13844)
@@ -50,47 +50,19 @@
     };
 
-    DimServiceInfoListImp fNetwork;
-
     DimVersion fDim;
-    DimState   fDimFTM;
-    DimState   fDimFAD;
-    DimState   fDimLog;
-    DimState   fDimRC;
+    DimDescribedState fDimFTM;
+    DimDescribedState fDimFAD;
+    DimDescribedState fDimLog;
+    DimDescribedState fDimRC;
 
     DimDescribedService fService;
 
-    const State GetState(const DimState &s) const
-    {
-        return fNetwork.GetState(s.name(), s.state());
-    }
-
-    void PrintState(const DimState &state) const
-    {
-        const State rc = GetState(state);
-
-        Out() << state.time().GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";
-        Out() << kBold << state.name() << ": ";
-        if (rc.index==-3)
-        {
-            Out() << kReset << "Offline" << endl;
-            return;
-        }
-        if (rc.index==-2)
-            Out() << state.state();
-        else
-            Out() << rc.name << "[" << rc.index << "]";
-        Out() << kReset << " - " << kBlue << rc.comment << endl;
-    }
-
     int Print() const
     {
-        Out() << fDim.time().GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";
-        Out() << kBold << "DIM_DNS: " << fDim.version() << endl;
-
-        PrintState(fDim);
-        PrintState(fDimFTM);
-        PrintState(fDimFAD);
-        PrintState(fDimLog);
-        PrintState(fDimRC);
+        Out() << fDim << endl;
+        Out() << fDimFTM << endl;
+        Out() << fDimFAD << endl;
+        Out() << fDimLog << endl;
+        Out() << fDimRC << endl;
 
         return GetCurrentState();
Index: /trunk/FACT++/src/ratecontrol.cc
===================================================================
--- /trunk/FACT++/src/ratecontrol.cc	(revision 13843)
+++ /trunk/FACT++/src/ratecontrol.cc	(revision 13844)
@@ -51,9 +51,7 @@
     vector<bool> fBlock;
 
-    DimServiceInfoListImp fNetwork;
-
     DimVersion fDim;
-    DimState   fDimFTM;
-    DimState   fDimRS;
+    DimDescribedState fDimFTM;
+    DimDescribedState fDimRS;
 
     float  fTargetRate;
@@ -431,61 +429,10 @@
         return GetCurrentState();
     }
-/*
-    void PrintState(const pair<Time,int> &state, const char *server)
-    {
-        const State rc = fNetwork.GetState(server, state.second);
-
-        Out() << state.first.GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";
-        Out() << kBold << server << ": ";
-        Out() << rc.name << "[" << rc.index << "]";
-        Out() << kReset << " - " << kBlue << rc.comment << endl;
-    }
-
-    int Print()
-    {
-        Out() << fStatusDim.first.GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";
-        Out() << kBold << "DIM_DNS: ";
-        if (fStatusDim.second==0)
-            Out() << "Offline" << endl;
-        else
-            Out() << "V" << fStatusDim.second/100 << 'r' << fStatusDim.second%100 << endl;
-
-        PrintState(fStatusRS,  "RATE_SCAN");
-        PrintState(fStatusFTM, "FTM_CONTROL");
-
-        return GetCurrentState();
-    }
-    */
-
-    const State GetState(const DimState &s) const
-    {
-        return fNetwork.GetState(s.name(), s.state());
-    }
-
-    void PrintState(const DimState &state) const
-    {
-        const State rc = GetState(state);
-
-        Out() << state.time().GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";
-        Out() << kBold << state.name() << ": ";
-        if (rc.index==-3)
-        {
-            Out() << kReset << "Offline" << endl;
-            return;
-        }
-        if (rc.index==-2)
-            Out() << state.state();
-        else
-            Out() << rc.name << "[" << rc.index << "]";
-        Out() << kReset << " - " << kBlue << rc.comment << endl;
-    }
 
     int Print() const
     {
-        Out() << fDim.time().GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";
-        Out() << kBold << "DIM_DNS: " << fDim.version() << endl;
-
-        PrintState(fDimFTM);
-        PrintState(fDimRS);
+        Out() << fDim << endl;
+        Out() << fDimFTM << endl;
+        Out() << fDimRS << endl;
 
         return GetCurrentState();
Index: /trunk/FACT++/src/ratescan.cc
===================================================================
--- /trunk/FACT++/src/ratescan.cc	(revision 13843)
+++ /trunk/FACT++/src/ratescan.cc	(revision 13844)
@@ -42,6 +42,4 @@
     };
 
-    DimServiceInfoListImp fNetwork;
-
     DimVersion fDim;
     DimState   fDimFTM;
@@ -224,33 +222,8 @@
     }
 
-    const State GetState(const DimState &s) const
-    {
-        return fNetwork.GetState(s.name(), s.state());
-    }
-
-    void PrintState(const DimState &state) const
-    {
-        const State rc = GetState(state);
-
-        Out() << state.time().GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";
-        Out() << kBold << state.name() << ": ";
-        if (rc.index==-3)
-        {
-            Out() << kReset << "Offline" << endl;
-            return;
-        }
-        if (rc.index==-2)
-            Out() << state.state();
-        else
-            Out() << rc.name << "[" << rc.index << "]";
-        Out() << kReset << " - " << kBlue << rc.comment << endl;
-    }
-
     int Print() const
     {
-        Out() << fDim.time().GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";
-        Out() << kBold << "DIM_DNS: " << fDim.version() << endl;
-
-        PrintState(fDimFTM);
+        Out() << fDim << endl;
+        Out() << fDimFTM << endl;
 
         return GetCurrentState();
Index: /trunk/FACT++/src/smartfact.cc
===================================================================
--- /trunk/FACT++/src/smartfact.cc	(revision 13843)
+++ /trunk/FACT++/src/smartfact.cc	(revision 13844)
@@ -326,5 +326,5 @@
     deque<string> fControlMessageHist;
 
-    uint32_t fMcpConfigurationState;
+    uint32_t fMcpConfigurationState;   // For consistency
      int64_t fMcpConfigurationMaxTime;
      int64_t fMcpConfigurationMaxEvents;
@@ -372,32 +372,20 @@
     // ------------- Initialize variables before the Dim stuff ------------
 
-    DimServiceInfoListImp fNetwork;
-
     DimVersion fDimDNS;
     DimControl fDimControl;
-    DimState   fDimMcp;
-    DimState   fDimDataLogger;
-    DimState   fDimDriveControl;
-    DimState   fDimMagicWeather;
-    DimState   fDimFeedback;
-    DimState   fDimBiasControl;
-    DimState   fDimFtmControl;
-    DimState   fDimFadControl;
-    DimState   fDimFscControl;
-    DimState   fDimRateControl;
-    DimState   fDimRateScan;
-    DimState   fDimChatServer;
+    DimDescribedState fDimMcp;
+    DimDescribedState fDimDataLogger;
+    DimDescribedState fDimDriveControl;
+    DimDescribedState fDimMagicWeather;
+    DimDescribedState fDimFeedback;
+    DimDescribedState fDimBiasControl;
+    DimDescribedState fDimFtmControl;
+    DimDescribedState fDimFadControl;
+    DimDescribedState fDimFscControl;
+    DimDescribedState fDimRateControl;
+    DimDescribedState fDimRateScan;
+    DimDescribedState fDimChatServer;
 
     // -------------------------------------------------------------------
-/*
-    bool HandleService(DimInfo *curr, const DimInfo &service, void (StateMachineSmartFACT::*handle)(const DimData &))
-    {
-        if (curr!=&service)
-            return false;
-
-        (this->*handle)(DimData(curr));
-        return true;
-    }
-*/
 
     bool CheckDataSize(const EventImp &d, const char *name, size_t size, bool min=false)
@@ -415,5 +403,4 @@
     }
 
-
     // -------------------------------------------------------------------
 
@@ -528,5 +515,12 @@
     {
         if (!CheckDataSize(d, "Mcp:Configuration", 16, true))
+        {
+            fMcpConfigurationState     = -4;
+            fMcpConfigurationMaxTime   = 0;
+            fMcpConfigurationMaxEvents = 0;
+            fMcpConfigurationName      = "";
+            fMcpConfigurationRunStart  = Time(Time::none);
             return GetCurrentState();
+        }
 
         fMcpConfigurationState     = d.GetQoS();
@@ -1322,45 +1316,20 @@
     }
 
-    const State GetState(const DimState &s) const
-    {
-        return fNetwork.GetState(s.name(), s.state());
-    }
-
-    void PrintState(const DimState &state) const
-    {
-        const State rc = GetState(state);
-
-        Out() << state.time().GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";
-        Out() << kBold << state.name() << ": ";
-        if (rc.index==-3)
-        {
-            Out() << kReset << "Offline" << endl;
-            return;
-        }
-        if (rc.index==-2)
-            Out() << state.state();
-        else
-            Out() << rc.name << "[" << rc.index << "]";
-        Out() << kReset << " - " << kBlue << rc.comment << endl;
-    }
-
     int Print() const
     {
-        Out() << fDimDNS.time().GetAsStr("%H:%M:%S.%f").substr(0, 12) << " - ";
-        Out() << kBold << "DIM_DNS: " << fDimDNS.version() << endl;
-
-        PrintState(fDimMcp);
-        PrintState(fDimControl);
-        PrintState(fDimDataLogger);
-        PrintState(fDimDriveControl);
-        PrintState(fDimFadControl);
-        PrintState(fDimFtmControl);
-        PrintState(fDimBiasControl);
-        PrintState(fDimFeedback);
-        PrintState(fDimRateControl);
-        PrintState(fDimFscControl);
-        PrintState(fDimMagicWeather);
-        PrintState(fDimRateScan);
-        PrintState(fDimChatServer);
+        Out() << fDimDNS          << endl;
+        Out() << fDimMcp          << endl;
+        Out() << fDimControl      << endl;
+        Out() << fDimDataLogger   << endl;
+        Out() << fDimDriveControl << endl;
+        Out() << fDimFadControl   << endl;
+        Out() << fDimFtmControl   << endl;
+        Out() << fDimBiasControl  << endl;
+        Out() << fDimFeedback     << endl;
+        Out() << fDimRateControl  << endl;
+        Out() << fDimFscControl   << endl;
+        Out() << fDimMagicWeather << endl;
+        Out() << fDimRateScan     << endl;
+        Out() << fDimChatServer   << endl;
 
         return GetCurrentState();
@@ -1379,5 +1348,5 @@
         }
 
-        const State rc = GetState(state);
+        const State rc = state.description();
 
         // Sate not found in list, server online (-3: offline; -2: not found)
@@ -1409,5 +1378,5 @@
         //poll_one();
 
-        if (fDimDNS.state()==0)
+        if (!fDimDNS.online())
             return kStateDimNetworkNA;
 
@@ -1423,14 +1392,10 @@
 
         // -------------- System status --------------
-        if (fDimMcp.state()>=5) // Idle
+        if (fMcpConfigurationState>=5) // Idle
         {
             string col = kHtmlBlue;
-            /*
             if (fMcpConfigurationState!= 5 &&  // Idle
                 fMcpConfigurationState!=11 &&  // Trigger On
-                fMcpConfigurationState!=12)    // Taking Data*/
-            if (fDimMcp.state()!= 5 &&  // Idle
-                fDimMcp.state()!=11 &&  // Trigger On
-                fDimMcp.state()!=12)    // Taking Data
+                fMcpConfigurationState!=12)    // Taking Data
                 col = kHtmlYellow;
             else
@@ -1442,5 +1407,5 @@
             if (fDimRateControl.state()!=5 && fDimRateScan.state()!=5)
             {
-                switch (fDimMcp.state()/*fMcpConfigurationState*/)
+                switch (fMcpConfigurationState)
                 {
                 // kStateIdle
@@ -1465,5 +1430,5 @@
                         out << "Rate scan in progress";
 
-            if (fDimMcp.state()>10 && fDimRateControl.state()!=5)
+            if (fMcpConfigurationState>10 && fDimRateControl.state()!=5)
             {
                 if (fMcpConfigurationMaxEvents>0 || fMcpConfigurationMaxTime>0 || fMcpConfigurationState==12)
@@ -1514,5 +1479,5 @@
         {
             const double dev = fDriveControlTrackingDevHist.size()>0 ? fDriveControlTrackingDevHist.back() : 0;
-            const State rc = GetState(fDimDriveControl);
+            const State rc = fDimDriveControl.description();
             string col = kHtmlGreen;
             if (rc.index==6) // Moving
@@ -1617,5 +1582,5 @@
             // MCP in ReadyForDatataking/Configuring/Configured/TriggerOn/TakingData
             // and Bias not in "data-taking state' => Red
-            if (fDimMcp.state()>5 &&
+            if (fMcpConfigurationState>5 &&
                 fDimBiasControl.state()!=BIAS::kVoltageOn &&
                 fDimBiasControl.state()!=BIAS::kVoltageOff)
@@ -1663,5 +1628,5 @@
         out << now.JavaDate() << '\t' << fDimControl.online() << '\n';
 
-        if (fDimDNS.state()==0)
+        if (!fDimDNS.online())
             out << kHtmlWhite << "\tOffline\n\n\n\n\n\n\n\n\n\n\n\n";
         else
@@ -1695,4 +1660,6 @@
         fMcpConfigurationMaxTime(0),
         fMcpConfigurationMaxEvents(0),
+        fBiasControlVoltageMed(0),
+        fBiasControlCurrentMax(0),
         fFscControlHumidityAvg(0),
         fRateScanDataId(0),
@@ -1712,4 +1679,6 @@
         fDimChatServer  ("CHAT_SERVER")
     {
+        fDimDNS.Subscribe(*this);
+        fDimControl.Subscribe(*this);
         fDimMcp.Subscribe(*this);
         fDimDataLogger.Subscribe(*this);
@@ -1786,5 +1755,5 @@
         AddEvent("PRINT")
             (bind(&StateMachineSmartFACT::Print, this))
-            ("");
+            ("Print a list of the states of all connected servers.");
 
     }
