FACT++  1.0
void DimStampedInfo::subscribe ( char *  name,
int  time,
void *  nolink,
int  nolinksize,
DimInfoHandler handler 
)
privatevirtual

Reimplemented from DimInfo.

Definition at line 239 of file diccpp.cxx.

References DimInfo::doIt(), handler(), DimInfo::itsData, DimInfo::itsDataSize, DimInfo::itsFormat, DimInfo::itsHandler, DimInfo::itsId, DimInfo::itsName, DimInfo::itsNolinkBuf, DimInfo::itsNolinkSize, DimInfo::itsSize, DimInfo::itsTime, DimInfo::itsType, MONITORED, ONCE_ONLY, and time.

241 {
242  itsId = 0;
243  itsData = 0;
244  itsFormat = 0;
246  itsDataSize = 0;
247  itsSize = 0;
248  itsNolinkBuf = 0;
249  itsNolinkSize = 0;
250  itsName = 0;
251  if(!name)
252  {
253  return;
254  }
255  itsName = new char[(int)strlen(name)+1];
256  strcpy(itsName,name);
257  itsNolinkBuf = nolink;
258  itsNolinkSize = nolinksize;
259  if(nolinksize > 0)
260  {
261  itsNolinkBuf = new char[nolinksize];
262  itsNolinkSize = nolinksize;
263  memcpy(itsNolinkBuf, nolink, (size_t)nolinksize);
264  }
265  if(!time)
266  {
267  itsType = MONITORED;
268  itsTime = 0;
269  }
270  else if(time > 0)
271  {
272  itsType = MONITORED;
273  itsTime = time;
274  }
275  else
276  {
277  itsType = ONCE_ONLY;
278  itsTime = 30;
279  }
280  doIt();
281 }
void doIt()
Definition: diccpp.cxx:227
#define MONITORED
Definition: dim_common.h:9
int itsSize
Definition: dic.hxx:99
int itsId
Definition: dic.hxx:125
void * itsData
Definition: dic.hxx:97
char * itsName
Definition: dic.hxx:121
void * itsNolinkBuf
Definition: dic.hxx:130
char * itsFormat
Definition: dic.hxx:129
Warning because the service this data corrsponds to might have been last updated longer ago than Local time
Definition: smartfact.txt:92
DimInfoHandler * itsHandler
Definition: dic.hxx:34
static void handler(int conn_id, char *packet, int size, int status)
Definition: webServer.c:635
int itsType
Definition: dic.hxx:127
int itsNolinkSize
Definition: dic.hxx:131
#define ONCE_ONLY
Definition: dim_common.h:7
int itsDataSize
Definition: dic.hxx:98
int itsTime
Definition: dic.hxx:126

+ Here is the call graph for this function: