NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PacketProducer< SIZE > Class Template Reference

Packet producer that supports variable sized packets. More...

#include <consumer.h>

Inheritance diagram for PacketProducer< SIZE >:
Producer< unsigned, SIZE >

Public Member Functions

 PacketProducer (PacketConsumer< SIZE > *consumer=0, unsigned cap_nq=0)
bool produce (const unsigned char *buf, unsigned len)
 Put something in the buffer.
- Public Member Functions inherited from Producer< unsigned, SIZE >
bool produce (unsigned &value)
 Put something in the buffer.
unsigned sm ()
 Producer (Consumer< unsigned, SIZE > *consumer=0, unsigned nq=0)

Private Types

typedef Producer< unsigned, SIZE > Parent

Additional Inherited Members

- Protected Attributes inherited from Producer< unsigned, SIZE >
Consumer< unsigned, SIZE > * _consumer
KernelSemaphore _sem
bool _dropping

Detailed Description

template<unsigned SIZE>
class PacketProducer< SIZE >

Packet producer that supports variable sized packets.

Member Typedef Documentation

template<unsigned SIZE>
typedef Producer<unsigned, SIZE> PacketProducer< SIZE >::Parent
private

Constructor & Destructor Documentation

template<unsigned SIZE>
PacketProducer< SIZE >::PacketProducer ( PacketConsumer< SIZE > *  consumer = 0,
unsigned  cap_nq = 0 
)
inline

Member Function Documentation

template<unsigned SIZE>
bool PacketProducer< SIZE >::produce ( const unsigned char *  buf,
unsigned  len 
)
inline

Put something in the buffer.

Please note that this function is not locked, thus only a single producer should do the access at the very same time.


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