A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::Reservation Class Reference

Stores reservation info for use in scheduling data channel by reservation channel MAC. More...

#include <uan-mac-rc.h>

Public Member Functions

 Reservation ()
 Create empty object with default values.
 
 Reservation (std::list< std::pair< Ptr< Packet >, UanAddress > > &list, uint8_t frameNo, uint32_t maxPkts=0)
 Create Reservation object with given packet list, frame number and max packets. More...
 
void AddTimestamp (Time t)
 
uint8_t GetFrameNo () const
 
uint32_t GetLength () const
 
uint32_t GetNoFrames () const
 
const std::list< std::pair
< Ptr< Packet >, UanAddress > > & 
GetPktList (void) const
 
uint8_t GetRetryNo () const
 
Time GetTimestamp (uint8_t n) const
 
void IncrementRetry ()
 Increments retry count by 1.
 
bool IsTransmitted () const
 
void SetFrameNo (uint8_t fn)
 
void SetTransmitted (bool t=true)
 Sets reservation transmitted state. More...
 

Private Attributes

uint8_t m_frameNo
 
uint32_t m_length
 
std::list< std::pair< Ptr
< Packet >, UanAddress > > 
m_pktList
 
uint8_t m_retryNo
 
std::vector< Timem_timestamp
 
bool m_transmitted
 

Detailed Description

Stores reservation info for use in scheduling data channel by reservation channel MAC.

Definition at line 52 of file uan-mac-rc.h.

Constructor & Destructor Documentation

ns3::Reservation::Reservation ( std::list< std::pair< Ptr< Packet >, UanAddress > > &  list,
uint8_t  frameNo,
uint32_t  maxPkts = 0 
)

Create Reservation object with given packet list, frame number and max packets.

Parameters
listList of packets for assigned to reservation
frameNoFrame number of reservation transmission
maxPktsMaximum number of packets to assign to reservation from packet list (0 = no maximum)

Definition at line 54 of file uan-mac-rc.cc.

References ns3::UanHeaderRcData::GetSerializedSize(), and ns3::UanHeaderCommon::GetSerializedSize().

Member Function Documentation

void ns3::Reservation::AddTimestamp ( Time  t)
Parameters
tTime of latest RTS send

Definition at line 134 of file uan-mac-rc.cc.

uint8_t ns3::Reservation::GetFrameNo ( void  ) const
Returns
Frame number of reservation

Definition at line 104 of file uan-mac-rc.cc.

uint32_t ns3::Reservation::GetLength ( void  ) const
Returns
total byte length of reservation (sum of all packets with headers)

Definition at line 92 of file uan-mac-rc.cc.

uint32_t ns3::Reservation::GetNoFrames ( void  ) const
Returns
number of frames in reservation

Definition at line 86 of file uan-mac-rc.cc.

const std::list< std::pair< Ptr< Packet >, UanAddress > > & ns3::Reservation::GetPktList ( void  ) const
Returns
reference to list of packets in this reservation

Definition at line 98 of file uan-mac-rc.cc.

uint8_t ns3::Reservation::GetRetryNo ( void  ) const
Returns
Retry number of reservation

Definition at line 110 of file uan-mac-rc.cc.

Time ns3::Reservation::GetTimestamp ( uint8_t  n) const
Returns
Timestamp nth RTS send for this reservation
Parameters
nTimestamp for retry number n to return

Definition at line 116 of file uan-mac-rc.cc.

bool ns3::Reservation::IsTransmitted ( ) const
Returns
True if reservation packets have been transmitted

Definition at line 122 of file uan-mac-rc.cc.

void ns3::Reservation::SetFrameNo ( uint8_t  fn)
Parameters
fnFrame number to set reservation to

Definition at line 128 of file uan-mac-rc.cc.

void ns3::Reservation::SetTransmitted ( bool  t = true)

Sets reservation transmitted state.

Parameters
tTrue if resevation has been transmitted

Definition at line 146 of file uan-mac-rc.cc.


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