FACT++  1.0
void DimRpcInfo::subscribe ( char *  name,
void *  data,
int  size,
void *  nolink,
int  nolinksize,
int  timeout 
)
private

Definition at line 682 of file diccpp.cxx.

References dic_info_service_stamped(), dim_init(), DimInfo::doIt(), DimInfo::itsData, DimInfo::itsDataSize, DimInfo::itsHandler, DimInfo::itsId, DimInfo::itsName, DimInfo::itsNolinkBuf, DimInfo::itsNolinkSize, MONIT_FIRST, and rpc_user_routine().

684 {
685 
686  itsId = 0;
687 // itsTagId = 0;
688  itsInit = 0;
689  itsWaiting = 0;
690  itsName = new char[(int)strlen(name)+1];
691  strcpy(itsName,name);
692  itsHandler = this;
693  itsDataSize = 0;
694  itsData = 0;
695  itsDataOutSize = 0;
696  itsDataOut = 0;
697  itsNolinkBuf = nolink;
698  itsNolinkSize = nolinksize;
699  if(nolinksize > 0)
700  {
701  itsNolinkBuf = new char[nolinksize];
702  itsNolinkSize = nolinksize;
703  memcpy(itsNolinkBuf, nolink, (size_t)nolinksize);
704  }
705  itsNameOut = new char[(int)strlen(name)+1+10];
706  strcpy(itsNameOut,name);
707  strcat(itsNameOut,(char *)"/RpcIn");
708  itsNameIn = new char[(int)strlen(name)+1+10];
709  strcpy(itsNameIn,name);
710  strcat(itsNameIn,(char *)"/RpcOut");
711  itsTimeout = timeout;
712  dim_init();
713  {
714  if(!itsId)
715  {
716 // itsTagId = id_get((void *)itsHandler, SRC_DIC);
717 
718 // itsId = dic_info_service_stamped(itsNameIn,MONIT_ONLY,itsTimeout,
719  itsConnected = 0;
720 // itsId = dic_info_service_stamped(itsNameIn,MONITORED,itsTimeout,
722  0, 0,
723 // rpc_user_routine, itsTagId,
726 // dim_usleep(200000);
727  itsInit = 1;
728  }
729  }
730  if(size)
731  {
732  doIt(data, size);
733  }
734 }
unsigned dic_info_service_stamped(char *serv_name, int req_type, int req_timeout, void *serv_address, int serv_size, void(*usr_routine)(), dim_long tag, void *fill_addr, int fill_size)
Definition: dic.c:613
#define MONIT_FIRST
Definition: dim_common.h:15
int itsTimeout
Definition: dic.hxx:425
int itsDataOutSize
Definition: dic.hxx:359
void * itsNolinkBuf
Definition: dic.hxx:364
void doIt(void *data, int size)
Definition: diccpp.cxx:736
static void rpc_user_routine(void *tagp, void *bufp, int *sizep)
Definition: diccpp.cxx:518
int itsId
Definition: dic.hxx:353
void * itsData
Definition: dic.hxx:356
char * itsNameOut
Definition: dic.hxx:424
void dim_init()
Definition: dim_thr.c:111
int itsDataSize
Definition: dic.hxx:357
DimRpcInfo * itsHandler
Definition: dic.hxx:366
long dim_long
Definition: dim_common.h:57
int itsNolinkSize
Definition: dic.hxx:365
int size
Definition: db_dim_server.c:17
float data[4 *1440]
char * itsNameIn
Definition: dic.hxx:423
void * itsDataOut
Definition: dic.hxx:358
int itsConnected
Definition: dic.hxx:363
int itsInit
Definition: dic.hxx:355
char * itsName
Definition: dic.hxx:419
int itsWaiting
Definition: dic.hxx:362

+ Here is the call graph for this function: