FACT++  1.0
int main ( void  )

Definition at line 108 of file cpp_server.cxx.

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

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

+ Here is the call graph for this function: