Index: trunk/FACT++/Makefile.am
===================================================================
--- trunk/FACT++/Makefile.am	(revision 11227)
+++ trunk/FACT++/Makefile.am	(revision 11228)
@@ -37,4 +37,5 @@
 	fadctrl fad \
 	fscctrl fsc \
+	biasctrl \
 	fitsdump
 
@@ -175,4 +176,5 @@
 	\
 	src/Connection.h      src/Connection.cc \
+	src/ConnectionUSB.h   src/ConnectionUSB.cc \
 	\
 	FACT.h ByteOrder.h
@@ -238,7 +240,12 @@
     	libConfiguration.la
 
+biasctrl_SOURCES = src/biasctrl.cc src/LocalControl.h
+biasctrl_LDADD   = libDim.la libDim++.la  libDimExtension.la \
+	libTime.la libTools.la libStateMachine.la \
+    	libConfiguration.la
+
 
 argv_SOURCES = src/argv.cc
-argv_LDADD = libConfiguration.la 
+argv_LDADD = libConfiguration.la  libTime.la
 
 
Index: trunk/FACT++/Makefile.in
===================================================================
--- trunk/FACT++/Makefile.in	(revision 11227)
+++ trunk/FACT++/Makefile.in	(revision 11228)
@@ -51,5 +51,6 @@
 	scheduler$(EXEEXT) triggerschedule$(EXEEXT) ftmctrl$(EXEEXT) \
 	ftm$(EXEEXT) fadctrl$(EXEEXT) fad$(EXEEXT) fscctrl$(EXEEXT) \
-	fsc$(EXEEXT) fitsdump$(EXEEXT) $(am__EXEEXT_2) $(am__EXEEXT_3)
+	fsc$(EXEEXT) biasctrl$(EXEEXT) fitsdump$(EXEEXT) \
+	$(am__EXEEXT_2) $(am__EXEEXT_3)
 @HAS_LIBXP_TRUE@am__append_1 = did
 
@@ -146,5 +147,5 @@
 	src/DimServiceInfoList.lo src/DimNetwork.lo src/ServiceList.lo \
 	src/DimErrorRedirecter.lo src/DimDescriptionService.lo \
-	src/Connection.lo
+	src/Connection.lo src/ConnectionUSB.lo
 libStateMachine_la_OBJECTS = $(am_libStateMachine_la_OBJECTS)
 libTime_la_LIBADD =
@@ -163,8 +164,12 @@
 am_argv_OBJECTS = src/argv.$(OBJEXT)
 argv_OBJECTS = $(am_argv_OBJECTS)
-argv_DEPENDENCIES = libConfiguration.la
+argv_DEPENDENCIES = libConfiguration.la libTime.la
 astro_SOURCES = astro.c
 astro_OBJECTS = astro.$(OBJEXT)
 astro_LDADD = $(LDADD)
+am_biasctrl_OBJECTS = src/biasctrl.$(OBJEXT)
+biasctrl_OBJECTS = $(am_biasctrl_OBJECTS)
+biasctrl_DEPENDENCIES = libDim.la libDim++.la libDimExtension.la \
+	libTime.la libTools.la libStateMachine.la libConfiguration.la
 am_chatclient_OBJECTS = src/chatclient.$(OBJEXT)
 chatclient_OBJECTS = $(am_chatclient_OBJECTS)
@@ -332,5 +337,5 @@
 	$(libStateMachine_la_SOURCES) $(libTime_la_SOURCES) \
 	$(libTools_la_SOURCES) $(argv_SOURCES) astro.c \
-	$(chatclient_SOURCES) $(chatserv_SOURCES) \
+	$(biasctrl_SOURCES) $(chatclient_SOURCES) $(chatserv_SOURCES) \
 	$(datalogger_SOURCES) $(dclient5_SOURCES) $(did_SOURCES) \
 	$(dimctrl_SOURCES) $(dns_SOURCES) $(drivectrl_SOURCES) \
