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"
29#include "ss-net-device.h"
30
31namespace ns3 {
32
33class Packet;
34class ServiceFlow;
35class WimaxNetDevice;
36class WimaxConnection;
37class SubscriberStationNetDevice;
38
44{
45public:
47 enum ConfirmationCode // as per Table 384 (not all codes implemented)
48 {
51 };
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
115
120 void ScheduleDsaReq (const ServiceFlow *serviceFlow);
121
126 void ProcessDsaRsp (const DsaRsp &dsaRsp);
127
128
129private:
131
133
136
139
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 */
This class implements the DSA-ACK message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:573
This class implements the DSA-REQ message described by "IEEE Standard for Local and metropolitan area...
Definition: mac-messages.h:374
This class implements the DSA-RSP message described by "IEEE Standard for Local and metropolitan ar...
Definition: mac-messages.h:475
An identifier for simulation events.
Definition: event-id.h:54
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:40
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
uint8_t m_dsaReqRetries
DSA request retries.
EventId m_dsaAckTimeoutEvent
DSA ack timeout event.
ServiceFlow * m_pendingServiceFlow
pending service flow
EventId m_dsaRspTimeoutEvent
DSA response timeout event.
void DoDispose(void)
Destructor implementation.
EventId GetDsaAckTimeoutEvent(void) const
Get DSA ack 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
static TypeId GetTypeId(void)
Register this type.
void InitiateServiceFlows(void)
Initiate service flows.
EventId GetDsaRspTimeoutEvent(void) const
Get DSA response timeout event.
Ptr< Packet > CreateDsaAck(void)
Create DSA ack.
uint16_t m_transactionIdIndex
transaction ID index
uint8_t m_maxDsaReqRetries
maximum DSA request retries
uint8_t GetMaxDsaReqRetries(void) const
void SetMaxDsaReqRetries(uint8_t maxDsaReqRetries)
sets the maximum retries on DSA request message
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.