FACT++  1.0
void DimRpcInfo::doIt ( void *  data,
int  size 
)
private

Definition at line 736 of file diccpp.cxx.

References data, dim_wait(), DimClient::getNoDataCopy(), DimInfo::itsHandler, DimInfo::itsNolinkBuf, DimInfo::itsNolinkSize, rpc_user_routine(), DimClient::sendCommand(), size, DimTimer::start(), and DimTimer::stop().

737 {
738  int ret;
739 
740  wakeUp = 0;
741  if(DimClient::getNoDataCopy() == 0)
742  {
743  if(!itsDataOut)
744  {
745  itsDataOut = new char[size];
747  }
748  else if(itsDataOutSize < size)
749  {
750  delete[] (char *)itsDataOut;
751  itsDataOut = new char[size];
753  }
754  memcpy(itsDataOut, data, (size_t)size);
755  }
756  else
757  {
758  itsDataOut = data;
759  }
760  while(!itsConnected)
761  dim_wait();
762  itsWaiting = 1;
763  if(itsTimeout)
764  start(itsTimeout);
765 //dim_print_date_time();
766 //printf("DIM RPC: Started Timer for %s - %d secs\n", itsName, itsTimeout);
768  if(!ret)
769  {
770  if(itsTimeout)
771  stop();
772 //dim_print_date_time();
773 //printf("DIM RPC: Stopped Timer, Command failed for %s\n", itsName);
774 // rpc_user_routine((int *)&itsTagId, itsNolinkBuf, &itsNolinkSize);
776  }
777 /*
778  else
779  {
780  if(itsTimeout)
781  start(itsTimeout);
782  }
783 */
784 }
int start(int time)
Definition: dimcpp.cxx:29
static int sendCommand(const char *name, int data)
Definition: diccpp.cxx:1098
int dim_wait(void)
Definition: dim_thr.c:409
int itsTimeout
Definition: dic.hxx:425
int itsDataOutSize
Definition: dic.hxx:359
void * itsNolinkBuf
Definition: dic.hxx:364
static void rpc_user_routine(void *tagp, void *bufp, int *sizep)
Definition: diccpp.cxx:518
char * itsNameOut
Definition: dic.hxx:424
int stop()
Definition: dimcpp.cxx:39
DimRpcInfo * itsHandler
Definition: dic.hxx:366
long dim_long
Definition: dim_common.h:57
static int getNoDataCopy()
Definition: diccpp.cxx:1241
int itsNolinkSize
Definition: dic.hxx:365
int size
Definition: db_dim_server.c:17
float data[4 *1440]
int wakeUp
Definition: dic.hxx:361
void * itsDataOut
Definition: dic.hxx:358
int itsConnected
Definition: dic.hxx:363
int itsWaiting
Definition: dic.hxx:362

+ Here is the call graph for this function: