A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
bs-scheduler-simple.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007,2008 INRIA
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
7 */
8
9/* BS outbound scheduler as per in Section 6.3.5.1 */
10
11#ifndef BS_SCHEDULER_SIMPLE_H
12#define BS_SCHEDULER_SIMPLE_H
13
14#include "bs-scheduler.h"
15#include "dl-mac-messages.h"
16#include "wimax-phy.h"
17
18#include "ns3/packet-burst.h"
19#include "ns3/packet.h"
20
21#include <list>
22
23namespace ns3
24{
25
26class BaseStationNetDevice;
27class GenericMacHeader;
28class WimaxConnection;
29class Cid;
30
31/**
32 * \ingroup wimax
33 *
34 * BaseStation Scheduler - simplified
35 */
37{
38 public:
40 /**
41 * Constructor
42 *
43 * \param bs base station device
44 */
46 ~BSSchedulerSimple() override;
47
48 /**
49 * \brief Get the type ID.
50 * \return the object TypeId
51 */
52 static TypeId GetTypeId();
53
54 /**
55 * \brief This function returns all the downlink bursts scheduled for the next
56 * downlink sub-frame
57 * \returns all the downlink bursts scheduled for the next downlink sub-frame
58 */
59 std::list<std::pair<OfdmDlMapIe*, Ptr<PacketBurst>>>* GetDownlinkBursts() const override;
60 /**
61 * \brief This function adds a downlink burst to the list of downlink bursts
62 * scheduled for the next downlink sub-frame
63 * \param connection a pointer to connection in which the burst will be sent
64 * \param diuc downlink iuc
65 * \param modulationType the modulation type of the burst
66 * \param burst the downlink burst to add to the downlink sub frame
67 */
69 uint8_t diuc,
70 WimaxPhy::ModulationType modulationType,
71 Ptr<PacketBurst> burst) override;
72
73 /**
74 * \brief the scheduling function for the downlink subframe.
75 */
76 void Schedule() override;
77 /**
78 * \brief Selects a connection from the list of connections having packets to be sent .
79 * \param connection will point to a connection that have packets to be sent
80 * \returns false if no connection has packets to be sent, true otherwise
81 */
82 bool SelectConnection(Ptr<WimaxConnection>& connection) override;
83 /**
84 * \brief Creates a downlink UGS burst
85 * \param serviceFlow the service flow of the burst
86 * \param modulationType the modulation type to be used for the burst
87 * \param availableSymbols maximum number of OFDM symbols to be used by the burst
88 * \returns a Burst (list of packets)
89 */
91 WimaxPhy::ModulationType modulationType,
92 uint32_t availableSymbols) override;
93
94 private:
95 std::list<std::pair<OfdmDlMapIe*, Ptr<PacketBurst>>>* m_downlinkBursts; ///< down link bursts
96};
97
98} // namespace ns3
99
100#endif /* BS_SCHEDULER_SIMPLE_H */
BaseStation Scheduler.
BaseStation Scheduler - simplified.
std::list< std::pair< OfdmDlMapIe *, Ptr< PacketBurst > > > * GetDownlinkBursts() const override
This function returns all the downlink bursts scheduled for the next downlink sub-frame.
void AddDownlinkBurst(Ptr< const WimaxConnection > connection, uint8_t diuc, WimaxPhy::ModulationType modulationType, Ptr< PacketBurst > burst) override
This function adds a downlink burst to the list of downlink bursts scheduled for the next downlink su...
std::list< std::pair< OfdmDlMapIe *, Ptr< PacketBurst > > > * m_downlinkBursts
down link bursts
static TypeId GetTypeId()
Get the type ID.
void Schedule() override
the scheduling function for the downlink subframe.
Ptr< PacketBurst > CreateUgsBurst(ServiceFlow *serviceFlow, WimaxPhy::ModulationType modulationType, uint32_t availableSymbols) override
Creates a downlink UGS burst.
bool SelectConnection(Ptr< WimaxConnection > &connection) override
Selects a connection from the list of connections having packets to be sent .
Smart pointer class similar to boost::intrusive_ptr.
This class implements service flows as described by the IEEE-802.16 standard.
a unique identifier for an interface.
Definition type-id.h:48
ModulationType
ModulationType enumeration.
Definition wimax-phy.h:43
Every class exported by the ns3 library is enclosed in the ns3 namespace.