A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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>

+ Collaboration diagram for ns3::Reservation:

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.
 ~Reservation ()
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.

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 ( )

Create empty object with default values.

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

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(), ns3::UanHeaderCommon::GetSerializedSize(), list, m_length, and m_pktList.

+ Here is the call graph for this function:

ns3::Reservation::~Reservation ( )

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

References m_pktList, and m_timestamp.

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.

References m_timestamp.

Referenced by ns3::UanMacRc::Associate().

+ Here is the caller graph for this function:

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

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

References m_frameNo.

Referenced by ns3::UanMacRc::CreateRtsHeader().

+ Here is the caller graph for this function:

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.

References m_length.

Referenced by ns3::UanMacRc::CreateRtsHeader().

+ Here is the caller graph for this function:

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

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

References m_pktList.

Referenced by ns3::UanMacRc::CreateRtsHeader().

+ Here is the caller graph for this function:

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.

References m_pktList.

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

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

References m_retryNo.

Referenced by ns3::UanMacRc::CreateRtsHeader().

+ Here is the caller graph for this function:

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.

References m_timestamp.

Referenced by ns3::UanMacRc::CreateRtsHeader().

+ Here is the caller graph for this function:

void ns3::Reservation::IncrementRetry ( )

Increments retry count by 1.

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

References m_retryNo.

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

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

References m_transmitted.

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

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

References m_frameNo.

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.

References m_transmitted.

Member Data Documentation

uint8_t ns3::Reservation::m_frameNo
private

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

Referenced by GetFrameNo(), and SetFrameNo().

uint32_t ns3::Reservation::m_length
private

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

Referenced by GetLength(), and Reservation().

std::list<std::pair <Ptr<Packet>, UanAddress > > ns3::Reservation::m_pktList
private

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

Referenced by GetNoFrames(), GetPktList(), Reservation(), and ~Reservation().

uint8_t ns3::Reservation::m_retryNo
private

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

Referenced by GetRetryNo(), and IncrementRetry().

std::vector<Time> ns3::Reservation::m_timestamp
private

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

Referenced by AddTimestamp(), GetTimestamp(), and ~Reservation().

bool ns3::Reservation::m_transmitted
private

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

Referenced by IsTransmitted(), and SetTransmitted().


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