source: Evidence/Evidence.h@ 142

Last change on this file since 142 was 142, checked in by ogrimm, 12 years ago
Various updates
File size: 1.1 KB
Line 
1#ifndef EVIDENCE_H_SEEN
2#define EVIDENCE_H_SEEN
3
4#include <stdio.h>
5#include <stdarg.h>
6#include <errno.h>
7
8#include "dis.hxx"
9#include "dic.hxx"
10
11#define NO_LINK (char *) "__&DIM&NOLINK&__" // Data if no link available
12#define STATUS_SIZE 1000 // Bytes for status service string
13
14// Declaration of item for history buffer (see DColl.cc)
15struct EvidenceHistoryItem {
16 int Seconds;
17 double Value;
18} __attribute__((__packed__));
19
20// Class declation of Evidence server
21class EvidenceServer: public DimServer {
22
23 private:
24 struct ConfigItem {
25 char *Name;
26 char *Value;
27 int Time;
28 } *ConfigList;
29 unsigned int ConfigNum;
30
31 char *StatusName;
32 DimService *Status;
33
34 static void SignalHandler(int); // static needed for signal() function
35 void errorHandler(int, int, char *);
36 void exitHandler(int);
37
38 public:
39 EvidenceServer(const char *);
40 ~EvidenceServer();
41
42 enum StateType {INFO=0, WARN=1, ERROR=2, FATAL=3};
43
44 void State(StateType, const char *, ...);
45
46 char* GetConfig(const char *);
47 static char *ToString(DimInfo *);
48 static int MakeString(char **Pointer, const char *Format, ...);
49
50 static bool ExitRequest;
51};
52
53#endif
Note: See TracBrowser for help on using the repository browser.