8 #ifndef COFGROUPSTATS_H_
9 #define COFGROUPSTATS_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/cofbucketcounters.h"
38 uint8_t of_version = 0);
72 pack(uint8_t *buf,
size_t buflen)
const;
78 unpack(uint8_t *buf,
size_t buflen);
95 set_version(uint8_t of_version) { this->of_version = of_version; };
102 get_version()
const {
return of_version; };
109 get_group_id()
const {
return group_id; };
116 set_group_id(uint32_t group_id) { this->group_id = group_id; };
122 os <<
indent(0) <<
"<cofgroup_stats_request >" << std::endl;
123 os <<
indent(2) <<
"<group-id: " << (int)r.get_group_id() <<
" >" << std::endl;
137 uint64_t packet_count;
139 uint32_t duration_sec;
140 uint32_t duration_nsec;
152 uint8_t of_version = 0);
161 uint64_t packet_count,
163 uint32_t duration_sec,
164 uint32_t duration_nsec);
197 pack(uint8_t *buf,
size_t buflen);
203 unpack(uint8_t *buf,
size_t buflen);
219 get_version()
const {
return of_version; };
225 get_group_id()
const {
return group_id; };
231 get_ref_count()
const {
return ref_count; };
237 get_packet_count()
const {
return packet_count; };
243 get_byte_count()
const {
return byte_count; };
249 get_duration_sec()
const {
return duration_sec; };
255 get_duration_nsec()
const {
return duration_nsec; };
261 set_bucket_counters() {
return bucket_counters; };
267 get_bucket_counters()
const {
return bucket_counters; };
273 set_version(uint8_t of_version) { this->of_version = of_version; };
279 set_group_id(uint32_t group_id) { this->group_id = group_id; };
285 set_ref_count(uint32_t ref_count) { this->ref_count = ref_count; };
291 set_packet_count(uint64_t packet_count) { this->packet_count = packet_count; };
297 set_byte_count(uint64_t byte_count) { this->byte_count = byte_count; };
303 set_duration_sec(uint32_t duration_sec) { this->duration_sec = duration_sec; };
309 set_duration_nsec(uint32_t duration_nsec) { this->duration_nsec = duration_nsec; };
315 os <<
indent(0) <<
"<cofgroup_stats_reply >" << std::endl;
317 os <<
indent(2) <<
"<group-id: 0x" << (int)r.get_group_id() <<
" >" << std::endl;
318 os <<
indent(2) <<
"<ref-count: 0x" << (int)r.get_ref_count() <<
" >" << std::endl;
319 os <<
indent(2) <<
"<packet-count: 0x" << (int)r.get_packet_count() <<
" >" << std::endl;
320 os <<
indent(2) <<
"<byte-count: 0x" << (int)r.get_byte_count() <<
" >" << std::endl;
322 switch (r.get_version()) {
323 case rofl::openflow13::OFP_VERSION: {
325 os <<
indent(2) <<
"<duration-sec: 0x" << (int)r.get_duration_sec() <<
" >" << std::endl;
326 os <<
indent(2) <<
"<duration-nsec: 0x" << (int)r.get_duration_nsec() <<
" >" << std::endl;
333 os << r.bucket_counters;
Definition: cofgroupstats.h:20
Definition: cofgroupstats.h:19
Definition: cofgroupstats.h:23
Definition: cofgroupstats.h:21
Definition: cofbucketcounters.h:22
Definition: cofgroupstats.h:130
Definition: croflexception.h:27