8 #ifndef COFMETERSTATSARRAY_H_
9 #define COFMETERSTATSARRAY_H_
14 #include "rofl/common/openflow/cofmeterstats.h"
27 uint8_t ofp_version = OFP_VERSION_UNKNOWN);
74 pack(uint8_t *buf = (uint8_t*)0,
size_t buflen = 0);
80 unpack(uint8_t *buf,
size_t buflen);
88 size()
const {
return array.size(); };
94 clear() { array.clear(); };
100 get_version()
const {
return ofp_version; };
106 set_version(uint8_t ofp_version) {
107 this->ofp_version = ofp_version;
108 for (std::map<unsigned int, cofmeter_stats_reply>::iterator
109 it = array.begin(); it != array.end(); ++it) {
110 it->second.set_version(ofp_version);
117 const std::map<unsigned int, cofmeter_stats_reply>&
118 get_mstats()
const {
return array; };
123 std::map<unsigned int, cofmeter_stats_reply>&
124 set_mstats() {
return array; };
133 unsigned int index = 0);
140 unsigned int index = 0);
147 unsigned int index = 0);
154 unsigned int index = 0)
const;
161 unsigned int index = 0)
const;
167 os <<
rofl::indent(0) <<
"<cofmeterstatsarray #meter-stats:" << (int)mstats.array.size() <<
" >" << std::endl;
169 for (std::map<unsigned int, cofmeter_stats_reply>::const_iterator
170 it = mstats.array.begin(); it != mstats.array.end(); ++it) {
179 std::map<unsigned int, cofmeter_stats_reply> array;
Definition: cofmeterstats.h:136
Definition: cofmeterstatsarray.h:19
virtual size_t length() const
Definition: cofmeterstatsarray.cc:95