@@ -345,5 +350,5 @@
 	$(libStateMachine_la_SOURCES) $(libTime_la_SOURCES) \
 	$(libTools_la_SOURCES) $(argv_SOURCES) astro.c \
-	$(chatclient_SOURCES) $(chatserv_SOURCES) \
+	$(biasctrl_SOURCES) $(chatclient_SOURCES) $(chatserv_SOURCES) \
 	$(am__datalogger_SOURCES_DIST) $(dclient5_SOURCES) \
 	$(did_SOURCES) $(dimctrl_SOURCES) $(dns_SOURCES) \
@@ -730,4 +735,5 @@
 	\
 	src/Connection.h      src/Connection.cc \
+	src/ConnectionUSB.h   src/ConnectionUSB.cc \
 	\
 	FACT.h ByteOrder.h
@@ -781,6 +787,11 @@
     	libConfiguration.la
 
+biasctrl_SOURCES = src/biasctrl.cc src/LocalControl.h
+biasctrl_LDADD = libDim.la libDim++.la  libDimExtension.la \
+	libTime.la libTools.la libStateMachine.la \
+    	libConfiguration.la
+
 argv_SOURCES = src/argv.cc
-argv_LDADD = libConfiguration.la 
+argv_LDADD = libConfiguration.la  libTime.la
 dimctrl_SOURCES = src/dimctrl.cc src/RemoteControl.cc src/RemoteControl.h
 dimctrl_LDADD = libTools.la libStateMachine.la libTime.la \
@@ -1004,4 +1015,6 @@
 	src/$(DEPDIR)/$(am__dirstamp)
 src/Connection.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
+src/ConnectionUSB.lo: src/$(am__dirstamp) \
+	src/$(DEPDIR)/$(am__dirstamp)
 libStateMachine.la: $(libStateMachine_la_OBJECTS) $(libStateMachine_la_DEPENDENCIES) 
 	$(AM_V_CXXLD)$(CXXLINK) -rpath $(libdir) $(libStateMachine_la_OBJECTS) $(libStateMachine_la_LIBADD) $(LIBS)
@@ -1078,4 +1091,9 @@
 	@rm -f astro$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(astro_OBJECTS) $(astro_LDADD) $(LIBS)
+src/biasctrl.$(OBJEXT): src/$(am__dirstamp) \
+	src/$(DEPDIR)/$(am__dirstamp)
+biasctrl$(EXEEXT): $(biasctrl_OBJECTS) $(biasctrl_DEPENDENCIES) 
+	@rm -f biasctrl$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(biasctrl_OBJECTS) $(biasctrl_LDADD) $(LIBS)
 src/chatclient.$(OBJEXT): src/$(am__dirstamp) \
 	src/$(DEPDIR)/$(am__dirstamp)
@@ -1289,4 +1307,6 @@
 	-rm -f src/Connection.$(OBJEXT)
 	-rm -f src/Connection.lo
+	-rm -f src/ConnectionUSB.$(OBJEXT)
+	-rm -f src/ConnectionUSB.lo
 	-rm -f src/Console.$(OBJEXT)
 	-rm -f src/Console.lo
@@ -1345,4 +1365,5 @@
 	-rm -f src/WindowLog.lo
 	-rm -f src/argv.$(OBJEXT)
+	-rm -f src/biasctrl.$(OBJEXT)
 	-rm -f src/chatclient.$(OBJEXT)
 	-rm -f src/chatserv.$(OBJEXT)
@@ -1407,4 +1428,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/Configuration.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/Connection.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/ConnectionUSB.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/Console.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/Converter.Plo@am__quote@
@@ -1438,4 +1460,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/WindowLog.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/argv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/biasctrl.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/chatclient.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/chatserv.Po@am__quote@
Index: trunk/FACT++/gui/design.ui
===================================================================
--- trunk/FACT++/gui/design.ui	(revision 11227)
+++ trunk/FACT++/gui/design.ui	(revision 11228)
@@ -2874,5 +2874,5 @@
        </attribute>
        <layout class="QGridLayout" name="gridLayout_41">
-        <item row="1" column="0">
+        <item row="0" column="0">
          <widget class="QDockWidget" name="fFadDock">
           <property name="sizePolicy">
@@ -2901,8 +2901,8 @@
             <property name="geometry">
              <rect>
-              <x>630</x>
+              <x>460</x>
               <y>0</y>
-              <width>307</width>
-              <height>181</height>
+              <width>321</width>
+              <height>161</height>
              </rect>
             </property>
@@ -3104,37 +3104,11 @@
             </layout>
            </widget>
-           <widget class="QPushButton" name="fFadSingleTrigger">
-            <property name="geometry">
-             <rect>
-              <x>520</x>
-              <y>220</y>
-              <width>94</width>
-              <height>24</height>
-             </rect>
-            </property>
-            <property name="text">
-             <string>Trigger</string>
-            </property>
-           </widget>
-           <widget class="QPushButton" name="fFadResetTriggerId">
-            <property name="geometry">
-             <rect>
-              <x>520</x>
-              <y>250</y>
-              <width>94</width>
-              <height>24</height>
-             </rect>
-            </property>
-            <property name="text">
-             <string>Reset Evt ID</string>
-            </property>
-           </widget>
            <widget class="QGroupBox" name="groupBox_12">
             <property name="geometry">
              <rect>
-              <x>0</x>
-              <y>330</y>
-              <width>361</width>
-              <height>171</height>
+              <x>10</x>
+              <y>300</y>
+              <width>441</width>
+              <height>211</height>
              </rect>
             </property>
@@ -3151,8 +3125,8 @@
             <property name="geometry">
              <rect>
-              <x>630</x>
-              <y>190</y>
-              <width>303</width>
-              <height>324</height>
+              <x>460</x>
+              <y>160</y>
+              <width>321</width>
+              <height>361</height>
              </rect>
             </property>
@@ -3162,6 +3136,6 @@
             <layout class="QGridLayout" name="gridLayout_42">
              <item row="0" column="0">
-              <layout class="QGridLayout" name="gridLayout_37" rowstretch="0,0,0,0,0,0,0,0,0,0">
-               <item row="1" column="1">
+              <layout class="QGridLayout" name="gridLayout_37" rowstretch="0,0,0,0,0,0,0,0,0,0,0,0">
+               <item row="3" column="1">
                 <widget class="QPushButton" name="fFadTriggerLineOn">
                  <property name="text">
@@ -3170,5 +3144,5 @@
                 </widget>
                </item>
-               <item row="1" column="2">
+               <item row="3" column="2">
                 <widget class="QPushButton" name="fFadTriggerLineOff">
                  <property name="text">
@@ -3177,5 +3151,5 @@
                 </widget>
                </item>
-               <item row="1" column="3">
+               <item row="3" column="3">
                 <widget class="QLabel" name="label_134">
                  <property name="text">
@@ -3184,5 +3158,5 @@
                 </widget>
                </item>
-               <item row="1" column="0">
+               <item row="3" column="0">
                 <widget class="QPushButton" name="fFadLedTriggerLine">
                  <property name="enabled">
@@ -3222,5 +3196,5 @@
                 </widget>
                </item>
-               <item row="0" column="1">
+               <item row="2" column="1">
                 <widget class="QPushButton" name="fFadSocket0">
                  <property name="text">
@@ -3229,5 +3203,5 @@
                 </widget>
                </item>
-               <item row="0" column="2">
+               <item row="2" column="2">
                 <widget class="QPushButton" name="fFadSocket17">
                  <property name="text">
@@ -3236,5 +3210,5 @@
                 </widget>
                </item>
