FACT++  1.0
void DimRpc::declareIt ( char *  name,
char *  formatin,
char *  formatout,
DimServerDns dns 
)
private

Definition at line 247 of file discpp.cxx.

References dis_add_cmnd, dis_add_cmnd_dns(), dis_add_service, dis_add_service_dns(), dis_init(), DimServerDns::getDnsId(), DimService::itsDns, DimService::itsName, rpcin_routine(), rpcout_routine(), and DimServer::start().

248 {
249 // itsTagId = 0;
250  itsIdIn = 0;
251  itsIdOut = 0;
252  itsDns = dns;
253  itsName = new char[(int)strlen(name)+1];
254  strcpy( itsName, name);
255  itsNameIn = new char[(int)strlen(name)+1+10];
256  strcpy( itsNameIn, name);
257  strcat(itsNameIn,(char *)"/RpcIn");
258  itsNameOut = new char[(int)strlen(name)+1+10];
259  strcpy( itsNameOut, name);
260  strcat(itsNameOut,(char *)"/RpcOut");
261  itsDataOut = new char[1];
263  itsKilled = 0;
264  itsTimeout = 0;
265 
266 // itsTagId = id_get((void *)this, SRC_DIS);
267  dis_init();
268  if(!itsDns)
269  {
270  DISABLE_AST
271  itsIdIn = dis_add_cmnd( itsNameIn, formatin,
272 // rpcin_routine, itsTagId);
273  rpcin_routine, (dim_long)this);
274  itsIdOut = dis_add_service( itsNameOut, formatout, 0,0,
275 // rpcout_routine, itsTagId);
276  rpcout_routine, (dim_long)this);
277  ENABLE_AST
279  }
280  else
281  {
282  DISABLE_AST
283  itsIdIn = dis_add_cmnd_dns( itsDns->getDnsId(), itsNameIn, formatin,
284 // rpcin_routine, itsTagId);
285  rpcin_routine, (dim_long)this);
286  itsIdOut = dis_add_service_dns( itsDns->getDnsId(), itsNameOut, formatout, 0,0,
287 // rpcout_routine, itsTagId);
288  rpcout_routine, (dim_long)this);
289  ENABLE_AST
290 // itsDns->addServiceId(itsIdIn);
291 // itsDns->addServiceId(itsIdOut);
293  }
294 }
void dis_init()
Definition: dis.c:220
char * itsName
Definition: dis.hxx:345
static void rpcout_routine(void *tagp, void **buf, int *size, int *first_time)
Definition: discpp.cxx:233
int itsTimeout
Definition: dis.hxx:354
dim_long getDnsId()
Definition: discpp.cxx:403
dis_add_service_dns(dnsid, name1,"I",&NewData, sizeof(NewData),(void *) 0, 0)
int itsSizeOut
Definition: dis.hxx:328
int itsIdOut
Definition: dis.hxx:342
static void rpcin_routine(void *tagp, void *buf, int *size)
Definition: discpp.cxx:181
#define dis_add_cmnd
Definition: dis.h:13
int itsIdIn
Definition: dis.hxx:341
char * itsNameOut
Definition: dis.hxx:347
long dim_long
Definition: dim_common.h:57
unsigned dis_add_cmnd_dns(dim_long dnsid, char *name, char *type, void(*user_routine)(), dim_long tag)
Definition: dis.c:510
char * itsNameIn
Definition: dis.hxx:346
static void start()
Definition: discpp.cxx:512
void * itsDataOut
Definition: dis.hxx:326
#define dis_add_service
Definition: dis.h:12
DimServerDns * itsDns
Definition: dis.hxx:351
int itsDataOutSize
Definition: dis.hxx:327
int itsKilled
Definition: dis.hxx:353

+ Here is the call graph for this function: