FACT++  1.0
dic.hxx
Go to the documentation of this file.
1 #ifndef __DICHHDEFS
2 #define __DICHHDEFS
3 #include <assert.h>
4 #include <stdlib.h>
5 #include <string.h>
6 #ifndef WIN32
7 #include <unistd.h>
8 #endif
9 #ifdef __VMS
10 #include <starlet.h>
11 #endif
12 #include "dim_core.hxx"
13 #include "dim.hxx"
14 #include "tokenstring.hxx"
15 
17 
18 class DimClient;
19 class DimInfo;
20 class DimCurrentInfo;
21 class DimRpcInfo;
22 
24 public:
26  DimInfo *getInfo() { return itsService; };
27  virtual void infoHandler() = 0;
28  virtual ~DimInfoHandler() {};
29 };
30 
31 class DllExp DimInfo : public DimInfoHandler, public DimTimer{
32 
33 public :
35 
37  { subscribe((char *)0, 0, (void *)0, 0, 0); };
38  DimInfo(const char *name, int nolink)
39  { subscribe((char *)name, 0, &nolink, sizeof(int), 0); };
40  DimInfo(const char *name, int time, int nolink)
41  { subscribe((char *)name, time, &nolink, sizeof(int), 0); };
42  DimInfo(const char *name, float nolink)
43  { subscribe((char *)name, 0, &nolink, sizeof(float), 0); };
44  DimInfo(const char *name, int time, float nolink)
45  { subscribe((char *)name, time, &nolink, sizeof(float), 0); };
46  DimInfo(const char *name, double nolink)
47  { subscribe((char *)name, 0, &nolink, sizeof(double), 0); };
48  DimInfo(const char *name, int time, double nolink)
49  { subscribe((char *)name, time, &nolink, sizeof(double), 0); };
50  DimInfo(const char *name, longlong nolink)
51  { subscribe((char *)name, 0, &nolink, sizeof(longlong), 0); };
52  DimInfo(const char *name, int time, longlong nolink)
53  { subscribe((char *)name, time, &nolink, sizeof(longlong), 0); };
54  DimInfo(const char *name, short nolink)
55  { subscribe((char *)name, 0, &nolink, sizeof(short), 0); };
56  DimInfo(const char *name, int time, short nolink)
57  { subscribe((char *)name, time, &nolink, sizeof(short), 0); };
58  DimInfo(const char *name, char *nolink)
59  { subscribe((char *)name, 0, nolink, (int)strlen(nolink)+1, 0); };
60  DimInfo(const char *name, int time, char *nolink)
61  { subscribe((char *)name, time, nolink, (int)strlen(nolink)+1, 0); };
62  DimInfo(const char *name, void *nolink, int nolinksize)
63  { subscribe((char *)name, 0, nolink, nolinksize, 0); };
64  DimInfo(const char *name, int time, void *nolink, int nolinksize)
65  { subscribe((char *)name, time, nolink, nolinksize, 0); };
66 
67  DimInfo(const char *name, int nolink, DimInfoHandler *handler)
68  { subscribe((char *)name, 0, &nolink, sizeof(int), handler); };
69  DimInfo(const char *name, int time, int nolink, DimInfoHandler *handler)
70  { subscribe((char *)name, time, &nolink, sizeof(int), handler); };
71  DimInfo(const char *name, float nolink, DimInfoHandler *handler)
72  { subscribe((char *)name, 0, &nolink, sizeof(float), handler); };
73  DimInfo(const char *name, int time, float nolink, DimInfoHandler *handler)
74  { subscribe((char *)name, time, &nolink, sizeof(float), handler); };
75  DimInfo(const char *name, double nolink, DimInfoHandler *handler)
76  { subscribe((char *)name, 0, &nolink, sizeof(double), handler); };
77  DimInfo(const char *name, int time, double nolink, DimInfoHandler *handler)
78  { subscribe((char *)name, time, &nolink, sizeof(double), handler); };
79  DimInfo(const char *name, longlong nolink, DimInfoHandler *handler)
80  { subscribe((char *)name, 0, &nolink, sizeof(longlong), handler); };
81  DimInfo(const char *name, int time, longlong nolink, DimInfoHandler *handler)
82  { subscribe((char *)name, time, &nolink, sizeof(longlong), handler); };
83  DimInfo(const char *name, short nolink, DimInfoHandler *handler)
84  { subscribe((char *)name, 0, &nolink, sizeof(short), handler); };
85  DimInfo(const char *name, int time, short nolink, DimInfoHandler *handler)
86  { subscribe((char *)name, time, &nolink, sizeof(short), handler); };
87  DimInfo(const char *name, char *nolink, DimInfoHandler *handler)
88  { subscribe((char *)name, 0, nolink, (int)strlen(nolink)+1, handler); };
89  DimInfo(const char *name, int time, char *nolink, DimInfoHandler *handler)
90  { subscribe((char *)name, time, nolink, (int)strlen(nolink)+1, handler); };
91  DimInfo(const char *name, void *nolink, int nolinksize, DimInfoHandler *handler)
92  { subscribe((char *)name, 0, nolink, nolinksize, handler); };
93  DimInfo(const char *name, int time, void *nolink, int nolinksize, DimInfoHandler *handler)
94  { subscribe((char *)name, time, nolink, nolinksize, handler); };
95 
96  virtual ~DimInfo();
97  void *itsData;
99  int itsSize;
100  int getSize() {return itsSize; };
101  char *getName() { return itsName; } ;
102  void *getData();
103  int getInt() { return *(int *)getData(); } ;
104  float getFloat() { return *(float *)getData(); } ;
105  double getDouble() { return *(double *)getData(); } ;
106  longlong getLonglong() { return *(longlong *)getData(); } ;
107  short getShort() { return *(short *)getData(); } ;
108  char *getString() { return (char *)getData(); } ;
109 
110  virtual void infoHandler();
111  void timerHandler();
112  virtual void subscribe(char *name, int time, void *nolink, int nolinksize,
114  virtual void doIt();
115  int getQuality();
116  int getTimestamp();
117  int getTimestampMillisecs();
118  char *getFormat();
119  void subscribe(char *name, void *nolink, int nolinksize, int time,
120  DimInfoHandler *handler)
121  { subscribe((char *)name, time, nolink, nolinksize, handler); };
122 
123 protected :
124  char *itsName;
125  int itsId;
126  int itsTime;
127  int itsType;
128 // int itsTagId;
129  char *itsFormat;
132  int secs, millisecs;
133 };
134 
136 
137 public :
139  DimStampedInfo(const char *name, int nolink)
140  { subscribe((char *)name, 0, &nolink, sizeof(int), 0); };
141  DimStampedInfo(const char *name, int time, int nolink)
142  { subscribe((char *)name, time, &nolink, sizeof(int), 0); };
143  DimStampedInfo(const char *name, float nolink)
144  { subscribe((char *)name, 0, &nolink, sizeof(float), 0); };
145  DimStampedInfo(const char *name, int time, float nolink)
146  { subscribe((char *)name, time, &nolink, sizeof(float), 0); };
147  DimStampedInfo(const char *name, double nolink)
148  { subscribe((char *)name, 0, &nolink, sizeof(double), 0); };
149  DimStampedInfo(const char *name, int time, double nolink)
150  { subscribe((char *)name, time, &nolink, sizeof(double), 0); };
151  DimStampedInfo(const char *name, longlong nolink)
152  { subscribe((char *)name, 0, &nolink, sizeof(longlong), 0); };
153  DimStampedInfo(const char *name, int time, longlong nolink)
154  { subscribe((char *)name, time, &nolink, sizeof(longlong), 0); };
155  DimStampedInfo(const char *name, short nolink)
156  { subscribe((char *)name, 0, &nolink, sizeof(short), 0); };
157  DimStampedInfo(const char *name, int time, short nolink)
158  { subscribe((char *)name, time, &nolink, sizeof(short), 0); };
159  DimStampedInfo(const char *name, char *nolink)
160  { subscribe((char *)name, 0, nolink, (int)strlen(nolink)+1, 0); };
161  DimStampedInfo(const char *name, int time, char *nolink)
162  { subscribe((char *)name, time, nolink, (int)strlen(nolink)+1, 0); };
163  DimStampedInfo(const char *name, void *nolink, int nolinksize)
164  { subscribe((char *)name, 0, nolink, nolinksize, 0); };
165  DimStampedInfo(const char *name, int time, void *nolink, int nolinksize)
166  { subscribe((char *)name, time, nolink, nolinksize, 0); };
167 
168  DimStampedInfo(const char *name, int nolink, DimInfoHandler *handler)
169  { subscribe((char *)name, 0, &nolink, sizeof(int), handler); };
170  DimStampedInfo(const char *name, int time, int nolink, DimInfoHandler *handler)
171  { subscribe((char *)name, time, &nolink, sizeof(int), handler); };
172  DimStampedInfo(const char *name, float nolink, DimInfoHandler *handler)
173  { subscribe((char *)name, 0, &nolink, sizeof(float), handler); };
174  DimStampedInfo(const char *name, int time, float nolink, DimInfoHandler *handler)
175  { subscribe((char *)name, time, &nolink, sizeof(float), handler); };
176  DimStampedInfo(const char *name, double nolink, DimInfoHandler *handler)
177  { subscribe((char *)name, 0, &nolink, sizeof(double), handler); };
178  DimStampedInfo(const char *name, int time, double nolink, DimInfoHandler *handler)
179  { subscribe((char *)name, time, &nolink, sizeof(double), handler); };
180  DimStampedInfo(const char *name, longlong nolink, DimInfoHandler *handler)
181  { subscribe((char *)name, 0, &nolink, sizeof(longlong), handler); };
182  DimStampedInfo(const char *name, int time, longlong nolink, DimInfoHandler *handler)
183  { subscribe((char *)name, time, &nolink, sizeof(longlong), handler); };
184  DimStampedInfo(const char *name, short nolink, DimInfoHandler *handler)
185  { subscribe((char *)name, 0, &nolink, sizeof(short), handler); };
186  DimStampedInfo(const char *name, int time, short nolink, DimInfoHandler *handler)
187  { subscribe((char *)name, time, &nolink, sizeof(short), handler); };
188  DimStampedInfo(const char *name, char *nolink, DimInfoHandler *handler)
189  { subscribe((char *)name, 0, nolink, (int)strlen(nolink)+1, handler); };
190  DimStampedInfo(const char *name, int time, char *nolink, DimInfoHandler *handler)
191  { subscribe((char *)name, time, nolink, (int)strlen(nolink)+1, handler); };
192  DimStampedInfo(const char *name, void *nolink, int nolinksize, DimInfoHandler *handler)
193  { subscribe((char *)name, 0, nolink, nolinksize, handler); };
194  DimStampedInfo(const char *name, int time, void *nolink, int nolinksize, DimInfoHandler *handler)
195  { subscribe((char *)name, time, nolink, nolinksize, handler); };
196 
197  virtual ~DimStampedInfo();
198  void subscribe(char *name, void *nolink, int nolinksize, int time,
200  { subscribe((char *)name, time, nolink, nolinksize, handler); };
201 private :
202  void doIt();
203  void subscribe(char *name, int time, void *nolink, int nolinksize,
205 };
206 
208 
209 public :
211  DimUpdatedInfo(const char *name, int nolink)
212  { subscribe((char *)name, 0, &nolink, sizeof(int), 0); };
213  DimUpdatedInfo(const char *name, int time, int nolink)
214  { subscribe((char *)name, time, &nolink, sizeof(int), 0); };
215  DimUpdatedInfo(const char *name, float nolink)
216  { subscribe((char *)name, 0, &nolink, sizeof(float), 0); };
217  DimUpdatedInfo(const char *name, int time, float nolink)
218  { subscribe((char *)name, time, &nolink, sizeof(float), 0); };
219  DimUpdatedInfo(const char *name, double nolink)
220  { subscribe((char *)name, 0, &nolink, sizeof(double), 0); };
221  DimUpdatedInfo(const char *name, int time, double nolink)
222  { subscribe((char *)name, time, &nolink, sizeof(double), 0); };
223  DimUpdatedInfo(const char *name, longlong nolink)
224  { subscribe((char *)name, 0, &nolink, sizeof(longlong), 0); };
225  DimUpdatedInfo(const char *name, int time, longlong nolink)
226  { subscribe((char *)name, time, &nolink, sizeof(longlong), 0); };
227  DimUpdatedInfo(const char *name, short nolink)
228  { subscribe((char *)name, 0, &nolink, sizeof(short), 0); };
229  DimUpdatedInfo(const char *name, int time, short nolink)
230  { subscribe((char *)name, time, &nolink, sizeof(short), 0); };
231  DimUpdatedInfo(const char *name, char *nolink)
232  { subscribe((char *)name, 0, nolink, (int)strlen(nolink)+1, 0); };
233  DimUpdatedInfo(const char *name, int time, char *nolink)
234  { subscribe((char *)name, time, nolink, (int)strlen(nolink)+1, 0); };
235  DimUpdatedInfo(const char *name, void *nolink, int nolinksize)
236  { subscribe((char *)name, 0, nolink, nolinksize, 0); };
237  DimUpdatedInfo(const char *name, int time, void *nolink, int nolinksize)
238  { subscribe((char *)name, time, nolink, nolinksize, 0); };
239 
240  DimUpdatedInfo(const char *name, int nolink, DimInfoHandler *handler)
241  { subscribe((char *)name, 0, &nolink, sizeof(int), handler); };
242  DimUpdatedInfo(const char *name, int time, int nolink, DimInfoHandler *handler)
243  { subscribe((char *)name, time, &nolink, sizeof(int), handler); };
244  DimUpdatedInfo(const char *name, float nolink, DimInfoHandler *handler)
245  { subscribe((char *)name, 0, &nolink, sizeof(float), handler); };
246  DimUpdatedInfo(const char *name, int time, float nolink, DimInfoHandler *handler)
247  { subscribe((char *)name, time, &nolink, sizeof(float), handler); };
248  DimUpdatedInfo(const char *name, double nolink, DimInfoHandler *handler)
249  { subscribe((char *)name, 0, &nolink, sizeof(double), handler); };
250  DimUpdatedInfo(const char *name, int time, double nolink, DimInfoHandler *handler)
251  { subscribe((char *)name, time, &nolink, sizeof(double), handler); };
252  DimUpdatedInfo(const char *name, longlong nolink, DimInfoHandler *handler)
253  { subscribe((char *)name, 0, &nolink, sizeof(longlong), handler); };
254  DimUpdatedInfo(const char *name, int time, longlong nolink, DimInfoHandler *handler)
255  { subscribe((char *)name, time, &nolink, sizeof(longlong), handler); };
256  DimUpdatedInfo(const char *name, short nolink, DimInfoHandler *handler)
257  { subscribe((char *)name, 0, &nolink, sizeof(short), handler); };
258  DimUpdatedInfo(const char *name, int time, short nolink, DimInfoHandler *handler)
259  { subscribe((char *)name, time, &nolink, sizeof(short), handler); };
260  DimUpdatedInfo(const char *name, char *nolink, DimInfoHandler *handler)
261  { subscribe((char *)name, 0, nolink, (int)strlen(nolink)+1, handler); };
262  DimUpdatedInfo(const char *name, int time, char *nolink, DimInfoHandler *handler)
263  { subscribe((char *)name, time, nolink, (int)strlen(nolink)+1, handler); };
264  DimUpdatedInfo(const char *name, void *nolink, int nolinksize, DimInfoHandler *handler)
265  { subscribe((char *)name, 0, nolink, nolinksize, handler); };
266  DimUpdatedInfo(const char *name, int time, void *nolink, int nolinksize, DimInfoHandler *handler)
267  { subscribe((char *)name, time, nolink, nolinksize, handler); };
268 
269  virtual ~DimUpdatedInfo();
270  void subscribe(char *name, void *nolink, int nolinksize, int time,
272  { subscribe((char *)name, time, nolink, nolinksize, handler); };
273 
274 private :
275  void doIt();
276  void subscribe(char *name, int time, void *nolink, int nolinksize,
278 };
279 
281 public :
282 
283  int wakeUp;
284  int result;
285  int send(char *name, void *data, int datasize);
286  void sendNB(char *name, void *data, int datasize);
287  DimCmnd(){};
288 };
289 
291 
292 public :
293  void *itsData;
295  int itsSize;
296 // int itsTagId;
297  int wakeUp;
298 
300  subscribe((char *)0, 0, (void *)0, 0); };
301  DimCurrentInfo(const char *name, int nolink) {
302  subscribe((char *)name, 0, &nolink, sizeof(int)); };
303  DimCurrentInfo(const char *name, float nolink) {
304  subscribe((char *)name, 0, &nolink, sizeof(float)); };
305  DimCurrentInfo(const char *name, double nolink) {
306  subscribe((char *)name, 0, &nolink, sizeof(double)); };
307  DimCurrentInfo(const char *name, longlong nolink) {
308  subscribe((char *)name, 0, &nolink, sizeof(longlong)); };
309  DimCurrentInfo(const char *name, short nolink) {
310  subscribe((char *)name, 0, &nolink, sizeof(short)); };
311  DimCurrentInfo(const char *name, char *nolink) {
312  subscribe((char *)name, 0, nolink, (int)strlen(nolink)+1); };
313  DimCurrentInfo(const char *name, void *nolink, int nolinksize) {
314  subscribe((char *)name, 0, nolink, nolinksize); };
315  DimCurrentInfo(const char *name, int time, int nolink) {
316  subscribe((char *)name, time, &nolink, sizeof(int)); };
317  DimCurrentInfo(const char *name, int time, float nolink) {
318  subscribe((char *)name, time, &nolink, sizeof(float)); };
319  DimCurrentInfo(const char *name, int time, double nolink) {
320  subscribe((char *)name, time, &nolink, sizeof(double)); };
321  DimCurrentInfo(const char *name, int time, longlong nolink) {
322  subscribe((char *)name, time, &nolink, sizeof(longlong)); };
323  DimCurrentInfo(const char *name, int time, short nolink) {
324  subscribe((char *)name, time, &nolink, sizeof(short)); };
325  DimCurrentInfo(const char *name, int time, char *nolink) {
326  subscribe((char *)name, time, nolink, (int)strlen(nolink)+1); };
327  DimCurrentInfo(const char *name, int time, void *nolink, int nolinksize) {
328  subscribe((char *)name, time, nolink, nolinksize); };
329 
330 
331  virtual ~DimCurrentInfo();
332  char *getName() { return itsName; } ;
333  void *getData();
334  int getInt() { return *(int *)getData(); } ;
335  float getFloat() { return *(float *)getData(); } ;
336  double getDouble() { return *(double *)getData(); } ;
337  longlong getLonglong() { return *(longlong *)getData(); } ;
338  short getShort() { return *(short *)getData(); } ;
339  char *getString() { return (char *)getData(); } ;
340  int getSize() { getData(); return itsSize; } ;
341  void subscribe(char *name, void *nolink, int nolinksize, int time)
342  { subscribe((char *)name, time, nolink, nolinksize); };
343 
344 private :
345  char *itsName;
348  void subscribe(char *name, int time, void *nolink, int nolinksize);
349 };
350 
351 class DllExp DimRpcInfo : public DimTimer {
352 public :
353  int itsId;
354 // int itsTagId;
355  int itsInit;
356  void *itsData;
358  void *itsDataOut;
360  int itsSize;
361  int wakeUp;
367 
368  DimRpcInfo(const char *name, int nolink) {
369  subscribe((char *)name, 0, 0, &nolink, sizeof(int), 0); };
370  DimRpcInfo(const char *name, float nolink) {
371  subscribe((char *)name, 0, 0, &nolink, sizeof(float), 0); };
372  DimRpcInfo(const char *name, double nolink) {
373  subscribe((char *)name, 0, 0, &nolink, sizeof(double), 0); };
374  DimRpcInfo(const char *name, longlong nolink) {
375  subscribe((char *)name, 0, 0, &nolink, sizeof(longlong), 0); };
376  DimRpcInfo(const char *name, short nolink) {
377  subscribe((char *)name, 0, 0, &nolink, sizeof(short), 0); };
378  DimRpcInfo(const char *name, char *nolink) {
379  subscribe((char *)name, 0, 0, nolink, (int)strlen(nolink)+1, 0); };
380  DimRpcInfo(const char *name, void *nolink, int nolinksize) {
381  subscribe((char *)name, 0, 0, nolink, nolinksize, 0); };
382 
383  DimRpcInfo(const char *name, int time, int nolink) {
384  subscribe((char *)name, 0, 0, &nolink, sizeof(int), time); };
385  DimRpcInfo(const char *name, int time, float nolink) {
386  subscribe((char *)name, 0, 0, &nolink, sizeof(float), time); };
387  DimRpcInfo(const char *name, int time, double nolink) {
388  subscribe((char *)name, 0, 0, &nolink, sizeof(double), time); };
389  DimRpcInfo(const char *name, int time, longlong nolink) {
390  subscribe((char *)name, 0, 0, &nolink, sizeof(longlong), time); };
391  DimRpcInfo(const char *name, int time, short nolink) {
392  subscribe((char *)name, 0, 0, &nolink, sizeof(short), time); };
393  DimRpcInfo(const char *name, int time, char *nolink) {
394  subscribe((char *)name, 0, 0, nolink, (int)strlen(nolink)+1, time); };
395  DimRpcInfo(const char *name, int time, void *nolink, int nolinksize) {
396  subscribe((char *)name, 0, 0, nolink, nolinksize, time); };
397 
398  virtual void rpcInfoHandler();
399 
400  virtual ~DimRpcInfo();
401  int getId() {return itsId;};
402  void keepWaiting() {itsWaiting = 2;};
403  char *getName() { return itsName; } ;
404  void *getData();
405  int getInt() { return *(int *)getData(); } ;
406  float getFloat() { return *(float *)getData(); } ;
407  double getDouble() { return *(double *)getData(); } ;
408  longlong getLonglong() { return *(longlong *)getData(); } ;
409  short getShort() { return *(short *)getData(); } ;
410  char *getString() { return (char *)getData(); } ;
411  int getSize() { getData(); return itsSize; } ;
412 
413  void setData(void *data, int size) { doIt(data, size); };
414  void setData(int &data) { doIt(&data, sizeof(int)); } ;
415  void setData(float &data) { doIt(&data, sizeof(float)); } ;
416  void setData(double &data) { doIt(&data, sizeof(double)); } ;
417  void setData(longlong &data) { doIt(&data, sizeof(longlong)); } ;
418  void setData(short &data) { doIt(&data, sizeof(short)); } ;
419  void setData(char *data) { doIt(data, (int)strlen(data)+1); } ;
420 
421 private :
422  char *itsName;
423  char *itsNameIn;
424  char *itsNameOut;
426  void subscribe(char *name, void *data, int size,
427  void *nolink, int nolinksize, int timeout);
428  void doIt(void *data, int size);
429  void timerHandler();
430 };
431 
433 {
434 public:
435 
436  static char *dimDnsNode;
438 
439  DimClient();
440  virtual ~DimClient();
441  static int sendCommand(const char *name, int data);
442  static int sendCommand(const char *name, float data);
443  static int sendCommand(const char *name, double data);
444  static int sendCommand(const char *name, longlong data);
445  static int sendCommand(const char *name, short data);
446  static int sendCommand(const char *name, const char *data);
447  static int sendCommand(const char *name, void *data, int datasize);
448  static void sendCommandNB(const char *name, int data);
449  static void sendCommandNB(const char *name, float data);
450  static void sendCommandNB(const char *name, double data);
451  static void sendCommandNB(const char *name, longlong data);
452  static void sendCommandNB(const char *name, short data);
453  static void sendCommandNB(const char *name, char *data);
454  static void sendCommandNB(const char *name, void *data, int datasize);
455  static int setExitHandler(const char *serverName);
456  static int killServer(const char *serverName);
457  static int setDnsNode(const char *node);
458  static int setDnsNode(const char *node, int port);
459  static char *getDnsNode();
460  static int getDnsPort();
461  static void addErrorHandler(DimErrorHandler *handler);
462  void addErrorHandler();
463  virtual void errorHandler(int /* severity */, int /* code */, char* /* msg */) {};
464  static char *serverName;
465  // Get Current Server Identifier
466  static int getServerId();
467  // Get Current Server Process Identifier
468  static int getServerPid();
469  // Get Current Server Name
470  static char *getServerName();
471  static char **getServerServices();
472 // static char *getServerServices(int serverId);
473 
474  virtual void infoHandler() {};
475 
476  static int dicNoCopy;
477  static void setNoDataCopy();
478  static int getNoDataCopy();
479  static int inCallback();
480 };
481 
483 {
484 public :
485 
486  DimBrowser();
487 
488  ~DimBrowser();
489 
490  int getServices(const char *serviceName);
491  int getServers();
492  int getServerServices(const char *serverName);
493  int getServerClients(const char *serverName);
494  int getServices(const char *serviceName, int timeout);
495  int getServers(int timeout);
496  int getServerServices(const char *serverName, int timeout);
497  int getServerClients(const char *serverName, int timeout);
498  int getNextService(char *&service, char *&format);
499  int getNextServer(char *&server, char *&node);
500  int getNextServer(char *&server, char *&node, int &pid);
501  int getNextServerService(char *&service, char *&format);
502  int getNextServerClient(char *&client, char *&node);
503 
504 private:
505 
506  TokenString *itsData[5];
507  int currIndex;
508  char *currToken;
509  char none;
511 };
512 
513 #endif
char * getString()
Definition: dic.hxx:108
DimUpdatedInfo()
Definition: dic.hxx:210
DimInfo(const char *name, int time, void *nolink, int nolinksize, DimInfoHandler *handler)
Definition: dic.hxx:93
longlong getLonglong()
Definition: dic.hxx:408
DimInfo(const char *name, short nolink, DimInfoHandler *handler)
Definition: dic.hxx:83
Definition: dns.c:26
DimStampedInfo(const char *name, double nolink, DimInfoHandler *handler)
Definition: dic.hxx:176
DimInfo(const char *name, char *nolink, DimInfoHandler *handler)
Definition: dic.hxx:87
DimRpcInfo(const char *name, char *nolink)
Definition: dic.hxx:378
DimRpcInfo * browserRpc
Definition: dic.hxx:510
int getSize()
Definition: dic.hxx:340
DimCurrentInfo(const char *name, int time, char *nolink)
Definition: dic.hxx:325
void setData(char *data)
Definition: dic.hxx:419
int wakeUp
Definition: dic.hxx:297
DimStampedInfo(const char *name, int time, short nolink)
Definition: dic.hxx:157
DimStampedInfo()
Definition: dic.hxx:138
DimInfo(const char *name, int time, double nolink, DimInfoHandler *handler)
Definition: dic.hxx:77
DimCurrentInfo(const char *name, int time, void *nolink, int nolinksize)
Definition: dic.hxx:327
DimRpcInfo(const char *name, float nolink)
Definition: dic.hxx:370
int getId()
Definition: dic.hxx:401
DimStampedInfo(const char *name, char *nolink)
Definition: dic.hxx:159
DimUpdatedInfo(const char *name, int nolink)
Definition: dic.hxx:211
void subscribe(char *name, void *nolink, int nolinksize, int time)
Definition: dic.hxx:341
DimUpdatedInfo(const char *name, char *nolink)
Definition: dic.hxx:231
int itsTimeout
Definition: dic.hxx:425
virtual void infoHandler()=0
DimUpdatedInfo(const char *name, int time, void *nolink, int nolinksize)
Definition: dic.hxx:237
DimStampedInfo(const char *name, int time, char *nolink)
Definition: dic.hxx:161
Definition: dic.hxx:280
void setData(int &data)
Definition: dic.hxx:414
int getInt()
Definition: dic.hxx:103
DimInfo(const char *name, int time, int nolink)
Definition: dic.hxx:40
DimUpdatedInfo(const char *name, short nolink)
Definition: dic.hxx:227
DimUpdatedInfo(const char *name, float nolink)
Definition: dic.hxx:215
DimUpdatedInfo(const char *name, int time, double nolink, DimInfoHandler *handler)
Definition: dic.hxx:250
static char * serverName
Definition: dic.hxx:463
virtual void timerHandler()
Definition: dim.hxx:32
int itsDataOutSize
Definition: dic.hxx:359
void * itsNolinkBuf
Definition: dic.hxx:346
DimInfo(const char *name, int time, float nolink, DimInfoHandler *handler)
Definition: dic.hxx:73
void subscribe(char *name, void *nolink, int nolinksize, int time, DimInfoHandler *handler)
Definition: dic.hxx:119
int itsSize
Definition: dic.hxx:99
static DimErrorHandler * itsCltError
Definition: dic.hxx:437
short getShort()
Definition: dic.hxx:107
char none
Definition: dic.hxx:509
DimUpdatedInfo(const char *name, int time, longlong nolink, DimInfoHandler *handler)
Definition: dic.hxx:254
void * itsNolinkBuf
Definition: dic.hxx:364
virtual void doIt()
Definition: diccpp.cxx:89
DimStampedInfo(const char *name, void *nolink, int nolinksize, DimInfoHandler *handler)
Definition: dic.hxx:192
DimRpcInfo(const char *name, int time, void *nolink, int nolinksize)
Definition: dic.hxx:395
DimStampedInfo(const char *name, float nolink, DimInfoHandler *handler)
Definition: dic.hxx:172
Definition: dic.hxx:31
void setData(float &data)
Definition: dic.hxx:415
double getDouble()
Definition: dic.hxx:407
int itsId
Definition: dic.hxx:125
DimStampedInfo(const char *name, void *nolink, int nolinksize)
Definition: dic.hxx:163
void * itsData
Definition: dic.hxx:97
DimInfo(const char *name, void *nolink, int nolinksize)
Definition: dic.hxx:62
DimInfo(const char *name, char *nolink)
Definition: dic.hxx:58
DimCurrentInfo(const char *name, int time, short nolink)
Definition: dic.hxx:323
DimUpdatedInfo(const char *name, int time, void *nolink, int nolinksize, DimInfoHandler *handler)
Definition: dic.hxx:266
DimStampedInfo(const char *name, longlong nolink, DimInfoHandler *handler)
Definition: dic.hxx:180
DimInfo(const char *name, longlong nolink, DimInfoHandler *handler)
Definition: dic.hxx:79
DimInfo(const char *name, double nolink, DimInfoHandler *handler)
Definition: dic.hxx:75
virtual void infoHandler()
Definition: dic.hxx:474
int result
Definition: dic.hxx:284
DimInfo()
Definition: dic.hxx:36
int wakeUp
Definition: dic.hxx:283
DimInfo(const char *name, double nolink)
Definition: dic.hxx:46
DimCurrentInfo(const char *name, int time, int nolink)
Definition: dic.hxx:315
DimInfo(const char *name, int nolink)
Definition: dic.hxx:38
DimUpdatedInfo(const char *name, short nolink, DimInfoHandler *handler)
Definition: dic.hxx:256
DimUpdatedInfo(const char *name, void *nolink, int nolinksize, DimInfoHandler *handler)
Definition: dic.hxx:264
DimUpdatedInfo(const char *name, void *nolink, int nolinksize)
Definition: dic.hxx:235
int itsId
Definition: dic.hxx:353
DimRpcInfo(const char *name, int time, short nolink)
Definition: dic.hxx:391
int getSize()
Definition: dic.hxx:100
char * getName()
Definition: dic.hxx:403
DimRpcInfo(const char *name, int time, int nolink)
Definition: dic.hxx:383
DimCurrentInfo(const char *name, int time, longlong nolink)
Definition: dic.hxx:321
char * currToken
Definition: dic.hxx:508
DimUpdatedInfo(const char *name, int time, float nolink, DimInfoHandler *handler)
Definition: dic.hxx:246
DimInfo(const char *name, int nolink, DimInfoHandler *handler)
Definition: dic.hxx:67
DimInfo(const char *name, int time, char *nolink)
Definition: dic.hxx:60
DimUpdatedInfo(const char *name, int time, char *nolink, DimInfoHandler *handler)
Definition: dic.hxx:262
void * itsData
Definition: dic.hxx:356
DimStampedInfo(const char *name, short nolink, DimInfoHandler *handler)
Definition: dic.hxx:184
float getFloat()
Definition: dic.hxx:104
char * itsName
Definition: dic.hxx:342
DimCurrentInfo(const char *name, void *nolink, int nolinksize)
Definition: dic.hxx:313
DimRpcInfo(const char *name, longlong nolink)
Definition: dic.hxx:374
DimUpdatedInfo(const char *name, int time, longlong nolink)
Definition: dic.hxx:225
#define DllExp
Definition: dim_common.h:93
DimRpcInfo(const char *name, double nolink)
Definition: dic.hxx:372
DimCurrentInfo(const char *name, int nolink)
Definition: dic.hxx:301
char * itsNameOut
Definition: dic.hxx:424
DimUpdatedInfo(const char *name, int time, float nolink)
Definition: dic.hxx:217
char * itsName
Definition: dic.hxx:121
DimUpdatedInfo(const char *name, int time, char *nolink)
Definition: dic.hxx:233
virtual ~DimInfoHandler()
Definition: dic.hxx:28
DimInfo(const char *name, int time, longlong nolink)
Definition: dic.hxx:52
void * itsNolinkBuf
Definition: dic.hxx:130
char * getString()
Definition: dic.hxx:410
DimUpdatedInfo(const char *name, int time, int nolink)
Definition: dic.hxx:213
void subscribe(char *name, void *nolink, int nolinksize, int time, DimInfoHandler *handler)
Definition: dic.hxx:270
DimInfo(const char *name, int time, short nolink)
Definition: dic.hxx:56
DimStampedInfo(const char *name, short nolink)
Definition: dic.hxx:155
DimUpdatedInfo(const char *name, char *nolink, DimInfoHandler *handler)
Definition: dic.hxx:260
int itsDataSize
Definition: dic.hxx:357
char * itsFormat
Definition: dic.hxx:129
DimInfo(const char *name, int time, void *nolink, int nolinksize)
Definition: dic.hxx:64
DimStampedInfo(const char *name, int time, short nolink, DimInfoHandler *handler)
Definition: dic.hxx:186
DimStampedInfo(const char *name, int time, double nolink, DimInfoHandler *handler)
Definition: dic.hxx:178
DimStampedInfo(const char *name, double nolink)
Definition: dic.hxx:147
DimUpdatedInfo(const char *name, longlong nolink)
Definition: dic.hxx:223
DimInfo(const char *name, int time, longlong nolink, DimInfoHandler *handler)
Definition: dic.hxx:81
DimRpcInfo(const char *name, void *nolink, int nolinksize)
Definition: dic.hxx:380
int itsDataSize
Definition: dic.hxx:294
DimRpcInfo * itsHandler
Definition: dic.hxx:366
DimInfo(const char *name, void *nolink, int nolinksize, DimInfoHandler *handler)
Definition: dic.hxx:91
Definition: dic.hxx:16
DimInfo(const char *name, int time, short nolink, DimInfoHandler *handler)
Definition: dic.hxx:85
DimUpdatedInfo(const char *name, int time, int nolink, DimInfoHandler *handler)
Definition: dic.hxx:242
int itsSize
Definition: dic.hxx:295
virtual void errorHandler(int severity, int code, char *msg)=0
void setData(longlong &data)
Definition: dic.hxx:417
int getInt()
Definition: dic.hxx:405
DimCurrentInfo(const char *name, char *nolink)
Definition: dic.hxx:311
DimStampedInfo(const char *name, longlong nolink)
Definition: dic.hxx:151
void keepWaiting()
Definition: dic.hxx:402
DimRpcInfo(const char *name, int time, float nolink)
Definition: dic.hxx:385
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
float getFloat()
Definition: dic.hxx:335
int itsNolinkSize
Definition: dic.hxx:365
double getDouble()
Definition: dic.hxx:336
DimCurrentInfo(const char *name, int time, float nolink)
Definition: dic.hxx:317
DimRpcInfo(const char *name, int time, double nolink)
Definition: dic.hxx:387
longlong getLonglong()
Definition: dic.hxx:106
DimStampedInfo(const char *name, int nolink)
Definition: dic.hxx:139
DimUpdatedInfo(const char *name, longlong nolink, DimInfoHandler *handler)
Definition: dic.hxx:252
DimInfo * itsService
Definition: dic.hxx:25
DimInfo(const char *name, float nolink, DimInfoHandler *handler)
Definition: dic.hxx:71
float getFloat()
Definition: dic.hxx:406
DimCurrentInfo(const char *name, float nolink)
Definition: dic.hxx:303
DimInfo(const char *name, int time, int nolink, DimInfoHandler *handler)
Definition: dic.hxx:69
static char * serverName
Definition: feeserver.c:183
DimStampedInfo(const char *name, int time, longlong nolink)
Definition: dic.hxx:153
int size
Definition: db_dim_server.c:17
void * itsData
Definition: dic.hxx:293
float data[4 *1440]
DimRpcInfo(const char *name, int time, longlong nolink)
Definition: dic.hxx:389
DimUpdatedInfo(const char *name, double nolink, DimInfoHandler *handler)
Definition: dic.hxx:248
DimInfo(const char *name, int time, float nolink)
Definition: dic.hxx:44
DimStampedInfo(const char *name, int time, int nolink)
Definition: dic.hxx:141
DimCmnd()
Definition: dic.hxx:287
int getInt()
Definition: dic.hxx:334
void setData(double &data)
Definition: dic.hxx:416
virtual void subscribe(char *name, int time, void *nolink, int nolinksize, DimInfoHandler *handler)
Definition: diccpp.cxx:152
DimInfo(const char *name, int time, char *nolink, DimInfoHandler *handler)
Definition: dic.hxx:89
DimUpdatedInfo(const char *name, int time, short nolink)
Definition: dic.hxx:229
void setData(void *data, int size)
Definition: dic.hxx:413
int64_t longlong
Definition: dim_common.h:56
longlong getLonglong()
Definition: dic.hxx:337
DimStampedInfo(const char *name, int time, float nolink)
Definition: dic.hxx:145
short getShort()
Definition: dic.hxx:338
DimStampedInfo(const char *name, int time, void *nolink, int nolinksize, DimInfoHandler *handler)
Definition: dic.hxx:194
DimCurrentInfo(const char *name, double nolink)
Definition: dic.hxx:305
DimInfo(const char *name, longlong nolink)
Definition: dic.hxx:50
static void handler(int conn_id, char *packet, int size, int status)
Definition: webServer.c:635
DimCurrentInfo(const char *name, longlong nolink)
Definition: dic.hxx:307
char * itsNameIn
Definition: dic.hxx:423
DimStampedInfo(const char *name, int time, char *nolink, DimInfoHandler *handler)
Definition: dic.hxx:190
int wakeUp
Definition: dic.hxx:361
DimUpdatedInfo(const char *name, double nolink)
Definition: dic.hxx:219
DimStampedInfo(const char *name, int time, int nolink, DimInfoHandler *handler)
Definition: dic.hxx:170
DimRpcInfo(const char *name, int nolink)
Definition: dic.hxx:368
DimStampedInfo(const char *name, int time, void *nolink, int nolinksize)
Definition: dic.hxx:165
DimServiceType
Definition: dic.hxx:16
int itsType
Definition: dic.hxx:127
DimUpdatedInfo(const char *name, int time, short nolink, DimInfoHandler *handler)
Definition: dic.hxx:258
DimInfo * getInfo()
Definition: dic.hxx:26
int itsNolinkSize
Definition: dic.hxx:131
void * itsDataOut
Definition: dic.hxx:358
int itsConnected
Definition: dic.hxx:363
DimCurrentInfo(const char *name, short nolink)
Definition: dic.hxx:309
char * getName()
Definition: dic.hxx:332
DimInfo(const char *name, short nolink)
Definition: dic.hxx:54
DimStampedInfo(const char *name, float nolink)
Definition: dic.hxx:143
DimUpdatedInfo(const char *name, float nolink, DimInfoHandler *handler)
Definition: dic.hxx:244
DimInfo(const char *name, float nolink)
Definition: dic.hxx:42
void setData(short &data)
Definition: dic.hxx:418
DimUpdatedInfo(const char *name, int time, double nolink)
Definition: dic.hxx:221
int itsDataSize
Definition: dic.hxx:98
int currIndex
Definition: dic.hxx:507
short getShort()
Definition: dic.hxx:409
int secs
Definition: dic.hxx:132
DimUpdatedInfo(const char *name, int nolink, DimInfoHandler *handler)
Definition: dic.hxx:240
static char * dimDnsNode
Definition: dic.hxx:436
void subscribe(char *name, void *nolink, int nolinksize, int time, DimInfoHandler *handler)
Definition: dic.hxx:198
double getDouble()
Definition: dic.hxx:105
int itsInit
Definition: dic.hxx:355
DimCurrentInfo(const char *name, int time, double nolink)
Definition: dic.hxx:319
int itsSize
Definition: dic.hxx:360
DimRpcInfo(const char *name, int time, char *nolink)
Definition: dic.hxx:393
int itsNolinkSize
Definition: dic.hxx:347
char * getString()
Definition: dic.hxx:339
DimCurrentInfo()
Definition: dic.hxx:299
DimStampedInfo(const char *name, char *nolink, DimInfoHandler *handler)
Definition: dic.hxx:188
int itsWaiting
Definition: dic.hxx:362
int getSize()
Definition: dic.hxx:411
Definition: dim.hxx:20
DimInfo(const char *name, int time, double nolink)
Definition: dic.hxx:48
DimStampedInfo(const char *name, int nolink, DimInfoHandler *handler)
Definition: dic.hxx:168
DimStampedInfo(const char *name, int time, float nolink, DimInfoHandler *handler)
Definition: dic.hxx:174
DimStampedInfo(const char *name, int time, double nolink)
Definition: dic.hxx:149
DimStampedInfo(const char *name, int time, longlong nolink, DimInfoHandler *handler)
Definition: dic.hxx:182
DimRpcInfo(const char *name, short nolink)
Definition: dic.hxx:376
int itsTime
Definition: dic.hxx:126
char * getName()
Definition: dic.hxx:101