-               <item row="0" column="3">
+               <item row="2" column="3">
                 <widget class="QLabel" name="label_137">
                  <property name="text">
@@ -3243,5 +3217,5 @@
                 </widget>
                </item>
-               <item row="0" column="0">
+               <item row="2" column="0">
                 <widget class="QPushButton" name="fFadLedSocket">
                  <property name="enabled">
@@ -3281,5 +3255,5 @@
                 </widget>
                </item>
-               <item row="3" column="1">
+               <item row="5" column="1">
                 <widget class="QPushButton" name="fFadBusyOn">
                  <property name="text">
@@ -3288,5 +3262,5 @@
                 </widget>
                </item>
-               <item row="3" column="2">
+               <item row="5" column="2">
                 <widget class="QPushButton" name="fFadBusyOff">
                  <property name="text">
@@ -3295,5 +3269,5 @@
                 </widget>
                </item>
-               <item row="3" column="3">
+               <item row="5" column="3">
                 <widget class="QLabel" name="label_104">
                  <property name="text">
@@ -3302,5 +3276,5 @@
                 </widget>
                </item>
-               <item row="3" column="0">
+               <item row="5" column="0">
                 <widget class="QPushButton" name="fFadLedBusy">
                  <property name="enabled">
@@ -3340,5 +3314,5 @@
                 </widget>
                </item>
-               <item row="2" column="3">
+               <item row="4" column="3">
                 <widget class="QLabel" name="label_106">
                  <property name="text">
@@ -3347,5 +3321,5 @@
                 </widget>
                </item>
-               <item row="2" column="2">
+               <item row="4" column="2">
                 <widget class="QPushButton" name="fFadContTriggerOff">
                  <property name="text">
@@ -3354,5 +3328,5 @@
                 </widget>
                </item>
-               <item row="2" column="1">
+               <item row="4" column="1">
                 <widget class="QPushButton" name="fFadContTriggerOn">
                  <property name="text">
@@ -3361,5 +3335,5 @@
                 </widget>
                </item>
-               <item row="2" column="0">
+               <item row="4" column="0">
                 <widget class="QPushButton" name="fFadLedContTrigger">
                  <property name="enabled">
@@ -3399,5 +3373,5 @@
                 </widget>
                </item>
-               <item row="4" column="1">
+               <item row="6" column="1">
                 <widget class="QPushButton" name="fFadDrsOn">
                  <property name="text">
@@ -3406,5 +3380,5 @@
                 </widget>
                </item>
-               <item row="4" column="2">
+               <item row="6" column="2">
                 <widget class="QPushButton" name="fFadDrsOff">
                  <property name="text">
@@ -3413,5 +3387,5 @@
                 </widget>
                </item>
-               <item row="4" column="3">
+               <item row="6" column="3">
                 <widget class="QLabel" name="label_93">
                  <property name="text">
@@ -3420,5 +3394,5 @@
                 </widget>
                </item>
-               <item row="5" column="3">
+               <item row="7" column="3">
                 <widget class="QLabel" name="label_94">
                  <property name="text">
@@ -3427,5 +3401,5 @@
                 </widget>
                </item>
-               <item row="5" column="2">
+               <item row="7" column="2">
                 <widget class="QPushButton" name="fFadDwriteOff">
                  <property name="text">
@@ -3434,5 +3408,5 @@
                 </widget>
                </item>
-               <item row="5" column="1">
+               <item row="7" column="1">
                 <widget class="QPushButton" name="fFadDwriteOn">
                  <property name="text">
@@ -3441,5 +3415,5 @@
                 </widget>
                </item>
-               <item row="4" column="0">
+               <item row="6" column="0">
                 <widget class="QPushButton" name="fFadLedDrsEnabled">
                  <property name="enabled">
@@ -3479,5 +3453,5 @@
                 </widget>
                </item>
-               <item row="5" column="0">
+               <item row="7" column="0">
                 <widget class="QPushButton" name="fFadLedDrsWrite">
                  <property name="enabled">
