Ignore:
Timestamp:
07/01/11 08:38:40 (13 years ago)
Author:
tbretz
Message:
Reverted commit by mistake.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.