2 * FCP report generators
4 * Class for reading messages into frames.
6 * Copyright IBM Corp. 2008
7 * Author(s): Stefan Raspl <raspl@linux.vnet.ibm.com>
15 #include "ziorep_filters.hpp"
16 #include "ziorep_frameset.hpp"
23 #include "ziomon_dacc.h"
30 * Note: Filter parameters transfer memory ownership to class.
31 * 'filter_types' is an optional list of message types that should
32 * be processed exclusively, anything else will be ignored. If not set,
33 * all messages will be processed.
35 Framer(__u64 begin
, __u64 end
, __u32 interval_length
,
36 list
<MsgTypes
> *filter_types
, DeviceFilter
*devFilter
,
37 const char *filename
, int *rc
);
42 * Retrieve the next set of messages.
43 * Returns 0 in case of success, <0 in case of failure
44 * and >0 in case end of data has been reached.
45 * Set 'replace_missing' to fill in for non-present datasets.
46 * E.g. if no utilization data was found in the interval (since there
47 * was no traffic), a dataset with the expected number of samples
48 * (but all 0s for the values) will be generated.
50 int get_next_frameset(Frameset
&frameset
, bool replace_missing
= false);
53 void handle_msg(struct message
*msg
, Frameset
&frameset
) const;
54 bool handle_agg_data(Frameset
&frameset
) const;
56 /* timestamps of samples to consider
57 * These are exact timestamps, we shift them a bit to make sure that
58 * we catch any late or early messages as well */
61 /// user-specified interval length
62 __u32 m_interval_length
;
64 /* Criteria to identify the right messages */
65 MsgTypeFilter
*m_type_filter
;
66 DeviceFilter
*m_device_filter
;
68 // filename without extension
69 const char *m_filename
;
71 struct file_header m_fhdr
;
72 struct aggr_data
*m_agg_data
;
73 /// indicates whether the .agg file was already read or not