A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
bs-link-manager.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007,2008,2009 INRIA, UDcast
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
7 * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
8 * <amine.ismail@UDcast.com>
9 */
10
11#ifndef LINK_MANAGER_H
12#define LINK_MANAGER_H
13
14#include "bs-net-device.h"
15#include "cid.h"
16#include "mac-messages.h"
17#include "wimax-net-device.h"
18
19#include "ns3/event-id.h"
20
21#include <stdint.h>
22
23namespace ns3
24{
25
26/**
27 * \ingroup wimax
28 *
29 * BaseStation Link Manager
30 */
31class BSLinkManager : public Object
32{
33 public:
34 /**
35 * \brief Get the type ID.
36 * \return the object TypeId
37 */
38 static TypeId GetTypeId();
39 /**
40 * Constructor
41 *
42 * \param bs base station device
43 */
45 ~BSLinkManager() override;
46
47 // Delete copy constructor and assignment operator to avoid misuse
48 BSLinkManager(const BSLinkManager&) = delete;
50
51 /**
52 * \return the ranging opportunities to allocate
53 */
55 /**
56 * \return an available downlink channel
57 */
58 uint64_t SelectDlChannel();
59 /**
60 * \brief process a ranging request message
61 * \param cid the connection identifier in which the ranging message was received
62 * \param rngreq the ranging request message
63 */
64
65 void ProcessRangingRequest(Cid cid, RngReq rngreq);
66 /**
67 * \brief Verifies at the end of an invited ranging interval if SS sent ranging message in it or
68 * not
69 * \param cid the connection identifier in which the ranging message was received
70 * \param uiuc the ranging
71 */
72 void VerifyInvitedRanging(Cid cid, uint8_t uiuc);
73
74 private:
75 /**
76 * Perform ranging function
77 * \param cid the CID
78 * \param rngreq the ranging request
79 */
80 void PerformRanging(Cid cid, RngReq rngreq);
81 /**
82 * Perform initial ranging function
83 * \param cid the CID
84 * \param rngreq the ranging request
85 * \param rngrsp the ranging response
86 */
87 void PerformInitialRanging(Cid cid, RngReq* rngreq, RngRsp* rngrsp);
88 /**
89 * Perform inivted ranging function
90 * \param cid the CID
91 * \param rngrsp the ranging response
92 */
93 void PerformInvitedRanging(Cid cid, RngRsp* rngrsp);
94
95 /**
96 * Set parameters to adjust function
97 * \param rngrsp the ranging response
98 */
99 void SetParametersToAdjust(RngRsp* rngrsp);
100 /**
101 * Abort ranging function
102 * \param cid the CID
103 * \param rngrsp the ranging response
104 * \param ssRecord the SS record
105 * \param isNewSS true if a new SS
106 */
107 void AbortRanging(Cid cid, RngRsp* rngrsp, SSRecord* ssRecord, bool isNewSS);
108 /**
109 * Accept ranging function
110 * \param cid the CID
111 * \param rngrsp the ranging response
112 * \param ssRecord the SS record
113 */
114 void AcceptRanging(Cid cid, RngRsp* rngrsp, SSRecord* ssRecord);
115 /**
116 * Continue ranging function
117 * \param cid the CID
118 * \param rngrsp the ranging response
119 * \param ssRecord the SS record
120 */
121 void ContinueRanging(Cid cid, RngRsp* rngrsp, SSRecord* ssRecord);
122 /**
123 * Schedule range response message function
124 * \param cid the CID
125 * \param rngrsp the ranging response
126 */
127 void ScheduleRngRspMessage(Cid cid, RngRsp* rngrsp);
128 /**
129 * Deallocate CIDs function
130 * \param cid the CID
131 */
132 void DeallocateCids(Cid cid);
133
134 /**
135 * Change DL channel function
136 * \returns true if the DL channel changed
137 */
138 bool ChangeDlChannel();
139 /**
140 * Get new DL channel function
141 * \returns the new DL channel
142 */
144 /**
145 * Get signal quality function
146 * \returns the signal quality
147 */
148 uint8_t GetSignalQuality();
149 /**
150 * Is ranging acceptable function
151 * \returns true if ranging is acceptable
152 */
153 bool IsRangingAcceptable();
154
156
157 // ranging parameters
158 uint32_t m_signalQuality; ///< signal quality
159 uint8_t m_signalQualityThreshold; ///< signal quality threshold
160 int tries; ///< variable to test multiple RNG-REQ by the SS for example undecodable at BS or
161 ///< lost RNG-RSP
162};
163
164} // namespace ns3
165
166#endif /* LINK_MANAGER_H */
Cid class.
Definition cid.h:26
A base class which provides memory management and object aggregation.
Definition object.h:78
Smart pointer class similar to boost::intrusive_ptr.
This class implements the ranging request message described by "IEEE Standard forLocal and metropolit...
This class implements the ranging response message described by "IEEE Standard forLocal and metropoli...
This class is used by the base station to store some information related to subscriber station in the...
Definition ss-record.h:35
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.