Introduce the DERIVE and ABSOLUTE data source types.
[collectd.git] / src / plugin.h
index e54b27d..fd74150 100644 (file)
 
 #include "collectd.h"
 #include "configfile.h"
+#include "meta_data.h"
 
 #define DATA_MAX_NAME_LEN 64
 
 #define DS_TYPE_COUNTER 0
 #define DS_TYPE_GAUGE   1
+#define DS_TYPE_DERIVE   2
+#define DS_TYPE_ABSOLUTE   3
 
 #ifndef LOG_ERR
 # define LOG_ERR 3
  */
 typedef unsigned long long counter_t;
 typedef double gauge_t;
+typedef unsigned long long derive_t;
+typedef unsigned long long absolute_t;
 
 union value_u
 {
        counter_t counter;
        gauge_t   gauge;
+       derive_t   derive;
+       absolute_t   absolute;
 };
 typedef union value_u value_t;
 
@@ -76,11 +83,12 @@ struct value_list_s
        char     plugin_instance[DATA_MAX_NAME_LEN];
        char     type[DATA_MAX_NAME_LEN];
        char     type_instance[DATA_MAX_NAME_LEN];
+       meta_data_t *meta;
 };
 typedef struct value_list_s value_list_t;
 
-#define VALUE_LIST_INIT { NULL, 0, 0, interval_g, "localhost", "", "", "", "" }
-#define VALUE_LIST_STATIC { NULL, 0, 0, 0, "localhost", "", "", "", "" }
+#define VALUE_LIST_INIT { NULL, 0, 0, interval_g, "localhost", "", "", "", "", NULL }
+#define VALUE_LIST_STATIC { NULL, 0, 0, 0, "localhost", "", "", "", "", NULL }
 
 struct data_source_s
 {