8 #ifndef COFMETERBAND_H_
9 #define COFMETERBAND_H_ 1
14 #include "../endian_conversion.h"
17 #include "rofl/common/cmemory.h"
18 #include "rofl/common/croflexception.h"
19 #include "rofl/common/openflow/openflow.h"
20 #include "rofl/common/openflow/openflow_rofl_exceptions.h"
36 uint8_t of_version = rofl::openflow::OFP_VERSION_UNKNOWN,
78 resize(
size_t len) {
return body.
resize(len); }
92 pack(uint8_t *buf,
size_t buflen);
99 unpack(uint8_t *buf,
size_t buflen);
109 get_version()
const {
return of_version; };
117 uint8_t of_version) { this->of_version = of_version; };
124 get_type()
const {
return type; }
132 uint16_t type) { this->type = type; };
139 get_length()
const {
return len; };
146 set_length(uint16_t len) { this->len = len; };
153 get_rate()
const {
return rate; };
161 uint32_t rate) { this->rate = rate; };
168 get_burst_size()
const {
return burst_size; };
176 uint32_t burst_size) { this->burst_size = burst_size; };
183 set_body() {
return body; };
190 get_body()
const {
return body; };
202 <<
" type: 0x" << mb.get_type()
203 <<
" len: 0x" << mb.get_length()
204 <<
" rate: 0x" << mb.get_rate()
205 <<
" burst_size: 0x" << mb.get_burst_size()
207 <<
" >" << std::endl;
237 uint8_t of_version = rofl::openflow13::OFP_VERSION);
276 os <<
rofl::indent(0) <<
"<cofmeter_band_drop >" << std::endl;
278 os << dynamic_cast<const cofmeter_band&>( mb );
298 uint8_t of_version = rofl::openflow13::OFP_VERSION);
347 pack(uint8_t *buf,
size_t buflen);
354 unpack(uint8_t *buf,
size_t buflen);
364 get_prec_level()
const {
return prec_level; };
371 set_prec_level(uint8_t prec_level) { this->prec_level = prec_level; };
377 os <<
rofl::indent(0) <<
"<cofmeter_band_dscp_remark prec-level: 0x"
378 << std::hex << (int)mb.get_prec_level() << std::dec <<
" >" << std::endl;
380 os << dynamic_cast<const cofmeter_band&>( mb );
402 uint8_t of_version = rofl::openflow13::OFP_VERSION);
449 pack(uint8_t *buf,
size_t buflen);
456 unpack(uint8_t *buf,
size_t buflen);
466 get_exp_id()
const {
return exp_id; };
473 set_exp_id(uint32_t exp_id) { this->exp_id = exp_id; };
480 get_exp_body()
const {
return exp_body; };
487 set_exp_body() {
return exp_body; };
494 get_body()
const {
return exp_body; };
501 set_body() {
return exp_body; };
508 os <<
rofl::indent(0) <<
"<cofmeter_band_experimenter exp_id: 0x"
509 << std::hex << (int)mb.get_exp_id() << std::dec <<
" >" << std::endl;
510 {
rofl::indent i(2); os << dynamic_cast<const cofmeter_band&>( mb ); }
511 os <<
rofl::indent(2) <<
"<experimental body: >" << std::endl;
Definition: cofmeterband.h:289
Definition: cofmeterband.h:228
Definition: openflow13.h:936
Definition: cofmeterband.h:26
Definition: cofmeterband.h:393
virtual uint8_t * resize(size_t len)
Resizes allocated memory area by calling C-function realloc().
Definition: cmemory.cc:253
C++ abstraction for malloc'ed memory areas.
Definition: cmemory.h:44
Definition: cofmeterband.h:25
Definition: cofmeterband.h:29
Definition: croflexception.h:27