Changeset 11229 for trunk


Ignore:
Timestamp:
07/01/11 08:38:40 (13 years ago)
Author:
tbretz
Message:
Reverted commit by mistake.
Location:
trunk/FACT++
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/Makefile.am

    r11228 r11229  
    3737        fadctrl fad \
    3838        fscctrl fsc \
    39         biasctrl \
    4039        fitsdump
    4140
     
    176175        \
    177176        src/Connection.h      src/Connection.cc \
    178         src/ConnectionUSB.h   src/ConnectionUSB.cc \
    179177        \
    180178        FACT.h ByteOrder.h
     
    240238        libConfiguration.la
    241239
    242 biasctrl_SOURCES = src/biasctrl.cc src/LocalControl.h
    243 biasctrl_LDADD   = libDim.la libDim++.la  libDimExtension.la \
    244         libTime.la libTools.la libStateMachine.la \
    245         libConfiguration.la
    246 
    247240
    248241argv_SOURCES = src/argv.cc
    249 argv_LDADD = libConfiguration.la  libTime.la
     242argv_LDADD = libConfiguration.la
    250243
    251244
  • trunk/FACT++/Makefile.in

    r11228 r11229  
    5151        scheduler$(EXEEXT) triggerschedule$(EXEEXT) ftmctrl$(EXEEXT) \
    5252        ftm$(EXEEXT) fadctrl$(EXEEXT) fad$(EXEEXT) fscctrl$(EXEEXT) \
    53         fsc$(EXEEXT) biasctrl$(EXEEXT) fitsdump$(EXEEXT) \
    54         $(am__EXEEXT_2) $(am__EXEEXT_3)
     53        fsc$(EXEEXT) fitsdump$(EXEEXT) $(am__EXEEXT_2) $(am__EXEEXT_3)
    5554@HAS_LIBXP_TRUE@am__append_1 = did
    5655
     
    147146        src/DimServiceInfoList.lo src/DimNetwork.lo src/ServiceList.lo \
    148147        src/DimErrorRedirecter.lo src/DimDescriptionService.lo \
    149         src/Connection.lo src/ConnectionUSB.lo
     148        src/Connection.lo
    150149libStateMachine_la_OBJECTS = $(am_libStateMachine_la_OBJECTS)
    151150libTime_la_LIBADD =
     
    164163am_argv_OBJECTS = src/argv.$(OBJEXT)
    165164argv_OBJECTS = $(am_argv_OBJECTS)
    166 argv_DEPENDENCIES = libConfiguration.la libTime.la
     165argv_DEPENDENCIES = libConfiguration.la
    167166astro_SOURCES = astro.c
    168167astro_OBJECTS = astro.$(OBJEXT)
    169168astro_LDADD = $(LDADD)
    170 am_biasctrl_OBJECTS = src/biasctrl.$(OBJEXT)
    171 biasctrl_OBJECTS = $(am_biasctrl_OBJECTS)
    172 biasctrl_DEPENDENCIES = libDim.la libDim++.la libDimExtension.la \
    173         libTime.la libTools.la libStateMachine.la libConfiguration.la
    174169am_chatclient_OBJECTS = src/chatclient.$(OBJEXT)
    175170chatclient_OBJECTS = $(am_chatclient_OBJECTS)
     
    337332        $(libStateMachine_la_SOURCES) $(libTime_la_SOURCES) \
    338333        $(libTools_la_SOURCES) $(argv_SOURCES) astro.c \
    339         $(biasctrl_SOURCES) $(chatclient_SOURCES) $(chatserv_SOURCES) \
     334        $(chatclient_SOURCES) $(chatserv_SOURCES) \
    340335        $(datalogger_SOURCES) $(dclient5_SOURCES) $(did_SOURCES) \
    341336        $(dimctrl_SOURCES) $(dns_SOURCES) $(drivectrl_SOURCES) \
     
    350345        $(libStateMachine_la_SOURCES) $(libTime_la_SOURCES) \
    351346        $(libTools_la_SOURCES) $(argv_SOURCES) astro.c \
    352         $(biasctrl_SOURCES) $(chatclient_SOURCES) $(chatserv_SOURCES) \
     347        $(chatclient_SOURCES) $(chatserv_SOURCES) \
    353348        $(am__datalogger_SOURCES_DIST) $(dclient5_SOURCES) \
    354349        $(did_SOURCES) $(dimctrl_SOURCES) $(dns_SOURCES) \
     
    735730        \
    736731        src/Connection.h      src/Connection.cc \
    737         src/ConnectionUSB.h   src/ConnectionUSB.cc \
    738732        \
    739733        FACT.h ByteOrder.h
     
    787781        libConfiguration.la
    788782
    789 biasctrl_SOURCES = src/biasctrl.cc src/LocalControl.h
    790 biasctrl_LDADD = libDim.la libDim++.la  libDimExtension.la \
    791         libTime.la libTools.la libStateMachine.la \
    792         libConfiguration.la
    793 
    794783argv_SOURCES = src/argv.cc
    795 argv_LDADD = libConfiguration.la  libTime.la
     784argv_LDADD = libConfiguration.la
    796785dimctrl_SOURCES = src/dimctrl.cc src/RemoteControl.cc src/RemoteControl.h
    797786dimctrl_LDADD = libTools.la libStateMachine.la libTime.la \
     
    10151004        src/$(DEPDIR)/$(am__dirstamp)
    10161005src/Connection.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp)
    1017 src/ConnectionUSB.lo: src/$(am__dirstamp) \
    1018         src/$(DEPDIR)/$(am__dirstamp)
    10191006libStateMachine.la: $(libStateMachine_la_OBJECTS) $(libStateMachine_la_DEPENDENCIES)
    10201007        $(AM_V_CXXLD)$(CXXLINK) -rpath $(libdir) $(libStateMachine_la_OBJECTS) $(libStateMachine_la_LIBADD) $(LIBS)
     
    10911078        @rm -f astro$(EXEEXT)
    10921079        $(AM_V_CCLD)$(LINK) $(astro_OBJECTS) $(astro_LDADD) $(LIBS)
    1093 src/biasctrl.$(OBJEXT): src/$(am__dirstamp) \
    1094         src/$(DEPDIR)/$(am__dirstamp)
    1095 biasctrl$(EXEEXT): $(biasctrl_OBJECTS) $(biasctrl_DEPENDENCIES)
    1096         @rm -f biasctrl$(EXEEXT)
    1097         $(AM_V_CXXLD)$(CXXLINK) $(biasctrl_OBJECTS) $(biasctrl_LDADD) $(LIBS)
    10981080src/chatclient.$(OBJEXT): src/$(am__dirstamp) \
    10991081        src/$(DEPDIR)/$(am__dirstamp)
     
    13071289        -rm -f src/Connection.$(OBJEXT)
    13081290        -rm -f src/Connection.lo
    1309         -rm -f src/ConnectionUSB.$(OBJEXT)
    1310         -rm -f src/ConnectionUSB.lo
    13111291        -rm -f src/Console.$(OBJEXT)
    13121292        -rm -f src/Console.lo
     
    13651345        -rm -f src/WindowLog.lo
    13661346        -rm -f src/argv.$(OBJEXT)
    1367         -rm -f src/biasctrl.$(OBJEXT)
    13681347        -rm -f src/chatclient.$(OBJEXT)
    13691348        -rm -f src/chatserv.$(OBJEXT)
     
    14281407@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/Configuration.Plo@am__quote@
    14291408@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/Connection.Plo@am__quote@
    1430 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/ConnectionUSB.Plo@am__quote@
    14311409@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/Console.Plo@am__quote@
    14321410@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/Converter.Plo@am__quote@
     
    14601438@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/WindowLog.Plo@am__quote@
    14611439@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/argv.Po@am__quote@
    1462 @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/biasctrl.Po@am__quote@
    14631440@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/chatclient.Po@am__quote@
    14641441@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/chatserv.Po@am__quote@
  • trunk/FACT++/src/argv.cc

    r11228 r11229  
    44
    55using namespace std;
    6 
    7 template<class T,class S>
    8 std::ostream &operator<<(std::ostream &out, const pair<T,S> &f)
    9 {
    10     out << f.first << "|" << f.second;
    11     return out;
    12 }
    13 template<class T, class S>
    14 std::istream &operator>>(std::istream &in,  pair<T,S> &f)
    15 {
    16     char c;
    17     in >> f.first;
    18     in >> c;
    19     if (c!=':')
    20         return in;
    21     in >> f.second;
    22     return in;
    23 }
    24 
    25 typedef pair<int,int> mytype;
    26 
    27 
    28 //Source is OutputStreamable, meaning that an operator<< is defined
    29 // that takes a std::ostream or std::wostream object on the left hand side
    30 // and an instance of the argument type on the right.
    31 
    32 // Target is InputStreamable, meaning that an operator>> is defined that
    33 // takes a std::istream or std::wistream object on the left hand side and
    34 // an instance of the result type on the right.
    35 
    36 //Target is CopyConstructible [20.1.3].
    37 //Target is DefaultConstructible, meaning that it is possible to default-initialize an object of that type [8.5, 20.1.4].
    386
    397// --------------------------------------------------------------------------
     
    11482        ("switch",        po_switch(),                    "include path")
    11583        ("bool",          var<bool>()->implicit_value(true),                    "include path")
    116         ("mytype",        var<mytype>(),                  "include path")
    11784        ;
    11885
     
    205172    cout << conf.Has("switch") << " " << conf.Get<bool>("switch") << endl;
    206173    cout << conf.Has("bool") << " " << conf.Get<bool>("bool") << endl;
    207     cout << conf.Has("mytype") << " " << conf.Get<mytype>("mytype") << endl;
    208174
    209175    return 0;
  • trunk/FACT++/src/logtime.cc

    r11228 r11229  
    66#include <iostream>
    77
    8 #include "DimDescriptionService.h"
    9 
    108int main(int, const char **)
    119{
    12     // We could use putenv to make the Configure class change the value...
     10   // We could use putenv to make the Configure class change the value...
    1311    setenv("DIM_DNS_NODE", "localhost", 0);
    1412
     
    1614    DimServer::start("TIME");
    1715
    18     usleep(2000000);
    19 
    20     DimServer::stop();
    21 
    22     return 0;
    23 
    2416    // Some info on the console
    2517    std::cout << "Offering TIME/MESSAGE...\n" << std::endl;
    26 
    27     short s;
    28     int i;
    29     long long ll;
    30     float f;
    31     DimDescribedService servt("TIME/TEST", "O:1;I:1;C",
    32                               "This is my test command|Char[c]:This is a char|   Int This is an int|String[s]:This is a string");
    33 
    34     DimDescribedService servs("TIME/SHORT",     s,  "[a]");
    35     DimDescribedService servx("TIME/LONGLONG",  ll, "|: This is my long long");
    36     DimDescribedService servi("TIME/INT",       i,  "|MyInt  [  mi  ] ");
    37     DimDescribedService servf("TIME/FLOAT",     f,  "|   MyFloat  :   This is my float");
    38     DimDescribedService servc("TIME/TIME", const_cast<char*>(""), "|MyTime[T]:This is my time");
    39 
    40     DimCommand cmd("TIME/CMD", "I:2;F:2");
    41 
    42     DimDescriptionService des("TIME/CMD", "|range[addr]:From DAC to DAC|values[DAC]:DAC values to be set");
    43 
    44     {
    45     Time t0;
    4618
    4719    // Setup a DimService called TIME/MESSAGE
     
    5123        // Send current time
    5224        msg.Message(Time().GetAsStr());
    53 //        servx.Update();
    54         /*
    55         servs.updateService();
    56         servi.updateService();
    57         servf.updateService();
    58         servc.updateService();
    59          */
     25
    6026        // wait approximately one second
    61         usleep(100000);
    62 
    63 //        if (t0.UnixTime()-Time().UnixTime()<-5)
    64 //            break;
     27        usleep(1000000);
    6528    }
    66     }
    67 
    68     DimDescribedService servxx("TIME/XXX", const_cast<char*>(""), "|MyTime[T]:This is my time");
    69     usleep(10000000);
    7029
    7130    return 0;
  • trunk/FACT++/src/tools.cc

    r11228 r11229  
    1212#include <stdarg.h>
    1313
    14 #include <boost/filesystem.hpp>
     14using namespace std;
    1515
    16 using namespace std;
    17 /*
    1816string Tools::Format(const char *fmt, va_list &ap)
    1917{
     
    5149    return str;
    5250}
    53 */
    5451
    5552// --------------------------------------------------------------------------
     
    5754//! This is a static helper to remove leading and trailing whitespaces.
    5855//!
    59 //! @param str
     56//! @param buf
    6057//!    a pointer to the char array from which the whitespaces should be
    6158//!    removed
     
    7673    return str.substr(start, end-start+1);
    7774}
    78 
    79 // --------------------------------------------------------------------------
    80 //
    81 //! Splits a string of the form [SERVER/]COMMAND[ arguments]
    82 //! into SERVER, COMMAND and arguments.
    83 //!
    84 //! @param str
    85 //!    string to be splitted
    86 //!
    87 //! @returns
    88 //!    a vector<string> with three components. Depending on what is existing
    89 //!    in the string some of the components might be empty.
    90 //!
    91 /*
    92 vector<string> Split(std::string str)
    93 {
    94     const size_t p0 = str.find_first_of('/');
    95 
    96     size_t p1 = str.find_first_of(' ');
    97 
    98     vector<string> v(3);
    99 
    100     // string starts with SERVER/COMMAND[ arguments]
    101     if (p0<p1)
    102     {
    103         // SERVER
    104         v[0] = str.substr(0, p0);
    105 
    106         // COMMAND[ arguments)
    107         str = str.substr(p0+1);
    108         p1  = str.find_first_of(' ');
    109     }
    110 
    111     // String is of the form: COMMAND[ arguments]
    112 
    113     // COMMAND
    114     v[1] = str.substr(0, p1);
    115 
    116     // Has arguments
    117     if (p1!=string::npos)
    118         v[2] = str.substr(p1+1);
    119 
    120     return v;
    121 }
    122 */
  • trunk/FACT++/src/tools.h

    r11228 r11229  
    11#include <string>
    2 #include <vector>
    32
    43namespace Tools
    54{
    6 //    std::string Format(const char *fmt, va_list &ap);
    7 //    std::string Form(const char *fmt, ...);
     5    std::string Format(const char *fmt, va_list &ap);
     6    std::string Form(const char *fmt, ...);
    87    std::string Trim(const std::string &str);
    98}
Note: See TracChangeset for help on using the changeset viewer.