A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
yans-wifi-channel.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2006,2007 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: Mathieu Lacage, <mathieu.lacage@sophia.inria.fr>
19
*/
20
21
#ifndef YANS_WIFI_CHANNEL_H
22
#define YANS_WIFI_CHANNEL_H
23
24
#include <vector>
25
#include <stdint.h>
26
#include "ns3/packet.h"
27
#include "
wifi-channel.h
"
28
#include "
wifi-mode.h
"
29
#include "
wifi-preamble.h
"
30
#include "
wifi-tx-vector.h
"
31
#include "
yans-wifi-phy.h
"
32
#include "ns3/nstime.h"
33
34
namespace
ns3
{
35
36
class
NetDevice;
37
class
PropagationLossModel;
38
class
PropagationDelayModel;
39
40
struct
Parameters
41
{
42
double
rxPowerDbm
;
43
struct
mpduInfo
aMpdu
;
44
Time
duration
;
45
WifiTxVector
txVector
;
46
WifiPreamble
preamble
;
47
};
48
61
class
YansWifiChannel
:
public
WifiChannel
62
{
63
public
:
64
static
TypeId
GetTypeId
(
void
);
65
66
YansWifiChannel
();
67
virtual
~YansWifiChannel
();
68
69
//inherited from Channel.
70
virtual
uint32_t
GetNDevices
(
void
)
const
;
71
virtual
Ptr<NetDevice>
GetDevice
(uint32_t i)
const
;
72
78
void
Add
(
Ptr<YansWifiPhy>
phy
);
79
83
void
SetPropagationLossModel
(
Ptr<PropagationLossModel>
loss);
87
void
SetPropagationDelayModel
(
Ptr<PropagationDelayModel>
delay);
88
104
void
Send
(
Ptr<YansWifiPhy>
sender,
Ptr<const Packet>
packet,
double
txPowerDbm,
105
WifiTxVector
txVector,
WifiPreamble
preamble,
struct
mpduInfo
aMpdu,
Time
duration)
const
;
106
116
int64_t
AssignStreams
(int64_t stream);
117
118
119
private
:
123
typedef
std::vector<Ptr<YansWifiPhy> >
PhyList
;
124
136
void
Receive
(uint32_t i,
Ptr<Packet>
packet,
struct
Parameters
parameters)
const
;
137
138
PhyList
m_phyList
;
139
Ptr<PropagationLossModel>
m_loss
;
140
Ptr<PropagationDelayModel>
m_delay
;
141
};
142
143
}
//namespace ns3
144
145
#endif
/* YANS_WIFI_CHANNEL_H */
ns3::YansWifiChannel::m_delay
Ptr< PropagationDelayModel > m_delay
Propagation delay model.
Definition:
yans-wifi-channel.h:140
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:102
wifi-preamble.h
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:73
ns3::WifiTxVector
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
Definition:
wifi-tx-vector.h:61
ns3::YansWifiChannel::Receive
void Receive(uint32_t i, Ptr< Packet > packet, struct Parameters parameters) const
This method is scheduled by Send for each associated YansWifiPhy.
Definition:
yans-wifi-channel.cc:129
ns3::YansWifiChannel::AssignStreams
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
Definition:
yans-wifi-channel.cc:153
wifi-mode.h
ns3::YansWifiChannel::SetPropagationLossModel
void SetPropagationLossModel(Ptr< PropagationLossModel > loss)
Definition:
yans-wifi-channel.cc:69
ns3::YansWifiChannel::SetPropagationDelayModel
void SetPropagationDelayModel(Ptr< PropagationDelayModel > delay)
Definition:
yans-wifi-channel.cc:75
yans-wifi-phy.h
wifi-channel.h
ns3::YansWifiChannel::YansWifiChannel
YansWifiChannel()
Definition:
yans-wifi-channel.cc:58
ns3::Parameters::duration
Time duration
Definition:
yans-wifi-channel.h:44
ns3::WifiPreamble
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
Definition:
wifi-preamble.h:30
ns3::YansWifiChannel::GetDevice
virtual Ptr< NetDevice > GetDevice(uint32_t i) const
Definition:
yans-wifi-channel.cc:141
ns3::YansWifiChannel::~YansWifiChannel
virtual ~YansWifiChannel()
Definition:
yans-wifi-channel.cc:62
third.phy
tuple phy
Definition:
third.py:86
ns3::mpduInfo
Definition:
wifi-phy.h:48
ns3::Parameters::rxPowerDbm
double rxPowerDbm
Definition:
yans-wifi-channel.h:42
ns3::YansWifiChannel::GetNDevices
virtual uint32_t GetNDevices(void) const
Definition:
yans-wifi-channel.cc:135
ns3::YansWifiChannel::m_loss
Ptr< PropagationLossModel > m_loss
Propagation loss model.
Definition:
yans-wifi-channel.h:139
ns3::Parameters::aMpdu
struct mpduInfo aMpdu
Definition:
yans-wifi-channel.h:43
ns3::YansWifiChannel::m_phyList
PhyList m_phyList
List of YansWifiPhys connected to this YansWifiChannel.
Definition:
yans-wifi-channel.h:138
ns3::Parameters
Definition:
yans-wifi-channel.h:40
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::YansWifiChannel::GetTypeId
static TypeId GetTypeId(void)
Definition:
yans-wifi-channel.cc:40
ns3::YansWifiChannel::PhyList
std::vector< Ptr< YansWifiPhy > > PhyList
A vector of pointers to YansWifiPhy.
Definition:
yans-wifi-channel.h:123
ns3::Parameters::preamble
WifiPreamble preamble
Definition:
yans-wifi-channel.h:46
ns3::WifiChannel
Wifi Channel interface specificationThis class works in tandem with the ns3::WifiPhy class...
Definition:
wifi-channel.h:43
ns3::YansWifiChannel::Send
void Send(Ptr< YansWifiPhy > sender, Ptr< const Packet > packet, double txPowerDbm, WifiTxVector txVector, WifiPreamble preamble, struct mpduInfo aMpdu, Time duration) const
Definition:
yans-wifi-channel.cc:81
wifi-tx-vector.h
ns3::Parameters::txVector
WifiTxVector txVector
Definition:
yans-wifi-channel.h:45
ns3::YansWifiChannel::Add
void Add(Ptr< YansWifiPhy > phy)
Adds the given YansWifiPhy to the PHY list.
Definition:
yans-wifi-channel.cc:147
ns3::YansWifiChannel
A Yans wifi channelThis wifi channel implements the propagation model described in "Yet Another Netwo...
Definition:
yans-wifi-channel.h:61
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
src
wifi
model
yans-wifi-channel.h
Generated on Thu Jan 28 2016 11:05:41 for ns-3 by
1.8.9.1