Source
27
27
zbx_timespec_t ts;
28
28
}
29
29
zbx_pp_step_history_t;
30
30
31
31
ZBX_VECTOR_DECL(pp_step_history, zbx_pp_step_history_t)
32
32
33
33
/* item preprocessing history for preprocessing steps using previous values */
34
34
typedef struct
35
35
{
36
36
zbx_vector_pp_step_history_t step_history;
37
+
unsigned int refcount;
37
38
}
38
39
zbx_pp_history_t;
39
40
40
41
zbx_pp_history_t *zbx_pp_history_create(int history_num);
41
42
void zbx_pp_history_init(zbx_pp_history_t *history);
42
43
void zbx_pp_history_clear(zbx_pp_history_t *history);
43
44
void zbx_pp_history_free(zbx_pp_history_t *history);
44
45
void zbx_pp_history_reserve(zbx_pp_history_t *history, int history_num);
45
46
void zbx_pp_history_add(zbx_pp_history_t *history, int index, zbx_variant_t *value, zbx_timespec_t ts);
46
47
void zbx_pp_history_pop(zbx_pp_history_t *history, int index, zbx_variant_t *value, zbx_timespec_t *ts);
48
+
zbx_pp_history_t *zbx_pp_history_clone(zbx_pp_history_t *history);
47
49
48
50
typedef enum
49
51
{
50
52
ZBX_PP_PROCESS_PARALLEL,
51
53
ZBX_PP_PROCESS_SERIAL
52
54
}
53
55
zbx_pp_process_mode_t;
54
56
55
57
typedef struct
56
58
{
66
68
ZBX_PTR_VECTOR_DECL(pp_step_ptr, zbx_pp_step_t *)
67
69
68
70
typedef struct
69
71
{
70
72
zbx_uint32_t refcount;
71
73
72
74
zbx_uint64_t hostid;
73
75
int steps_num;
74
76
zbx_pp_step_t *steps;
75
77
78
+
zbx_uint64_t pp_revision;
79
+
76
80
int dep_itemids_num;
77
81
zbx_uint64_t *dep_itemids;
78
82
79
83
unsigned char type;
80
84
unsigned char value_type;
81
85
unsigned char flags;
82
86
zbx_pp_process_mode_t mode;
83
87
84
88
zbx_pp_history_t *history; /* the preprocessing history */
85
89
int history_num; /* the number of preprocessing steps requiring history */