@@ -3517,5 +3491,5 @@
                 </widget>
                </item>
-               <item row="6" column="1">
+               <item row="8" column="1">
                 <widget class="QPushButton" name="pushButton_8">
                  <property name="enabled">
@@ -3527,5 +3501,5 @@
                 </widget>
                </item>
-               <item row="6" column="2">
+               <item row="8" column="2">
                 <widget class="QPushButton" name="pushButton_13">
                  <property name="enabled">
@@ -3537,5 +3511,5 @@
                 </widget>
                </item>
-               <item row="7" column="2">
+               <item row="9" column="2">
                 <widget class="QPushButton" name="pushButton_14">
                  <property name="enabled">
@@ -3547,5 +3521,5 @@
                 </widget>
                </item>
-               <item row="7" column="1">
+               <item row="9" column="1">
                 <widget class="QPushButton" name="pushButton_9">
                  <property name="enabled">
@@ -3557,5 +3531,5 @@
                 </widget>
                </item>
-               <item row="8" column="1">
+               <item row="10" column="1">
                 <widget class="QPushButton" name="pushButton_10">
                  <property name="enabled">
@@ -3567,5 +3541,5 @@
                 </widget>
                </item>
-               <item row="8" column="2">
+               <item row="10" column="2">
                 <widget class="QPushButton" name="pushButton_15">
                  <property name="enabled">
@@ -3577,5 +3551,5 @@
                 </widget>
                </item>
-               <item row="6" column="3">
+               <item row="8" column="3">
                 <widget class="QLabel" name="label_95">
                  <property name="text">
@@ -3584,5 +3558,5 @@
                 </widget>
                </item>
-               <item row="7" column="3">
+               <item row="9" column="3">
                 <widget class="QLabel" name="label_96">
                  <property name="text">
@@ -3591,5 +3565,5 @@
                 </widget>
                </item>
-               <item row="8" column="3">
+               <item row="10" column="3">
                 <widget class="QLabel" name="label_97">
                  <property name="text">
@@ -3598,5 +3572,5 @@
                 </widget>
                </item>
-               <item row="6" column="0">
+               <item row="8" column="0">
                 <widget class="QPushButton" name="fFadLedDcmLocked">
                  <property name="enabled">
@@ -3636,5 +3610,5 @@
                 </widget>
                </item>
-               <item row="7" column="0">
+               <item row="9" column="0">
                 <widget class="QPushButton" name="fFadLedDcmReady">
                  <property name="enabled">
@@ -3674,5 +3648,5 @@
                 </widget>
                </item>
-               <item row="8" column="0">
+               <item row="10" column="0">
                 <widget class="QPushButton" name="fFadLedSpiSclk">
                  <property name="enabled">
@@ -3712,5 +3686,5 @@
                 </widget>
                </item>
-               <item row="9" column="1">
+               <item row="11" column="1">
                 <widget class="QPushButton" name="fFadStartRun">
                  <property name="enabled">
@@ -3722,5 +3696,5 @@
                 </widget>
                </item>
-               <item row="9" column="2">
+               <item row="11" column="2">
                 <widget class="QPushButton" name="fFadStopRun">
                  <property name="enabled">
@@ -3732,8 +3706,22 @@
                 </widget>
                </item>
-               <item row="9" column="3">
+               <item row="11" column="3">
                 <widget class="QLabel" name="label_136">
                  <property name="text">
                   <string>Run</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="2">
+                <widget class="QPushButton" name="fFadSingleTrigger">
+                 <property name="text">
+                  <string>Trigger</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="3">
+                <widget class="QPushButton" name="fFadResetTriggerId">
+                 <property name="text">
+                  <string>Reset Evt ID</string>
                  </property>
                 </widget>
@@ -3746,7 +3734,7 @@
             <property name="geometry">
              <rect>
