roo_monitoring
API Documentation for roo_monitoring
Loading...
Searching...
No Matches
sample.h
Go to the documentation of this file.
1#pragma once
2
3namespace roo_monitoring {
4
5/// Represents a single data sample stored in a vault file.
6class Sample {
7 public:
8 /// Creates a sample with aggregated values.
9 Sample(uint64_t stream_id, uint16_t avg_value, uint16_t min_value,
10 uint16_t max_value, uint16_t fill)
11 : stream_id_(stream_id),
12 avg_value_(avg_value),
13 min_value_(min_value),
14 max_value_(max_value),
15 fill_(fill) {}
16
17 /// Returns the stream identifier.
18 uint64_t stream_id() const { return stream_id_; }
19 /// Returns the average value for the bucket.
20 uint16_t avg_value() const { return avg_value_; }
21 /// Returns the minimum value for the bucket.
22 uint16_t min_value() const { return min_value_; }
23 /// Returns the maximum value for the bucket.
24 uint16_t max_value() const { return max_value_; }
25 /// Returns the fill value (0x2000 == 100%).
26 uint16_t fill() const { return fill_; }
27
28 private:
29 uint64_t stream_id_;
30 uint16_t avg_value_;
31 uint16_t min_value_;
32 uint16_t max_value_;
33 uint16_t fill_; // 0x2000 = 100%.
34};
35
36} // namespace roo_monitoring
Represents a single data sample stored in a vault file.
Definition sample.h:6
uint16_t min_value() const
Returns the minimum value for the bucket.
Definition sample.h:22
Sample(uint64_t stream_id, uint16_t avg_value, uint16_t min_value, uint16_t max_value, uint16_t fill)
Creates a sample with aggregated values.
Definition sample.h:9
uint16_t avg_value() const
Returns the average value for the bucket.
Definition sample.h:20
uint16_t max_value() const
Returns the maximum value for the bucket.
Definition sample.h:24
uint16_t fill() const
Returns the fill value (0x2000 == 100%).
Definition sample.h:26
uint64_t stream_id() const
Returns the stream identifier.
Definition sample.h:18
Umbrella header for the roo_monitoring module.