Changeset 11229 for trunk/FACT++/src/logtime.cc
- Timestamp:
- 07/01/11 08:38:40 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/logtime.cc
r11228 r11229 6 6 #include <iostream> 7 7 8 #include "DimDescriptionService.h"9 10 8 int main(int, const char **) 11 9 { 12 10 // We could use putenv to make the Configure class change the value... 13 11 setenv("DIM_DNS_NODE", "localhost", 0); 14 12 … … 16 14 DimServer::start("TIME"); 17 15 18 usleep(2000000);19 20 DimServer::stop();21 22 return 0;23 24 16 // Some info on the console 25 17 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;46 18 47 19 // Setup a DimService called TIME/MESSAGE … … 51 23 // Send current time 52 24 msg.Message(Time().GetAsStr()); 53 // servx.Update(); 54 /* 55 servs.updateService(); 56 servi.updateService(); 57 servf.updateService(); 58 servc.updateService(); 59 */ 25 60 26 // wait approximately one second 61 usleep(100000); 62 63 // if (t0.UnixTime()-Time().UnixTime()<-5) 64 // break; 27 usleep(1000000); 65 28 } 66 }67 68 DimDescribedService servxx("TIME/XXX", const_cast<char*>(""), "|MyTime[T]:This is my time");69 usleep(10000000);70 29 71 30 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.