8 #ifndef COFMETERSTATS_H_
9 #define COFMETERSTATS_H_ 1
11 #include "rofl/common/cmemory.h"
12 #include "rofl/common/openflow/openflow.h"
13 #include "rofl/common/openflow/openflow_rofl_exceptions.h"
14 #include "rofl/common/openflow/cofmeterbandstatsarray.h"
30 uint8_t of_version = 0,
31 uint8_t *buf = (uint8_t*)0,
75 pack(uint8_t *buf,
size_t buflen);
82 unpack(uint8_t *buf,
size_t buflen);
97 set_version(uint8_t of_version) { this->of_version = of_version; };
104 get_version()
const {
return of_version; };
111 set_meter_id(uint32_t meter_id) { this->meter_id = meter_id; };
117 get_meter_id()
const {
return meter_id; };
123 os <<
indent(0) <<
"<cofmeter_stats_request >" << std::endl;
124 os <<
indent(2) <<
"<meter-id: 0x" << std::hex << (int)r.get_meter_id() << std::dec <<
" >" << std::endl;
143 uint8_t of_version = 0,
144 uint8_t *buf = (uint8_t*)0,
155 uint64_t packet_in_count,
156 uint64_t byte_in_count,
157 uint32_t durarion_sec,
158 uint32_t duration_nsec,
208 pack(uint8_t *buf,
size_t buflen);
214 unpack(uint8_t *buf,
size_t buflen);
222 set_meter_band_stats() {
return mbstats; };
228 get_meter_band_stats()
const {
return mbstats; };
234 set_version(uint8_t of_version) { this->of_version = of_version; };
240 get_version()
const {
return of_version; };
246 set_meter_id(uint32_t meter_id) { this->meter_id = meter_id; };
252 get_meter_id()
const {
return meter_id; };
258 set_flow_count(uint32_t flow_count) { this->flow_count = flow_count; };
264 get_flow_count()
const {
return flow_count; };
270 set_packet_in_count(uint64_t packet_in_count) { this->packet_in_count = packet_in_count; };
276 get_packet_in_count()
const {
return packet_in_count; };
282 set_byte_in_count(uint64_t byte_in_count) { this->byte_in_count = byte_in_count; };
288 get_byte_in_count()
const {
return byte_in_count; };
294 set_duration_sec(uint32_t duration_sec) { this->duration_sec = duration_sec; };
300 get_duration_sec()
const {
return duration_sec; };
306 set_duration_nsec(uint32_t duration_nsec) { this->duration_nsec = duration_nsec; };
312 get_duration_nsec()
const {
return duration_nsec; };
318 os <<
indent(0) <<
"<cofmeter_stats_reply >" << std::endl;
320 os <<
indent(2) <<
"<meter-id: 0x" << (
unsigned int)r.get_meter_id() <<
" >" << std::endl;
321 os <<
indent(2) <<
"<flow-count: 0x" << (
unsigned int)r.get_flow_count() <<
" >" << std::endl;
322 os <<
indent(2) <<
"<packet-in-count: 0x" << (
unsigned long long)r.get_packet_in_count() <<
" >" << std::endl;
323 os <<
indent(2) <<
"<byte-in-count: 0x" << (
unsigned long long)r.get_byte_in_count() <<
" >" << std::endl;
324 os <<
indent(2) <<
"<duration-sec: 0x" << (
unsigned long long)r.get_duration_sec() <<
" >" << std::endl;
325 os <<
indent(2) <<
"<duration-nsec: 0x" << (
unsigned long long)r.get_duration_nsec() <<
" >" << std::endl;
336 uint64_t packet_in_count;
337 uint64_t byte_in_count;
338 uint32_t duration_sec;
339 uint32_t duration_nsec;
Definition: cofmeterstats.h:19
Definition: cofmeterbandstatsarray.h:23
Definition: cofmeterstats.h:136
Definition: cofmeterstats.h:20
Definition: croflexception.h:27
Definition: cofmeterstats.h:23
Definition: cofmeterstats.h:21