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  };
62  ~SsServiceFlowManager (void);
63  void DoDispose (void);
64 
69  static TypeId GetTypeId (void);
70 
75  void AddServiceFlow (ServiceFlow *serviceFlow);
80  void AddServiceFlow (ServiceFlow serviceFlow);
85  void SetMaxDsaReqRetries (uint8_t maxDsaReqRetries);
89  uint8_t GetMaxDsaReqRetries (void) const;
90 
95  EventId GetDsaRspTimeoutEvent (void) const;
100  EventId GetDsaAckTimeoutEvent (void) const;
101 
103  void InitiateServiceFlows (void);
104 
110  DsaReq CreateDsaReq (const ServiceFlow *serviceFlow);
111 
116  Ptr<Packet> CreateDsaAck (void);
117 
122  void ScheduleDsaReq (const ServiceFlow *serviceFlow);
123 
128  void ProcessDsaRsp (const DsaRsp &dsaRsp);
129 
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 };
151 
152 } // namespace ns3
153 
154 #endif /* SS_SERVICE_FLOW_MANAGER_H */
This class implements the DSA-RSP message described by "IEEE Standard for Local and metropolitan ar...
Definition: mac-messages.h:474
uint8_t m_maxDsaReqRetries
maximum DSA request retries
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
This class implements the DSA-ACK message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:572
EventId GetDsaRspTimeoutEvent(void) const
Get DSA response timeout event.
EventId GetDsaAckTimeoutEvent(void) const
Get DSA ack timeout event.
Ptr< SubscriberStationNetDevice > m_device
the device
ConfirmationCode
confirmation code enumeration as per Table 384 (not all codes implemented)
void AddServiceFlow(ServiceFlow *serviceFlow)
add a service flow to the list
void SetMaxDsaReqRetries(uint8_t maxDsaReqRetries)
sets the maximum retries on DSA request message
SsServiceFlowManager class.
uint16_t m_currentTransactionId
current transaction ID
SsServiceFlowManager(Ptr< SubscriberStationNetDevice > device)
creates a service flow manager and attaches it to a device
void InitiateServiceFlows(void)
Initiate service flows.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ServiceFlow * m_pendingServiceFlow
pending service flow
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:39
EventId m_dsaAckTimeoutEvent
DSA ack timeout event.
uint8_t GetMaxDsaReqRetries(void) const
DsaReq CreateDsaReq(const ServiceFlow *serviceFlow)
Create DSA request.
An identifier for simulation events.
Definition: event-id.h:53
Ptr< Packet > CreateDsaAck(void)
Create DSA ack.
uint16_t m_transactionIdIndex
transaction ID index
void DoDispose(void)
Destructor implementation.
void ProcessDsaRsp(const DsaRsp &dsaRsp)
Process DSA response.
EventId m_dsaRspTimeoutEvent
DSA response timeout event.
uint8_t m_dsaReqRetries
DSA request retries.
This class implements the DSA-REQ message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:373
The same service flow manager class serves both for BS and SS though some functions are exclusive to ...
a unique identifier for an interface.
Definition: type-id.h:58
static TypeId GetTypeId(void)
Register this type.
void ScheduleDsaReq(const ServiceFlow *serviceFlow)
Schedule DSA response.