-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmonitor.h
More file actions
59 lines (42 loc) · 1.31 KB
/
Copy pathmonitor.h
File metadata and controls
59 lines (42 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include "oodict.h"
struct Monitor
{
/* zmq vars */
void *context;
/* REQ connection with topic_storage */
void *topic_storage;
char *topic_storage_endpoint;
/* PUSH connection with universal agents */
void *ventilator;
char *ventilator_endpoint;
/* PULL connection with clock */
void *clock;
char *clock_endpoint;
/* PUSH connections with experts */
void **experts;
char **experts_endpoints;
char *rg_ru_endpoint; /* tmp */
size_t experts_num;
/* PULL connection with agents and experts */
void *sink;
char *sink_endpoint;
struct Resource **resources;
size_t resources_number;
/** interface methods **/
/* clock thread */
void *(*clock_forever)(void *monitor);
/* sink thread */
void *(*sink_forever)(void *monitor);
/* main method that starts service */
int (*serve_forever)(struct Monitor *self);
/* takes xml-request. handles it. ans makes xml-reply */
int (*request_handler)(struct Monitor *self,
const char *request,
char **response);
int (*init)(struct Monitor *selfi);
/* destructor */
int (*del)(struct Monitor *self);
int (*str)(struct Monitor *self);
};
/* constructor */
extern int Monitor_new(struct Monitor **monitor);