#include <counters.h>
CounterArray corresponds to the counter standard P4 v1.02 object. A CounterArray reference can be used as a P4 primitive parameter. For example:
void operator ()(
CounterArray &counter_array,
const Data &idx) {
get_packet());
}
};
Definition counters.h:100
Counter & get_counter(size_t idx)
Access the counter at position idx, asserts if bad idx.
Definition counters.h:114
void increment_counter(const Packet &pkt)
Increments both counter values (bytes and packets)
Definition counters.h:66
◆ begin() [1/2]
| iterator bm::CounterArray::begin |
( |
| ) |
|
|
inline |
◆ begin() [2/2]
| const_iterator bm::CounterArray::begin |
( |
| ) |
const |
|
inline |
◆ end() [1/2]
| iterator bm::CounterArray::end |
( |
| ) |
|
|
inline |
◆ end() [2/2]
| const_iterator bm::CounterArray::end |
( |
| ) |
const |
|
inline |
◆ get_counter() [1/2]
| Counter & bm::CounterArray::get_counter |
( |
size_t |
idx | ) |
|
|
inline |
Access the counter at position idx, asserts if bad idx.
◆ get_counter() [2/2]
| const Counter & bm::CounterArray::get_counter |
( |
size_t |
idx | ) |
const |
|
inline |
Access the counter at position idx, asserts if bad idx.
◆ operator[]() [1/2]
| Counter & bm::CounterArray::operator[] |
( |
size_t |
idx | ) |
|
|
inline |
Access the counter at position idx, asserts if bad idx.
◆ operator[]() [2/2]
| const Counter & bm::CounterArray::operator[] |
( |
size_t |
idx | ) |
const |
|
inline |
Access the counter at position idx, asserts if bad idx.
◆ size()
| size_t bm::CounterArray::size |
( |
| ) |
const |
|
inline |
Return the size of the CounterArray (i.e. number of counters it includes)
The documentation for this class was generated from the following file: