A Discrete-Event Network Simulator
API
ss-service-flow-manager.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2009 INRIA, UDcast
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
19  */
20 
21 #ifndef SS_SERVICE_FLOW_MANAGER_H
22 #define SS_SERVICE_FLOW_MANAGER_H
23 
24 #include <stdint.h>
25 #include "ns3/event-id.h"
26 #include "mac-messages.h"
27 #include "ns3/buffer.h"
28 #include "service-flow-manager.h"
29 #include "ss-net-device.h"
30 
31 namespace ns3 {
32 
33 class Packet;
34 class ServiceFlow;
35 class WimaxNetDevice;
36 class WimaxConnection;
37 class SubscriberStationNetDevice;
38 
44 {
45 public:
47  enum ConfirmationCode // as per Table 384 (not all codes implemented)
48  {
51  };
60  ~SsServiceFlowManager (void);
61  void DoDispose (void);
62 
67  static TypeId GetTypeId (void);
68 
73  void AddServiceFlow (ServiceFlow *serviceFlow);
78  void AddServiceFlow (ServiceFlow serviceFlow);
83  void SetMaxDsaReqRetries (uint8_t maxDsaReqRetries);
87  uint8_t GetMaxDsaReqRetries (void) const;
88 
93  EventId GetDsaRspTimeoutEvent (void) const;
98  EventId GetDsaAckTimeoutEvent (void) const;
99 
101  void InitiateServiceFlows (void);
102 
108  DsaReq CreateDsaReq (const ServiceFlow *serviceFlow);
109 
114  Ptr<Packet> CreateDsaAck (void);
115 
120  void ScheduleDsaReq (const ServiceFlow *serviceFlow);
121 
126  void ProcessDsaRsp (const DsaRsp &dsaRsp);
127 
128 
129 private:
131 
133 
136 
139 
142  uint8_t m_dsaReqRetries;
143 
144  // pointer to the service flow currently being configured
146 
147 
148 };
149 
150 } // namespace ns3
151 
152 #endif /* SS_SERVICE_FLOW_MANAGER_H */
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ss-net-device.h
ns3::EventId
An identifier for simulation events.
Definition: event-id.h:54
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::SsServiceFlowManager::SetMaxDsaReqRetries
void SetMaxDsaReqRetries(uint8_t maxDsaReqRetries)
sets the maximum retries on DSA request message
Definition: ss-service-flow-manager.cc:81
ns3::ServiceFlowManager::ConfirmationCode
ConfirmationCode
confirmation code enumeration as per Table 384 (not all codes implemented)
Definition: service-flow-manager.h:47
ns3::SsServiceFlowManager::m_pendingServiceFlow
ServiceFlow * m_pendingServiceFlow
pending service flow
Definition: ss-service-flow-manager.h:145
ns3::ServiceFlowManager
The same service flow manager class serves both for BS and SS though some functions are exclusive to ...
Definition: service-flow-manager.h:43
ns3::SsServiceFlowManager::m_maxDsaReqRetries
uint8_t m_maxDsaReqRetries
maximum DSA request retries
Definition: ss-service-flow-manager.h:132
ns3::SsServiceFlowManager::CONFIRMATION_CODE_REJECT
@ CONFIRMATION_CODE_REJECT
Definition: ss-service-flow-manager.h:50
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
ns3::DsaReq
This class implements the DSA-REQ message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:374
ns3::SsServiceFlowManager::ProcessDsaRsp
void ProcessDsaRsp(const DsaRsp &dsaRsp)
Process DSA response.
Definition: ss-service-flow-manager.cc:198
ns3::DsaAck
This class implements the DSA-ACK message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:573
ns3::SsServiceFlowManager::GetDsaAckTimeoutEvent
EventId GetDsaAckTimeoutEvent(void) const
Get DSA ack timeout event.
Definition: ss-service-flow-manager.cc:99
mac-messages.h
ns3::SsServiceFlowManager::m_dsaReq
DsaReq m_dsaReq
DSA request.
Definition: ss-service-flow-manager.h:137
ns3::DsaRsp
This class implements the DSA-RSP message described by "IEEE Standard for Local and metropolitan ar...
Definition: mac-messages.h:475
ns3::SsServiceFlowManager::~SsServiceFlowManager
~SsServiceFlowManager(void)
Definition: ss-service-flow-manager.cc:58
ns3::SsServiceFlowManager::m_transactionIdIndex
uint16_t m_transactionIdIndex
transaction ID index
Definition: ss-service-flow-manager.h:141
ns3::SsServiceFlowManager::SsServiceFlowManager
SsServiceFlowManager(Ptr< SubscriberStationNetDevice > device)
Constructor.
Definition: ss-service-flow-manager.cc:46
ns3::SsServiceFlowManager::ScheduleDsaReq
void ScheduleDsaReq(const ServiceFlow *serviceFlow)
Schedule DSA response.
Definition: ss-service-flow-manager.cc:156
ns3::SsServiceFlowManager::GetDsaRspTimeoutEvent
EventId GetDsaRspTimeoutEvent(void) const
Get DSA response timeout event.
Definition: ss-service-flow-manager.cc:93
ns3::SsServiceFlowManager::InitiateServiceFlows
void InitiateServiceFlows(void)
Initiate service flows.
Definition: ss-service-flow-manager.cc:120
ns3::SsServiceFlowManager::m_dsaRspTimeoutEvent
EventId m_dsaRspTimeoutEvent
DSA response timeout event.
Definition: ss-service-flow-manager.h:134
ns3::SsServiceFlowManager::AddServiceFlow
void AddServiceFlow(ServiceFlow *serviceFlow)
add a service flow to the list
Definition: ss-service-flow-manager.cc:113
ns3::SsServiceFlowManager::CreateDsaAck
Ptr< Packet > CreateDsaAck(void)
Create DSA ack.
Definition: ss-service-flow-manager.cc:143
ns3::SsServiceFlowManager::m_currentTransactionId
uint16_t m_currentTransactionId
current transaction ID
Definition: ss-service-flow-manager.h:140
ns3::SsServiceFlowManager::CreateDsaReq
DsaReq CreateDsaReq(const ServiceFlow *serviceFlow)
Create DSA request.
Definition: ss-service-flow-manager.cc:129
ns3::SsServiceFlowManager::m_dsaAckTimeoutEvent
EventId m_dsaAckTimeoutEvent
DSA ack timeout event.
Definition: ss-service-flow-manager.h:135
ns3::ServiceFlow
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:40
ns3::SsServiceFlowManager
SsServiceFlowManager class.
Definition: ss-service-flow-manager.h:44
ns3::SsServiceFlowManager::CONFIRMATION_CODE_SUCCESS
@ CONFIRMATION_CODE_SUCCESS
Definition: ss-service-flow-manager.h:49
ns3::SsServiceFlowManager::DoDispose
void DoDispose(void)
Destructor implementation.
Definition: ss-service-flow-manager.cc:75
service-flow-manager.h
ns3::SsServiceFlowManager::m_device
Ptr< SubscriberStationNetDevice > m_device
the device
Definition: ss-service-flow-manager.h:130
ns3::SsServiceFlowManager::m_dsaReqRetries
uint8_t m_dsaReqRetries
DSA request retries.
Definition: ss-service-flow-manager.h:142
ns3::SsServiceFlowManager::m_dsaAck
DsaAck m_dsaAck
DSA ack.
Definition: ss-service-flow-manager.h:138
ns3::SsServiceFlowManager::GetTypeId
static TypeId GetTypeId(void)
Register this type.
Definition: ss-service-flow-manager.cc:64
ns3::SsServiceFlowManager::GetMaxDsaReqRetries
uint8_t GetMaxDsaReqRetries(void) const
Definition: ss-service-flow-manager.cc:87