A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ss-scheduler.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007,2008 INRIA
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 * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
18 */
19
20/* SS outbound scheduler as per in Section 6.3.5.1 */
21
22#ifndef SS_SCHEDULER_H
23#define SS_SCHEDULER_H
24
25#include "wimax-mac-header.h"
26#include "wimax-phy.h"
27
28#include "ns3/packet-burst.h"
29#include "ns3/packet.h"
30
31#include <stdint.h>
32
33namespace ns3
34{
35
36class SubscriberStationNetDevice;
37class WimaxConnection;
38
39/**
40 * \ingroup wimax
41 * \param SSScheduler class
42 */
43class SSScheduler : public Object
44{
45 public:
46 /**
47 * \brief Get the type ID.
48 * \return the object TypeId
49 */
50 static TypeId GetTypeId();
51 /**
52 * Constructor
53 *
54 * \param ss subscriber station device
55 */
57 ~SSScheduler() override;
58
59 // Delete copy constructor and assignment operator to avoid misuse
60 SSScheduler(const SSScheduler&) = delete;
62
63 /**
64 * Set poll me value
65 * \param pollMe the poll me flag
66 */
67 void SetPollMe(bool pollMe);
68 /**
69 * Get the poll me value
70 * \returns the poll me flag
71 */
72 bool GetPollMe() const;
73 /**
74 * \return a list of packet to be sent in the next opportunity
75 * \param availableSymbols the available resources in symbols
76 * \param modulationType the used modulation
77 * \param packetType the type of packets to select from
78 * \param connection the connection from which packets will be selected
79 */
80 Ptr<PacketBurst> Schedule(uint16_t availableSymbols,
81 WimaxPhy::ModulationType modulationType,
83 Ptr<WimaxConnection>& connection);
84
85 void DoDispose() override;
86
87 private:
88 /**
89 * Select connection
90 * \returns pointer to the wimax connection
91 */
93 Ptr<SubscriberStationNetDevice> m_ss; ///< the subscriber station
94 bool m_pollMe; ///< poll me flag
95};
96
97} // namespace ns3
98
99#endif /* SS_SCHEDULER_H */
HeaderType
Header type enumeration.
A base class which provides memory management and object aggregation.
Definition: object.h:89
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
SSScheduler & operator=(const SSScheduler &)=delete
bool m_pollMe
poll me flag
Definition: ss-scheduler.h:94
SSScheduler(const SSScheduler &)=delete
void DoDispose() override
Destructor implementation.
Definition: ss-scheduler.cc:60
Ptr< PacketBurst > Schedule(uint16_t availableSymbols, WimaxPhy::ModulationType modulationType, MacHeaderType::HeaderType packetType, Ptr< WimaxConnection > &connection)
Definition: ss-scheduler.cc:78
static TypeId GetTypeId()
Get the type ID.
Definition: ss-scheduler.cc:43
Ptr< SubscriberStationNetDevice > m_ss
the subscriber station
Definition: ss-scheduler.h:93
void SetPollMe(bool pollMe)
Set poll me value.
Definition: ss-scheduler.cc:66
Ptr< WimaxConnection > SelectConnection()
Select connection.
bool GetPollMe() const
Get the poll me value.
Definition: ss-scheduler.cc:72
~SSScheduler() override
Definition: ss-scheduler.cc:55
a unique identifier for an interface.
Definition: type-id.h:59
ModulationType
ModulationType enumeration.
Definition: wimax-phy.h:54
Every class exported by the ns3 library is enclosed in the ns3 namespace.