A Discrete-Event Network Simulator
API
ofdm-downlink-frame-prefix.h
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2007,2008 INRIA
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 * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
19 */
20
21#ifndef DL_FRAME_PREFIX_IE_H
22#define DL_FRAME_PREFIX_IE_H
23
24#include <stdint.h>
25#include "ns3/header.h"
26
27namespace ns3 {
28
35{
36public:
39
44 void SetRateId (uint8_t rateId);
49 void SetDiuc (uint8_t diuc);
54 void SetPreamblePresent (uint8_t preamblePresent);
59 void SetLength (uint16_t length);
64 void SetStartTime (uint16_t startTime);
65
70 uint8_t GetRateId (void) const;
75 uint8_t GetDiuc (void) const;
80 uint8_t GetPreamblePresent (void) const;
85 uint16_t GetLength (void) const;
90 uint16_t GetStartTime (void) const;
91
96 uint16_t GetSize (void) const;
97
110private:
111 uint8_t m_rateId;
112 uint8_t m_diuc;
114 uint16_t m_length;
115 uint16_t m_startTime;
116
117 // shall actually contain m_startTime if DIUC is 0. see Table 225, page 452
118
119};
120
121} // namespace ns3
122
123#endif /* DL_FRAME_PREFIX_IE_H */
124
125#ifndef OFDM_DOWNLINK_FRAME_PREFIX_H
126#define OFDM_DOWNLINK_FRAME_PREFIX_H
127
128#include <stdint.h>
129#include "ns3/header.h"
130#include "ns3/mac48-address.h"
131
132namespace ns3 {
133
138{
139public:
142
147 static TypeId GetTypeId (void);
148
153 void SetBaseStationId (Mac48Address baseStationId);
158 void SetFrameNumber (uint32_t frameNumber);
163 void SetConfigurationChangeCount (uint8_t configurationChangeCount);
168 void AddDlFramePrefixElement (DlFramePrefixIe dlFramePrefixElement);
173 void SetHcs (uint8_t hcs);
174
179 Mac48Address GetBaseStationId (void) const;
184 uint32_t GetFrameNumber (void) const;
189 uint8_t GetConfigurationChangeCount (void) const;
194 std::vector<DlFramePrefixIe> GetDlFramePrefixElements (void) const;
199 uint8_t GetHcs (void) const;
200
205 std::string GetName (void) const;
206 void Print (std::ostream &os) const;
207 uint32_t GetSerializedSize (void) const;
208 void Serialize (Buffer::Iterator start) const;
210private:
214 std::vector<DlFramePrefixIe> m_dlFramePrefixElements;
215 uint8_t m_hcs;
216};
217
218} // namespace ns3
219
220#endif /* OFDM_DOWNLINK_FRAME_PREFIX_H */
iterator in a Buffer instance
Definition: buffer.h:99
This class implements the DL Frame Prefix IE as described by IEEE-802.16 standard.
uint8_t GetPreamblePresent(void) const
Get preamble present field.
uint8_t m_preamblePresent
preamble present
uint16_t GetSize(void) const
Get size field.
void SetStartTime(uint16_t startTime)
Set start time field.
uint16_t GetLength(void) const
Get length 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.
uint8_t GetDiuc(void) const
Get DIUC field.
uint8_t GetRateId(void) const
Get rate ID field.
Buffer::Iterator Write(Buffer::Iterator start) const
Write item function.
void SetRateId(uint8_t rateId)
Set rate ID field.
uint16_t GetStartTime(void) const
Get start time field.
Protocol header serialization and deserialization.
Definition: header.h:43
an EUI-48 address
Definition: mac48-address.h:44
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
def start()
Definition: core.py:1853