Changeset 18349 for trunk/FACT++/dim/src/examples
- Timestamp:
- 10/29/15 19:53:37 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/dim/src/examples/test_server.cxx
r15282 r18349 142 142 newDns = new DimServerDns(extraDns, 0, (char *)"new_TEST"); 143 143 144 /* 145 int i, arr[15000]; 146 DimService *servp; 147 DimCommand *cmndp; 148 char str[132]; 149 */ 144 // int i, arr[15000]; 145 // DimService *servp; 146 // DimCommand *cmndp; 147 // char str[132]; 148 150 149 // float farr[4]; 151 150 // DimService *farrp; … … 173 172 174 173 175 /*176 174 // DimServer::autoStartOff(); 177 DimServer::start("TEST");178 179 for(i = 0; i < 15000; i++)180 {181 arr[i] = i;182 sprintf(str,"ServiceManyTest/%05d",i);183 servp = new DimService(str,arr[i]);184 servp->setQuality(1);185 servp->updateService(arr[i]);186 175 // DimServer::start("TEST"); 187 sprintf(str,"CommandManyTest/%05d",i); 188 cmndp = new CmndServMany(str); 189 // DimServer::start("TEST"); 190 } 191 */ 176 177 // for(i = 0; i < 15000; i++) 178 // { 179 // arr[i] = i; 180 // sprintf(str,"ServiceManyTest/%05d",i); 181 // servp = new DimService(str,arr[i]); 182 // servp->setQuality(1); 183 // servp->updateService(arr[i]); 184 //// DimServer::start("TEST"); 185 // sprintf(str,"CommandManyTest/%05d",i); 186 // cmndp = new CmndServMany(str); 187 //// DimServer::start("TEST"); 188 // } 189 192 190 while(1) 193 191 { 194 192 sleep(5); 195 /* 196 while(cmdsvr.hasNext())197 {198 cmdsvr.getNext();199 cmdsvr.handleIt();200 }201 */ 193 194 // while(cmdsvr.hasNext()) 195 // { 196 // cmdsvr.getNext(); 197 // cmdsvr.handleIt(); 198 // } 199 202 200 s1 = "hello1"; 203 201 if(!boolval) … … 217 215 } 218 216 217 /* 218 int main() 219 { 220 DimService *servint, *newServint; 221 int ival = 0; 222 223 DimServer::start("TEST"); 224 servint = new DimService("TEST/INTVAL",ival); 225 sleep(20); 226 DimServer::stop(); 227 sleep(1); 228 DimServer::start("TESTOTHER"); 229 newServint = new DimService("TESTOTHER/INTVAL",ival); 230 sleep(20); 231 DimServer::stop(); 232 } 233 */
Note:
See TracChangeset
for help on using the changeset viewer.