A Discrete-Event Network Simulator
API
ss-service-flow-manager.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009 INRIA, UDcast
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
18  */
19 
20 #ifndef SS_SERVICE_FLOW_MANAGER_H
21 #define SS_SERVICE_FLOW_MANAGER_H
22 
23 #include "mac-messages.h"
24 #include "service-flow-manager.h"
25 #include "ss-net-device.h"
26 
27 #include "ns3/buffer.h"
28 #include "ns3/event-id.h"
29 
30 #include <stdint.h>
31 
32 namespace ns3
33 {
34 
35 class Packet;
36 class ServiceFlow;
37 class WimaxNetDevice;
38 class WimaxConnection;
39 class SubscriberStationNetDevice;
40 
46 {
47  public:
49  enum ConfirmationCode // as per Table 384 (not all codes implemented)
50  {
53  };
54 
63  ~SsServiceFlowManager() override;
64  void DoDispose() override;
65 
70  static TypeId GetTypeId();
71 
76  void AddServiceFlow(ServiceFlow* serviceFlow);
81  void AddServiceFlow(ServiceFlow serviceFlow);
86  void SetMaxDsaReqRetries(uint8_t maxDsaReqRetries);
90  uint8_t GetMaxDsaReqRetries() const;
91 
102 
104  void InitiateServiceFlows();
105 
111  DsaReq CreateDsaReq(const ServiceFlow* serviceFlow);
112 
118 
123  void ScheduleDsaReq(const ServiceFlow* serviceFlow);
124 
129  void ProcessDsaRsp(const DsaRsp& dsaRsp);
130 
131  private:
133 
135 
138 
141 
144  uint8_t m_dsaReqRetries;
145 
146  // pointer to the service flow currently being configured
148 };
149 
150 } // namespace ns3
151 
152 #endif /* SS_SERVICE_FLOW_MANAGER_H */
This class implements the DSA-ACK message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:590
This class implements the DSA-REQ message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:386
This class implements the DSA-RSP message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:490
An identifier for simulation events.
Definition: event-id.h:55
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:43
The same service flow manager class serves both for BS and SS though some functions are exclusive to ...
ConfirmationCode
confirmation code enumeration as per Table 384 (not all codes implemented)
SsServiceFlowManager class.
void ScheduleDsaReq(const ServiceFlow *serviceFlow)
Schedule DSA response.
void ProcessDsaRsp(const DsaRsp &dsaRsp)
Process DSA response.
uint16_t m_currentTransactionId
current transaction ID
EventId GetDsaRspTimeoutEvent() const
Get DSA response timeout event.
uint8_t m_dsaReqRetries
DSA request retries.
EventId m_dsaAckTimeoutEvent
DSA ack timeout event.
ServiceFlow * m_pendingServiceFlow
pending service flow
EventId GetDsaAckTimeoutEvent() const
Get DSA ack timeout event.
void InitiateServiceFlows()
Initiate service flows.
EventId m_dsaRspTimeoutEvent
DSA response 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
uint16_t m_transactionIdIndex
transaction ID index
uint8_t m_maxDsaReqRetries
maximum DSA request retries
static TypeId GetTypeId()
Register this type.
void DoDispose() override
Destructor implementation.
void SetMaxDsaReqRetries(uint8_t maxDsaReqRetries)
sets the maximum retries on DSA request message
Ptr< Packet > CreateDsaAck()
Create DSA ack.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.