A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::FdNetDeviceFdReader Class Reference
+ Inheritance diagram for ns3::FdNetDeviceFdReader:

Public Member Functions

 FdNetDeviceFdReader ()
 
void SetBufferSize (uint32_t bufferSize)
 
- Public Member Functions inherited from ns3::FdReader
void Start (int fd, Callback< void, uint8_t *, ssize_t > readCallback)
 
void Stop (void)
 
- Public Member Functions inherited from ns3::SimpleRefCount< FdReader >
 SimpleRefCount (const SimpleRefCount &o)
 
uint32_t GetReferenceCount (void) const
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 
void Ref (void) const
 
void Unref (void) const
 

Private Member Functions

FdReader::Data DoRead (void)
 The read implementation. More...
 

Private Attributes

uint32_t m_bufferSize
 

Additional Inherited Members

- Static Public Member Functions inherited from ns3::SimpleRefCount< FdReader >
static void Cleanup (void)
 
- Protected Attributes inherited from ns3::FdReader
int m_fd
 The file descriptor to read from. More...
 

Detailed Description

Definition at line 43 of file fd-net-device.h.

Constructor & Destructor Documentation

ns3::FdNetDeviceFdReader::FdNetDeviceFdReader ( )

Constructor for the FdNetDevice.

Definition at line 47 of file fd-net-device.cc.

Member Function Documentation

FdReader::Data ns3::FdNetDeviceFdReader::DoRead ( void  )
privatevirtual

The read implementation.

The value of m_len returned controls further processing. The callback function is only invoked when m_len is positive; any data read is not processed when m_len is negative; reading stops when m_len is zero.

The management of memory associated with m_buf must be compatible with the read callback.

Returns
A structure representing what was read.

Implements ns3::FdReader.

Definition at line 58 of file fd-net-device.cc.

References ns3::FdReader::m_fd, NS_ABORT_MSG_IF, NS_LOG_FUNCTION, and NS_LOG_LOGIC.

void ns3::FdNetDeviceFdReader::SetBufferSize ( uint32_t  bufferSize)

Set size of the read buffer.

Definition at line 53 of file fd-net-device.cc.


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