24 #include "ns3/simulator.h"
25 #include "ns3/packet.h"
31 #include "ns3/pointer.h"
38 #include "ns3/buffer.h"
48 m_maxDsaRspRetries (100)
99 std::vector<ServiceFlow*>
122 SSRecord *ssRecord = bs->GetSSManager ()->GetSSRecord (cid);
125 NS_LOG_INFO (
"SS not registered with the BS CID:" << cid);
131 ssRecord->AddServiceFlow (serviceFlow);
134 bs->GetUplinkScheduler ()->SetupServiceFlow (ssRecord, serviceFlow);
139 if (ssRecord->GetDsaRspRetries () == 0)
141 dsaRsp =
CreateDsaRsp (serviceFlow, ssRecord->GetSfTransactionId ());
143 ssRecord->SetDsaRsp (dsaRsp);
153 NS_LOG_DEBUG (
"Service flows could not be initialized!");
157 ssRecord->IncrementDsaRspRetries ();
180 SSRecord *ssRecord = bs->GetSSManager ()->GetSSRecord (cid);
182 NS_LOG_INFO (
"BsServiceFlowManager: Processing DSA-REQ...");
183 if (ssRecord->GetSfTransactionId () != 0)
187 "Error while processing DSA request:the received transaction ID is not expected");
195 transportConnection = BsConManager->CreateConnection (
Cid::TRANSPORT);
197 transportConnection->SetServiceFlow (serviceFlow);
204 NS_LOG_INFO (
"BsServiceFlowManager: Creating a new Service flow: SFID = " << serviceFlow->
GetSfid () <<
" CID = "
205 << serviceFlow->
GetCid ());
223 bs->GetUplinkScheduler ()->SetupServiceFlow (0, serviceFlow);
233 NS_LOG_INFO (
"No service Flow. Could not connect.");
241 SSRecord *ssRecord = bs->GetSSManager ()->GetSSRecord (cid);
248 ssRecord->SetDsaRspRetries (0);
249 ssRecord->SetSfTransactionId (0);
254 ssRecord->SetAreServiceFlowsAllocated (
true);
Introspection did not find any typical Config paths.
Smart pointer class similar to boost::intrusive_ptr.
Introspection did not find any typical Config paths.
ServiceFlow * GetServiceFlow(uint32_t sfid) const
void SetConnection(Ptr< WimaxConnection > connection)
Introspection did not find any typical Config paths.
void SetServiceFlow(ServiceFlow sf)
specify a service flow to be requested by this message
void AllocateServiceFlows(const DsaReq &dsaReq, Cid cid)
ServiceFlow GetServiceFlow(void) const
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
BsServiceFlowManager(Ptr< BaseStationNetDevice > device)
uint8_t GetMaxDsaRspRetries(void) const
uint32_t GetSfid(void) const
~BsServiceFlowManager(void)
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
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...
bool IsRunning(void) const
This method is syntactic sugar for !IsExpired().
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
void DoDispose(void)
Destructor implementation.
Ptr< WimaxNetDevice > m_device
void ScheduleDsaRsp(ServiceFlow *serviceFlow, Cid cid)
void SetTransactionId(uint16_t transactionId)
EventId m_dsaAckTimeoutEvent
static Cid InitialRanging(void)
void SetUnsolicitedPollingInterval(uint16_t)
bool AreServiceFlowsAllocated()
void CopyParametersFrom(ServiceFlow sf)
ServiceFlow * GetServiceFlow(uint32_t sfid) const
uint8_t m_maxDsaRspRetries
void SetUnsolicitedGrantInterval(uint16_t)
EventId GetDsaAckTimeoutEvent(void) const
void DoDispose(void)
Destructor implementation.
void SetConvergenceSublayerParam(CsParameters)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::vector< ServiceFlow * > GetServiceFlows(enum ServiceFlow::SchedulingType schedulingType) const
Cid m_inuseScheduleDsaRspCid
ServiceFlow * ProcessDsaReq(const DsaReq &dsaReq, Cid cid)
process a DSA-Req message
This class implements service flows as described by the IEEE-802.16 standard.
void SetConfirmationCode(uint16_t confirmationCode)
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
void SetModulation(enum WimaxPhy::ModulationType modulationType)
void SetMaxDsaRspRetries(uint8_t maxDsaRspRetries)
set the maximum Dynamic ServiceFlow Add (DSA) retries
void ProcessDsaAck(const DsaAck &dsaAck, Cid cid)
process a DSA-ACK message
enum Direction GetDirection(void) const
void SetIsEnabled(bool isEnabled)
void SetType(enum Type type)
An identifier for simulation events.
void AddServiceFlow(ServiceFlow *serviceFlow)
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
uint16_t GetTransactionId(void) const
void AddServiceFlow(ServiceFlow *serviceFlow)
Add a new service flow.
void AddMulticastServiceFlow(ServiceFlow sf, enum WimaxPhy::ModulationType modulation)
add a multicast service flow
This class is used by the base station to store some information related to subscriber station in the...
void SetIsMulticast(bool isMulticast)
CsParameters GetConvergenceSublayerParam(void) const
Introspection did not find any typical Config paths.
DsaRsp CreateDsaRsp(const ServiceFlow *serviceFlow, uint16_t transactionId)
void AddHeader(const Header &header)
Add header to this packet.
uint16_t GetTransactionId(void) const
uint16_t GetCid(void) const
std::vector< ServiceFlow * > GetServiceFlows(ServiceFlow::SchedulingType schedulingType) const