A Discrete-Event Network Simulator
API
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
26namespace ns3 {
27
28class NetDevice;
29class PropagationLossModel;
30class PropagationDelayModel;
31class YansWifiPhy;
32class Packet;
33class Time;
34class WifiPpdu;
35
46{
47public:
52 static TypeId GetTypeId (void);
53
55 virtual ~YansWifiChannel ();
56
57 std::size_t GetNDevices (void) const override;
58 Ptr<NetDevice> GetDevice (std::size_t i) const override;
59
66
75
86 void Send (Ptr<YansWifiPhy> sender, Ptr<const WifiPpdu> ppdu, double txPowerDbm) const;
87
97 int64_t AssignStreams (int64_t stream);
98
99
100private:
104 typedef std::vector<Ptr<YansWifiPhy> > PhyList;
105
115 static void Receive (Ptr<YansWifiPhy> receiver, Ptr<WifiPpdu> ppdu, double txPowerDbm);
116
120};
121
122} //namespace ns3
123
124#endif /* YANS_WIFI_CHANNEL_H */
Abstract Channel Base Class.
Definition: channel.h:44
a unique identifier for an interface.
Definition: type-id.h:59
a channel to interconnect ns3::YansWifiPhy objects.
void SetPropagationLossModel(const Ptr< PropagationLossModel > loss)
Ptr< PropagationDelayModel > m_delay
Propagation delay model.
std::vector< Ptr< YansWifiPhy > > PhyList
A vector of pointers to YansWifiPhy.
void Send(Ptr< YansWifiPhy > sender, Ptr< const WifiPpdu > ppdu, double txPowerDbm) const
Ptr< NetDevice > GetDevice(std::size_t i) const override
PhyList m_phyList
List of YansWifiPhys connected to this YansWifiChannel.
Ptr< PropagationLossModel > m_loss
Propagation loss model.
static void Receive(Ptr< YansWifiPhy > receiver, Ptr< WifiPpdu > ppdu, double txPowerDbm)
This method is scheduled by Send for each associated YansWifiPhy.
static TypeId GetTypeId(void)
Get the type ID.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
void SetPropagationDelayModel(const Ptr< PropagationDelayModel > delay)
void Add(Ptr< YansWifiPhy > phy)
Adds the given YansWifiPhy to the PHY list.
std::size_t GetNDevices(void) const override
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition: nstime.h:793
Every class exported by the ns3 library is enclosed in the ns3 namespace.
phy
Definition: third.py:93