-              <x>0</x>
-              <y>20</y>
-              <width>361</width>
+              <x>10</x>
+              <y>0</y>
+              <width>441</width>
               <height>300</height>
              </rect>
Index: trunk/FACT++/src/argv.cc
===================================================================
--- trunk/FACT++/src/argv.cc	(revision 11227)
+++ trunk/FACT++/src/argv.cc	(revision 11228)
@@ -4,4 +4,36 @@
 
 using namespace std;
+
+template<class T,class S>
+std::ostream &operator<<(std::ostream &out, const pair<T,S> &f)
+{
+    out << f.first << "|" << f.second;
+    return out;
+}
+template<class T, class S>
+std::istream &operator>>(std::istream &in,  pair<T,S> &f)
+{
+    char c;
+    in >> f.first;
+    in >> c;
+    if (c!=':')
+        return in;
+    in >> f.second;
+    return in;
+}
+
+typedef pair<int,int> mytype;
+
+
+//Source is OutputStreamable, meaning that an operator<< is defined
+// that takes a std::ostream or std::wostream object on the left hand side
+// and an instance of the argument type on the right.
+
+// Target is InputStreamable, meaning that an operator>> is defined that
+// takes a std::istream or std::wistream object on the left hand side and
+// an instance of the result type on the right.
+
+//Target is CopyConstructible [20.1.3].
+//Target is DefaultConstructible, meaning that it is possible to default-initialize an object of that type [8.5, 20.1.4].
 
 // --------------------------------------------------------------------------
@@ -82,4 +114,5 @@
         ("switch",        po_switch(),                    "include path")
         ("bool",          var<bool>()->implicit_value(true),                    "include path")
+        ("mytype",        var<mytype>(),                  "include path")
         ;
 
@@ -172,4 +205,5 @@
     cout << conf.Has("switch") << " " << conf.Get<bool>("switch") << endl;
     cout << conf.Has("bool") << " " << conf.Get<bool>("bool") << endl;
+    cout << conf.Has("mytype") << " " << conf.Get<mytype>("mytype") << endl;
 
     return 0;
Index: trunk/FACT++/src/fad.cc
===================================================================
--- trunk/FACT++/src/fad.cc	(revision 11227)
+++ trunk/FACT++/src/fad.cc	(revision 11228)
@@ -89,4 +89,5 @@
         fHeader.fTriggerId = fHeader.fEventCounter;
         fHeader.fTimeStamp = uint32_t((Time(Time::utc).UnixTime()-fStartTime)*10000);
+        fHeader.fFreqRefClock = 997+rand()/(RAND_MAX/7);
 
         for (int i=0; i<FAD::kNumTemp; i++)
Index: trunk/FACT++/src/logtime.cc
===================================================================
--- trunk/FACT++/src/logtime.cc	(revision 11227)
+++ trunk/FACT++/src/logtime.cc	(revision 11228)
@@ -6,7 +6,9 @@
 #include <iostream>
 
