8 #ifndef COFMETERBANDSTATSARRAY_H_
9 #define COFMETERBANDSTATSARRAY_H_
15 #include "rofl/common/openflow/openflow_rofl_exceptions.h"
16 #include "rofl/common/openflow/openflow.h"
17 #include "rofl/common/openflow/cofmeterbandstats.h"
18 #include "rofl/common/logging.h"
30 uint8_t of_version = rofl::openflow::OFP_VERSION_UNKNOWN);
69 set_version(uint8_t of_version) {
70 this->of_version = of_version;
71 for (std::map<unsigned int, cofmeter_band_stats>::iterator
72 it = array.begin(); it != array.end(); ++it) {
73 it->second.set_version(of_version);
81 get_version()
const {
return of_version; };
86 std::map<unsigned int, cofmeter_band_stats>&
87 set_mbs_array() {
return array; };
92 const std::map<unsigned int, cofmeter_band_stats>&
93 get_mbs_array()
const {
return array; };
99 add_mbstats(
unsigned int index = 0);
105 set_mbstats(
unsigned int index = 0);
111 drop_mbstats(
unsigned int index = 0);
117 get_mbstats(
unsigned int index = 0)
const;
123 has_mbstats(
unsigned int index = 0)
const;
137 pack(uint8_t* buf,
size_t buflen);
143 unpack(uint8_t* buf,
size_t buflen);
149 os <<
rofl::indent(0) <<
"<cofmeter_band_stats_array #stats: "
150 << array.get_mbs_array().size() <<
" >" << std::endl;
152 for (std::map<unsigned int, cofmeter_band_stats>::const_iterator
153 it = array.get_mbs_array().begin(); it != array.get_mbs_array().end(); ++it) {
162 std::map<unsigned int, cofmeter_band_stats> array;
Definition: cofmeterbandstatsarray.h:23
Definition: cofmeterbandstats.h:24