Click
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ClassifyElement< T, Base > Class Template Reference

#include <batchelement.hh>

Inherits BatchElement.

Public Member Functions

void push (int, Packet *p)
 Push packet p onto push input port.
 

Detailed Description

template<typename T, typename Base = BatchElement>
class ClassifyElement< T, Base >

Batch helper element.

Implement a (batch-compatible) element only by providing a function that returns a port index. It uses CRTP so no virtual call is added.

Inherited class must implement inline int classify(Packet* p);

The inherited element cannot be extended further because of CRTP !

Member Function Documentation

◆ push()

template<typename T , typename Base = BatchElement>
void ClassifyElement< T, Base >::push ( int  port,
Packet *  p 
)
inlinevirtual

Push packet p onto push input port.

Parameters
portthe input port number on which the packet arrives
pthe packet

An upstream element transferred packet p to this element over a push connection. This element should process the packet as necessary and return. The packet arrived on input port port. push() must account for the packet either by pushing it further downstream, by freeing it, or by storing it temporarily.

The default implementation calls simple_action().

Reimplemented from Element.


The documentation for this class was generated from the following file: