|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
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);
ServiceFlow GetServiceFlow(void) const
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
uint16_t GetTransactionId(void) const
void SetUnsolicitedGrantInterval(uint16_t unsolicitedGrantInterval)
Set unsolicied grant interval.
uint16_t GetTransactionId(void) const
An identifier for simulation events.
void AddHeader(const Header &header)
Add header to this packet.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint16_t GetCid(void) const
Get CID.
Mac Management messages Section 6.3.2.3 MAC Management messages page 42, Table 14 page 43.
ServiceFlow * GetNextServiceFlowToAllocate()
void SetMaxDsaReqRetries(uint8_t maxDsaReqRetries)
sets the maximum retries on DSA request message
ServiceFlow * m_pendingServiceFlow
pending service flow
The same service flow manager class serves both for BS and SS though some functions are exclusive to ...
static EventId Schedule(Time const &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
uint8_t m_maxDsaReqRetries
maximum DSA request retries
void SetServiceFlow(ServiceFlow sf)
specify a service flow to be requested by this message
Smart pointer class similar to boost::intrusive_ptr.
This class implements the DSA-REQ message described by "IEEE Standard for Local and metropolitan area...
void ProcessDsaRsp(const DsaRsp &dsaRsp)
Process DSA response.
bool IsRunning(void) const
This method is syntactic sugar for !IsExpired().
This class implements the DSA-ACK message described by "IEEE Standard for Local and metropolitan area...
void SetUnsolicitedPollingInterval(uint16_t unsolicitedPollingInterval)
Set unsolicited polling interval.
EventId GetDsaAckTimeoutEvent(void) const
Get DSA ack timeout event.
void SetConnection(Ptr< WimaxConnection > connection)
Set connection.
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...
void SetConfirmationCode(uint16_t confirmationCode)
Set confirmation code field.
DsaReq m_dsaReq
DSA request.
void CopyParametersFrom(ServiceFlow sf)
Copy parameters from another service flow.
This class implements the DSA-RSP message described by "IEEE Standard for Local and metropolitan ar...
~SsServiceFlowManager(void)
uint16_t m_transactionIdIndex
transaction ID index
SsServiceFlowManager(Ptr< SubscriberStationNetDevice > device)
Constructor.
void ScheduleDsaReq(const ServiceFlow *serviceFlow)
Schedule DSA response.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
EventId GetDsaRspTimeoutEvent(void) const
Get DSA response timeout event.
void InitiateServiceFlows(void)
Initiate service flows.
SubscriberStationNetDevice subclass of WimaxNetDevice.
EventId m_dsaRspTimeoutEvent
DSA response timeout event.
void DoDispose(void)
Destructor implementation.
void SetTransactionId(uint16_t transactionId)
Set transaction ID field.
void AddServiceFlow(ServiceFlow *serviceFlow)
add a service flow to the list
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Ptr< Packet > CreateDsaAck(void)
Create DSA ack.
uint16_t m_currentTransactionId
current transaction ID
DsaReq CreateDsaReq(const ServiceFlow *serviceFlow)
Create DSA request.
EventId m_dsaAckTimeoutEvent
DSA ack timeout event.
void SetIsEnabled(bool isEnabled)
Set is enabled flag.
void AddServiceFlow(ServiceFlow *serviceFlow)
Add service flow function.
This class implements service flows as described by the IEEE-802.16 standard.
@ CONFIRMATION_CODE_SUCCESS
void DoDispose(void)
Destructor implementation.
Ptr< SubscriberStationNetDevice > m_device
the device
uint8_t m_dsaReqRetries
DSA request retries.
void SetTransactionId(uint16_t transactionId)
set the transaction ID
static TypeId GetTypeId(void)
Register this type.
uint8_t GetMaxDsaReqRetries(void) const