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 () | |
| Default constructor. More... | |
| 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... | |
| ~Reservation () | |
| Destructor. More... | |
| void | AddTimestamp (Time t) |
| Set the time of the latest RTS sent. More... | |
| uint8_t | GetFrameNo () const |
| Get the frame number. More... | |
| uint32_t | GetLength () const |
| Get the total length of the Reservation. More... | |
| uint32_t | GetNoFrames () const |
| Get the number of frames in this Reservation. More... | |
| const std::list< std::pair < Ptr< Packet >, UanAddress > > & | GetPktList (void) const |
| Get the list of packets. More... | |
| uint8_t | GetRetryNo () const |
| Get the retry number. More... | |
| Time | GetTimestamp (uint8_t n) const |
| Get the timestamp for the n'th RTS. More... | |
| void | IncrementRetry () |
| Increment the retry count. More... | |
| bool | IsTransmitted () const |
| void | SetFrameNo (uint8_t fn) |
| Set the frame number. More... | |
| void | SetTransmitted (bool t=true) |
| Set the reservation transmitted state. More... | |
Private Attributes | |
| uint8_t | m_frameNo |
| Frame number. More... | |
| uint32_t | m_length |
| Total length of queued packets. More... | |
| std::list< std::pair< Ptr < Packet >, UanAddress > > | m_pktList |
| Queued packets for each address. More... | |
| uint8_t | m_retryNo |
| Number of retries. More... | |
| std::vector< Time > | m_timestamp |
| Timestamps for each retry. More... | |
| bool | m_transmitted |
| Has this reservation been transmitted. More... | |
Stores reservation info for use in scheduling data channel by reservation channel MAC.
Definition at line 52 of file uan-mac-rc.h.
| ns3::Reservation::Reservation | ( | ) |
Default constructor.
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.
| list | List of packets for assigned to reservation. |
| frameNo | Frame number of reservation transmission. |
| maxPkts | Maximum 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 | ( | ) |
| void ns3::Reservation::AddTimestamp | ( | Time | t | ) |
Set the time of the latest RTS sent.
| t | RTS timestamp. |
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 |
Get the frame number.
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 |
Get the total length of the Reservation.
This is the sum of 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 |
Get the number of frames in this 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 |
Get the list of packets.
Definition at line 98 of file uan-mac-rc.cc.
References m_pktList.
| uint8_t ns3::Reservation::GetRetryNo | ( | void | ) | const |
Get the retry number.
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 |
Get the timestamp for the n'th RTS.
| n | Which retry number. |
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 | ( | ) |
| bool ns3::Reservation::IsTransmitted | ( | ) | const |
Definition at line 122 of file uan-mac-rc.cc.
References m_transmitted.
| void ns3::Reservation::SetFrameNo | ( | uint8_t | fn | ) |
Set the frame number.
| fn | The frame number. |
Definition at line 128 of file uan-mac-rc.cc.
References m_frameNo.
| void ns3::Reservation::SetTransmitted | ( | bool | t = true | ) |
Set the reservation transmitted state.
| t | True if resevation has been transmitted. |
Definition at line 146 of file uan-mac-rc.cc.
References m_transmitted.
|
private |
Frame number.
Definition at line 138 of file uan-mac-rc.h.
Referenced by GetFrameNo(), and SetFrameNo().
|
private |
Total length of queued packets.
Definition at line 136 of file uan-mac-rc.h.
Referenced by GetLength(), and Reservation().
|
private |
Queued packets for each address.
Definition at line 134 of file uan-mac-rc.h.
Referenced by GetNoFrames(), GetPktList(), Reservation(), and ~Reservation().
|
private |
Number of retries.
Definition at line 142 of file uan-mac-rc.h.
Referenced by GetRetryNo(), and IncrementRetry().
|
private |
Timestamps for each retry.
Definition at line 140 of file uan-mac-rc.h.
Referenced by AddTimestamp(), GetTimestamp(), and ~Reservation().
|
private |
Has this reservation been transmitted.
Definition at line 144 of file uan-mac-rc.h.
Referenced by IsTransmitted(), and SetTransmitted().