FACT++  1.0
int main ( void  )

Definition at line 107 of file Copy of test_server.cxx.

References add_serv(), add_serv_bool(), add_serv_str(), new_servint, DimServer::start(), and DimService::updateService().

108 {
109  int ival = 0;
110 // ErrorHandler errHandler;
111 // ExitHandler exHandler;
112 // DimServer::setDnsNode("axdes2.cern.ch");
113  string s1;
114  bool boolval;
115  ServWithHandler *testServ;
116  DimServerDns *newDns;
117 
118  newDns = new DimServerDns("lxplus237.cern.ch", 0, "new_TEST");
119 
120 /*
121  int i, arr[15000];
122  DimService *servp;
123  DimCommand *cmndp;
124  char str[132];
125 */
126 // float farr[4];
127 // DimService *farrp;
128 
129  s1 = "hello";
130  add_serv(ival);
131  DimService servint("TEST/INTVAL",ival);
132  DimService new_servint(newDns, "new_TEST/INTVAL",ival);
133  add_serv_str(s1);
134  boolval = 0;
135  add_serv_bool(boolval);
136  CmndServ cmdsvr;
137 
138  testServ = new ServWithHandler("MY_NEW_TEST_SERVICE_WITH_HANDLER");
139 
140 // farr[0] = 1.2;
141 // farr[1] = 2.3;
142 // farrp = new DimService("/PCITCO147/sensors/fan/input","F", farr, sizeof(farr));
143 
144  DimServer::start("TEST");
145 
146 /*
147 // DimServer::autoStartOff();
148  DimServer::start("TEST");
149 
150  for(i = 0; i < 15000; i++)
151  {
152  arr[i] = i;
153  sprintf(str,"ServiceManyTest/%05d",i);
154  servp = new DimService(str,arr[i]);
155  servp->setQuality(1);
156  servp->updateService(arr[i]);
157 // DimServer::start("TEST");
158  sprintf(str,"CommandManyTest/%05d",i);
159  cmndp = new CmndServMany(str);
160 // DimServer::start("TEST");
161  }
162 */
163 
164  while(1)
165  {
166  sleep(5);
167  s1 = "hello1";
168  if(!boolval)
169  boolval = 1;
170  else
171  boolval = 0;
172  ival++;
173  servint.updateService();
174  }
175  return 0;
176 }
DimService * new_servint
Definition: README_v19.txt:381
static void start()
Definition: discpp.cxx:512
void add_serv(const int &ival)
void add_serv_str(const string &s1)
void add_serv_bool(const bool &boolval)

+ Here is the call graph for this function: