8 #ifndef COFMETERCONFIGARRAY_H_
9 #define COFMETERCONFIGARRAY_H_
14 #include "rofl/common/openflow/cofmeterconfig.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_config_reply>::iterator
109 it = array.begin(); it != array.end(); ++it) {
110 it->second.set_version(ofp_version);
117 const std::map<unsigned int, cofmeter_config_reply>&
118 get_mconfig()
const {
return array; };
123 std::map<unsigned int, cofmeter_config_reply>&
124 set_mconfig() {
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) <<
"<cofmeterconfigarray #meter-config:" << (int)mconfig.array.size() <<
" >" << std::endl;
169 for (std::map<unsigned int, cofmeter_config_reply>::const_iterator
170 it = mconfig.array.begin(); it != mconfig.array.end(); ++it) {
179 std::map<unsigned int, cofmeter_config_reply> array;
virtual size_t length() const
Definition: cofmeterconfigarray.cc:96
Definition: cofmeterconfigarray.h:19
Definition: cofmeterconfig.h:136