23 #include "ns3/simulator.h"
24 #include "ns3/packet.h"
32 #include "ns3/pointer.h"
39 #include "ns3/buffer.h"
48 m_maxDsaReqRetries (100),
51 m_currentTransactionId (0),
52 m_transactionIdIndex (1),
54 m_pendingServiceFlow (0)
68 .SetGroupName (
"Wimax")
123 NS_ASSERT_MSG (serviceFlow != 0,
"Error while initiating a new service flow: All service flows have been initiated");
176 NS_LOG_DEBUG (
"Service flows could not be initialized!");
219 (*m_pendingServiceFlow) = sf;
227 ss->GetConnectionManager ()->AddConnection (transportConnection,
233 if (serviceFlow == 0)
235 ss->SetAreServiceFlowsAllocated (
true);
This class implements the DSA-ACK message described by "IEEE Standard for Local and metropolitan area...
void SetConfirmationCode(uint16_t confirmationCode)
Set confirmation code field.
void SetTransactionId(uint16_t transactionId)
Set transaction ID field.
This class implements the DSA-REQ message described by "IEEE Standard for Local and metropolitan area...
void SetTransactionId(uint16_t transactionId)
set the transaction ID
uint16_t GetTransactionId(void) const
void SetServiceFlow(ServiceFlow sf)
specify a service flow to be requested by this message
This class implements the DSA-RSP message described by "IEEE Standard for Local and metropolitan ar...
uint16_t GetTransactionId(void) const
ServiceFlow GetServiceFlow(void) const
An identifier for simulation events.
bool IsRunning(void) const
This method is syntactic sugar for !IsExpired().
Mac Management messages Section 6.3.2.3 MAC Management messages page 42, Table 14 page 43.
void AddHeader(const Header &header)
Add header to this packet.
Smart pointer class similar to boost::intrusive_ptr.
This class implements service flows as described by the IEEE-802.16 standard.
uint16_t GetCid(void) const
Get CID.
void CopyParametersFrom(ServiceFlow sf)
Copy parameters from another service flow.
void SetUnsolicitedGrantInterval(uint16_t unsolicitedGrantInterval)
Set unsolicied grant interval.
void SetUnsolicitedPollingInterval(uint16_t unsolicitedPollingInterval)
Set unsolicited polling interval.
void SetConnection(Ptr< WimaxConnection > connection)
Set connection.
void SetIsEnabled(bool isEnabled)
Set is enabled flag.
The same service flow manager class serves both for BS and SS though some functions are exclusive to ...
ServiceFlow * GetNextServiceFlowToAllocate()
void AddServiceFlow(ServiceFlow *serviceFlow)
Add service flow function.
void DoDispose(void)
Destructor implementation.
static void Cancel(const EventId &id)
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
void ScheduleDsaReq(const ServiceFlow *serviceFlow)
Schedule DSA response.
void ProcessDsaRsp(const DsaRsp &dsaRsp)
Process DSA response.
uint16_t m_currentTransactionId
current transaction ID
uint8_t m_dsaReqRetries
DSA request retries.
EventId m_dsaAckTimeoutEvent
DSA ack timeout event.
ServiceFlow * m_pendingServiceFlow
pending service flow
@ CONFIRMATION_CODE_SUCCESS
EventId m_dsaRspTimeoutEvent
DSA response timeout event.
void DoDispose(void)
Destructor implementation.
~SsServiceFlowManager(void)
EventId GetDsaAckTimeoutEvent(void) const
Get DSA ack timeout event.
DsaReq CreateDsaReq(const ServiceFlow *serviceFlow)
Create DSA request.
void AddServiceFlow(ServiceFlow *serviceFlow)
add a service flow to the list
SsServiceFlowManager(Ptr< SubscriberStationNetDevice > device)
Constructor.
Ptr< SubscriberStationNetDevice > m_device
the device
static TypeId GetTypeId(void)
Register this type.
void InitiateServiceFlows(void)
Initiate service flows.
EventId GetDsaRspTimeoutEvent(void) const
Get DSA response timeout event.
Ptr< Packet > CreateDsaAck(void)
Create DSA ack.
DsaReq m_dsaReq
DSA request.
uint16_t m_transactionIdIndex
transaction ID index
uint8_t m_maxDsaReqRetries
maximum DSA request retries
uint8_t GetMaxDsaReqRetries(void) const
void SetMaxDsaReqRetries(uint8_t maxDsaReqRetries)
sets the maximum retries on DSA request message
SubscriberStationNetDevice subclass of WimaxNetDevice.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Every class exported by the ns3 library is enclosed in the ns3 namespace.