A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::RandomStream Class Referenceabstract

A simple wrapper around RngStream to make testing of the code easier. More...

#include <random-stream.h>

+ Inheritance diagram for ns3::RandomStream:

Public Member Functions

virtual ~RandomStream ()
 
virtual int64_t AssignStreams (int64_t stream)=0
 Assign a fixed random variable stream number to the random variables used by this model. More...
 
virtual uint32_t GetNext (uint32_t min, uint32_t max)=0
 Get integer between min and max (including min and max). More...
 

Detailed Description

A simple wrapper around RngStream to make testing of the code easier.

Definition at line 33 of file random-stream.h.

Constructor & Destructor Documentation

ns3::RandomStream::~RandomStream ( )
virtual

Definition at line 27 of file random-stream.cc.

Member Function Documentation

virtual int64_t ns3::RandomStream::AssignStreams ( int64_t  stream)
pure virtual

Assign a fixed random variable stream number to the random variables used by this model.

Return the number of streams (possibly zero) that have been assigned.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Implemented in ns3::TestRandomStream, and ns3::RealRandomStream.

Referenced by ns3::DcaTxop::AssignStreams(), and ns3::EdcaTxopN::AssignStreams().

+ Here is the caller graph for this function:

virtual uint32_t ns3::RandomStream::GetNext ( uint32_t  min,
uint32_t  max 
)
pure virtual

Get integer between min and max (including min and max).

Parameters
minlower bound (inclusive)
maxupper bound (inclusive)
Returns
a random number between min and max (including min and max)

Implemented in ns3::TestRandomStream, and ns3::RealRandomStream.

Referenced by ns3::DcaTxop::DoInitialize(), ns3::EdcaTxopN::DoInitialize(), ns3::DcaTxop::EndTxNoAck(), ns3::EdcaTxopN::EndTxNoAck(), ns3::EdcaTxopN::GotAck(), ns3::DcaTxop::GotAck(), ns3::EdcaTxopN::GotBlockAck(), ns3::DcaTxop::MissedAck(), ns3::EdcaTxopN::MissedAck(), ns3::EdcaTxopN::MissedBlockAck(), ns3::EdcaTxopN::MissedCts(), ns3::DcaTxop::MissedCts(), ns3::EdcaTxopN::NotifyCollision(), and ns3::DcaTxop::NotifyCollision().

+ Here is the caller graph for this function:


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