A Discrete-Event Network Simulator
API
ofdm-downlink-frame-prefix.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 #ifndef DL_FRAME_PREFIX_IE_H
21 #define DL_FRAME_PREFIX_IE_H
22 
23 #include "ns3/header.h"
24 
25 #include <stdint.h>
26 
27 namespace ns3
28 {
29 
36 {
37  public:
40 
45  void SetRateId(uint8_t rateId);
50  void SetDiuc(uint8_t diuc);
55  void SetPreamblePresent(uint8_t preamblePresent);
60  void SetLength(uint16_t length);
65  void SetStartTime(uint16_t startTime);
66 
71  uint8_t GetRateId() const;
76  uint8_t GetDiuc() const;
81  uint8_t GetPreamblePresent() const;
86  uint16_t GetLength() const;
91  uint16_t GetStartTime() const;
92 
97  uint16_t GetSize() const;
98 
111 
112  private:
113  uint8_t m_rateId;
114  uint8_t m_diuc;
116  uint16_t m_length;
117  uint16_t m_startTime;
118 
119  // shall actually contain m_startTime if DIUC is 0. see Table 225, page 452
120 };
121 
122 } // namespace ns3
123 
124 #endif /* DL_FRAME_PREFIX_IE_H */
125 
126 #ifndef OFDM_DOWNLINK_FRAME_PREFIX_H
127 #define OFDM_DOWNLINK_FRAME_PREFIX_H
128 
129 #include "ns3/header.h"
130 #include "ns3/mac48-address.h"
131 
132 #include <stdint.h>
133 
134 namespace ns3
135 {
136 
141 {
142  public:
144  ~OfdmDownlinkFramePrefix() override;
145 
150  static TypeId GetTypeId();
151 
156  void SetBaseStationId(Mac48Address baseStationId);
161  void SetFrameNumber(uint32_t frameNumber);
166  void SetConfigurationChangeCount(uint8_t configurationChangeCount);
171  void AddDlFramePrefixElement(DlFramePrefixIe dlFramePrefixElement);
176  void SetHcs(uint8_t hcs);
177 
187  uint32_t GetFrameNumber() const;
192  uint8_t GetConfigurationChangeCount() const;
197  std::vector<DlFramePrefixIe> GetDlFramePrefixElements() const;
202  uint8_t GetHcs() const;
203 
208  std::string GetName() const;
209  void Print(std::ostream& os) const override;
210  uint32_t GetSerializedSize() const override;
211  void Serialize(Buffer::Iterator start) const override;
212  uint32_t Deserialize(Buffer::Iterator start) override;
213 
214  private:
216  uint32_t m_frameNumber;
219  std::vector<DlFramePrefixIe> m_dlFramePrefixElements;
220  uint8_t m_hcs;
221 };
222 
223 } // namespace ns3
224 
225 #endif /* OFDM_DOWNLINK_FRAME_PREFIX_H */
iterator in a Buffer instance
Definition: buffer.h:100
This class implements the DL Frame Prefix IE as described by IEEE-802.16 standard.
uint8_t GetDiuc() const
Get DIUC field.
uint8_t m_preamblePresent
preamble present
uint16_t GetStartTime() const
Get start time field.
uint8_t GetPreamblePresent() const
Get preamble present field.
uint16_t GetLength() const
Get length field.
uint8_t GetRateId() const
Get rate ID field.
void SetStartTime(uint16_t startTime)
Set start time field.
void SetDiuc(uint8_t diuc)
Set DIUC field.
void SetLength(uint16_t length)
Set length field.
Buffer::Iterator Read(Buffer::Iterator start)
Read item function.
void SetPreamblePresent(uint8_t preamblePresent)
Set preamble present field.
Buffer::Iterator Write(Buffer::Iterator start) const
Write item function.
uint16_t GetSize() const
Get size field.
void SetRateId(uint8_t rateId)
Set rate ID field.
Protocol header serialization and deserialization.
Definition: header.h:44
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the object from a buffer iterator.
an EUI-48 address
Definition: mac48-address.h:46
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.