+#include "DimDescriptionService.h"
+
 int main(int, const char **)
 {
-   // We could use putenv to make the Configure class change the value...
+    // We could use putenv to make the Configure class change the value...
     setenv("DIM_DNS_NODE", "localhost", 0);
 
@@ -14,6 +16,32 @@
     DimServer::start("TIME");
 
+    usleep(2000000);
+
+    DimServer::stop();
+
+    return 0;
+
     // Some info on the console
     std::cout << "Offering TIME/MESSAGE...\n" << std::endl;
+
+    short s;
+    int i;
+    long long ll;
+    float f;
+    DimDescribedService servt("TIME/TEST", "O:1;I:1;C",
+                              "This is my test command|Char[c]:This is a char|   Int This is an int|String[s]:This is a string");
+
+    DimDescribedService servs("TIME/SHORT",     s,  "[a]");
+    DimDescribedService servx("TIME/LONGLONG",  ll, "|: This is my long long");
+    DimDescribedService servi("TIME/INT",       i,  "|MyInt  [  mi  ] ");
+    DimDescribedService servf("TIME/FLOAT",     f,  "|   MyFloat  :   This is my float");
+    DimDescribedService servc("TIME/TIME", const_cast<char*>(""), "|MyTime[T]:This is my time");
+
+    DimCommand cmd("TIME/CMD", "I:2;F:2");
+
+    DimDescriptionService des("TIME/CMD", "|range[addr]:From DAC to DAC|values[DAC]:DAC values to be set");
+
+    {
+    Time t0;
 
     // Setup a DimService called TIME/MESSAGE
@@ -23,8 +51,21 @@
         // Send current time
         msg.Message(Time().GetAsStr());
+//        servx.Update();
+        /*
+        servs.updateService();
+        servi.updateService();
+        servf.updateService();
+        servc.updateService();
+         */
+        // wait approximately one second
+        usleep(100000);
 
-        // wait approximately one second
-        usleep(1000000);
+//        if (t0.UnixTime()-Time().UnixTime()<-5)
+//            break;
     }
+    }
+
+    DimDescribedService servxx("TIME/XXX", const_cast<char*>(""), "|MyTime[T]:This is my time");
+    usleep(10000000);
 
     return 0;
Index: trunk/FACT++/src/tools.cc
===================================================================
--- trunk/FACT++/src/tools.cc	(revision 11227)
+++ trunk/FACT++/src/tools.cc	(revision 11228)
@@ -12,6 +12,8 @@
 #include <stdarg.h>
 
+#include <boost/filesystem.hpp>
+
 using namespace std;
-
+/*
 string Tools::Format(const char *fmt, va_list &ap)
 {
@@ -49,4 +51,5 @@
     return str;
 }
+*/
 
 // --------------------------------------------------------------------------
@@ -54,5 +57,5 @@
 //! This is a static helper to remove leading and trailing whitespaces.
 //!
-//! @param buf
+//! @param str
 //!    a pointer to the char array from which the whitespaces should be
 //!    removed
@@ -73,2 +76,47 @@
     return str.substr(start, end-start+1);
 }
+
+// --------------------------------------------------------------------------
+//
+//! Splits a string of the form [SERVER/]COMMAND[ arguments]
+//! into SERVER, COMMAND and arguments.
+//!
+//! @param str
+//!    string to be splitted
+//!
+//! @returns
+//!    a vector<string> with three components. Depending on what is existing
+//!    in the string some of the components might be empty.
+//!
+/*
+vector<string> Split(std::string str)
+{
+    const size_t p0 = str.find_first_of('/');
+
+    size_t p1 = str.find_first_of(' ');
+
+    vector<string> v(3);
+
+    // string starts with SERVER/COMMAND[ arguments]
+    if (p0<p1)
+    {
+        // SERVER
+        v[0] = str.substr(0, p0);
+
+        // COMMAND[ arguments)
+        str = str.substr(p0+1);
+        p1  = str.find_first_of(' ');
+    }
+
+    // String is of the form: COMMAND[ arguments]
+
+    // COMMAND
+    v[1] = str.substr(0, p1);
+
+    // Has arguments
+    if (p1!=string::npos)
+        v[2] = str.substr(p1+1);
+
+    return v;
+}
+*/
Index: trunk/FACT++/src/tools.h
===================================================================
--- trunk/FACT++/src/tools.h	(revision 11227)
+++ trunk/FACT++/src/tools.h	(revision 11228)
@@ -1,8 +1,9 @@
 #include <string>
+#include <vector>
 
 namespace Tools
 {
-    std::string Format(const char *fmt, va_list &ap);
-    std::string Form(const char *fmt, ...);
+//    std::string Format(const char *fmt, va_list &ap);
+//    std::string Form(const char *fmt, ...);
     std::string Trim(const std::string &str);
 }
