Protocol++® (Protocolpp®)  v5.6.2
InterfacePP::jring< TR > Class Template Reference

Public Member Functions

 jring (size_t size)
 
 jring (uintptr_t address, size_t size)
 
 ~jring ()
 deconstructor
 
void push (const TR &data)
 
TR pop ()
 
TR pop (std::string stream)
 
void resize (size_t newSize)
 
void move (uintptr_t newAddress)
 
uint32_t size ()
 
void reset ()
 sets the pointers to original values
 
uint32_t get_avail ()
 
uint32_t get_proc ()
 

Constructor & Destructor Documentation

◆ jring() [1/2]

template<typename TR >
InterfacePP::jring< TR >::jring ( size_t  size)
inlineexplicit

constructor for software ring

Parameters
size- size of the ring in number of entries

◆ jring() [2/2]

template<typename TR >
InterfacePP::jring< TR >::jring ( uintptr_t  address,
size_t  size 
)
inline

constructor for software ring

Parameters
address- address of the ring
size- size of the ring in number of entries
Here is the call graph for this function:

Member Function Documentation

◆ get_avail()

template<typename TR >
uint32_t InterfacePP::jring< TR >::get_avail ( )
inline

retrieve available slots in the ring

Returns
- returns number of slots available in the ring

◆ get_proc()

template<typename TR >
uint32_t InterfacePP::jring< TR >::get_proc ( )
inline

retrieve number of packets available to process

Returns
- returns the number of objects ready for processing

◆ move()

template<typename TR >
void InterfacePP::jring< TR >::move ( uintptr_t  newAddress)
inline

move the ring to a new location with new size

Parameters
newAddress- New address for the software ring

◆ pop() [1/2]

template<typename TR >
TR InterfacePP::jring< TR >::pop ( )
inline

removes the object

Parameters
stream- stream to return from the ring
Returns
- returns an object from the software ring

◆ pop() [2/2]

template<typename TR >
TR InterfacePP::jring< TR >::pop ( std::string  stream)

removes the object

Parameters
stream- stream to return from the ring
Returns
- returns an object from the software ring

◆ push()

template<typename TR >
void InterfacePP::jring< TR >::push ( const TR &  data)
inline

adds the object

Parameters
data- Object to add to the software ring

◆ resize()

template<typename TR >
void InterfacePP::jring< TR >::resize ( size_t  newSize)
inline

resize the ring

Parameters
newSize- new size of the ring

◆ size()

template<typename TR >
uint32_t InterfacePP::jring< TR >::size ( )
inline

size of the ring in number of objects

Returns
- size of the ring

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