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 "ns3/channel.h"
25
#include "
yans-wifi-phy.h
"
26
27
namespace
ns3
{
28
29
class
NetDevice;
30
class
PropagationLossModel;
31
class
PropagationDelayModel;
32
42
class
YansWifiChannel
:
public
Channel
43
{
44
public
:
49
static
TypeId
GetTypeId
(
void
);
50
51
YansWifiChannel
();
52
virtual
~YansWifiChannel
();
53
54
//inherited from Channel.
55
virtual
uint32_t
GetNDevices
(
void
)
const
;
56
virtual
Ptr<NetDevice>
GetDevice
(uint32_t i)
const
;
57
63
void
Add
(
Ptr<YansWifiPhy>
phy
);
64
68
void
SetPropagationLossModel
(
const
Ptr<PropagationLossModel>
loss);
72
void
SetPropagationDelayModel
(
const
Ptr<PropagationDelayModel>
delay);
73
85
void
Send
(
Ptr<YansWifiPhy>
sender,
Ptr<const Packet>
packet,
double
txPowerDbm,
Time
duration)
const
;
86
96
int64_t
AssignStreams
(int64_t stream);
97
98
99
private
:
103
typedef
std::vector<Ptr<YansWifiPhy> >
PhyList
;
104
115
static
void
Receive
(
Ptr<YansWifiPhy>
receiver,
Ptr<Packet>
packet,
double
txPowerDbm,
Time
duration);
116
117
PhyList
m_phyList
;
118
Ptr<PropagationLossModel>
m_loss
;
119
Ptr<PropagationDelayModel>
m_delay
;
120
};
121
122
}
//namespace ns3
123
124
#endif
/* YANS_WIFI_CHANNEL_H */
ns3::YansWifiChannel::m_delay
Ptr< PropagationDelayModel > m_delay
Propagation delay model.
Definition:
yans-wifi-channel.h:119
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:102
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:73
ns3::YansWifiChannel::SetPropagationLossModel
void SetPropagationLossModel(const Ptr< PropagationLossModel > loss)
Definition:
yans-wifi-channel.cc:66
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:146
ns3::Channel
Abstract Channel Base Class.
Definition:
channel.h:43
yans-wifi-phy.h
ns3::YansWifiChannel::Send
void Send(Ptr< YansWifiPhy > sender, Ptr< const Packet > packet, double txPowerDbm, Time duration) const
Definition:
yans-wifi-channel.cc:80
ns3::YansWifiChannel::YansWifiChannel
YansWifiChannel()
Definition:
yans-wifi-channel.cc:54
ns3::YansWifiChannel::GetDevice
virtual Ptr< NetDevice > GetDevice(uint32_t i) const
Definition:
yans-wifi-channel.cc:133
ns3::YansWifiChannel::SetPropagationDelayModel
void SetPropagationDelayModel(const Ptr< PropagationDelayModel > delay)
Definition:
yans-wifi-channel.cc:73
ns3::YansWifiChannel::~YansWifiChannel
virtual ~YansWifiChannel()
Definition:
yans-wifi-channel.cc:59
third.phy
tuple phy
Definition:
third.py:86
ns3::YansWifiChannel::GetNDevices
virtual uint32_t GetNDevices(void) const
Definition:
yans-wifi-channel.cc:127
ns3::YansWifiChannel::m_loss
Ptr< PropagationLossModel > m_loss
Propagation loss model.
Definition:
yans-wifi-channel.h:118
ns3::YansWifiChannel::Receive
static void Receive(Ptr< YansWifiPhy > receiver, Ptr< Packet > packet, double txPowerDbm, Time duration)
This method is scheduled by Send for each associated YansWifiPhy.
Definition:
yans-wifi-channel.cc:120
ns3::YansWifiChannel::m_phyList
PhyList m_phyList
List of YansWifiPhys connected to this YansWifiChannel.
Definition:
yans-wifi-channel.h:117
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::YansWifiChannel::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
yans-wifi-channel.cc:36
ns3::YansWifiChannel::PhyList
std::vector< Ptr< YansWifiPhy > > PhyList
A vector of pointers to YansWifiPhy.
Definition:
yans-wifi-channel.h:103
ns3::YansWifiChannel::Add
void Add(Ptr< YansWifiPhy > phy)
Adds the given YansWifiPhy to the PHY list.
Definition:
yans-wifi-channel.cc:139
ns3::YansWifiChannel
a channel to interconnect ns3::YansWifiPhy objects.
Definition:
yans-wifi-channel.h:42
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
src
wifi
model
yans-wifi-channel.h
Generated on Wed Mar 21 2018 14:24:34 for ns-3 by
1.8.9.1