source: Evidence/Evidence.h@ 133

Last change on this file since 133 was 127, checked in by ogrimm, 15 years ago
First commit of Evidence control system core components
File size: 931 bytes
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
12// Declaration of item for history buffer (see DColl.cc)
13struct EvidenceHistoryItem {
14 int Seconds;
15 double Value;
16} __attribute__((__packed__));
17
18// Class declation of Evidence server
19class EvidenceServer: public DimExitHandler, public DimErrorHandler {
20
21 private:
22 char *ServerName;
23 char *MsgBuffer;
24 void *ConfigList;
25 unsigned int ConfigNum;
26 DimService *Status;
27
28 static void SignalHandler(int); // static needed for signal() function
29 void errorHandler(int, int, char *);
30 void exitHandler(int);
31
32 public:
33 EvidenceServer(const char *);
34 ~EvidenceServer();
35
36 enum MsgType {INFO=0, WARN=1, ERROR=2, FATAL=3};
37
38 void Msg(MsgType, const char *, ...);
39 char* GetConfig(const char *);
40 static char *ToString(DimInfo *);
41
42 static bool ExitRequest;
43};
44
45#endif
Note: See TracBrowser for help on using the repository browser.