/usr/include/ns3.26/ns3/yans-wifi-phy.h is in libns3-dev 3.26+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2005,2006 INRIA
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
* Ghada Badawy <gbadawy@gmail.com>
* Sébastien Deronne <sebastien.deronne@gmail.com>
*/
#ifndef YANS_WIFI_PHY_H
#define YANS_WIFI_PHY_H
#include "wifi-phy.h"
namespace ns3 {
class YansWifiChannel;
/**
* \brief 802.11 PHY layer model
* \ingroup wifi
*
* This PHY implements a model of 802.11a. The model
* implemented here is based on the model described
* in "Yet Another Network Simulator",
* (http://cutebugs.net/files/wns2-yans.pdf).
*
*
* This PHY model depends on a channel loss and delay
* model as provided by the ns3::PropagationLossModel
* and ns3::PropagationDelayModel classes, both of which are
* members of the ns3::YansWifiChannel class.
*/
class YansWifiPhy : public WifiPhy
{
public:
static TypeId GetTypeId (void);
YansWifiPhy ();
virtual ~YansWifiPhy ();
/**
* Set the YansWifiChannel this YansWifiPhy is to be connected to.
*
* \param channel the YansWifiChannel this YansWifiPhy is to be connected to
*/
void SetChannel (Ptr<YansWifiChannel> channel);
/**
* Starting receiving the plcp of a packet (i.e. the first bit of the preamble has arrived).
*
* \param packet the arriving packet
* \param rxPowerDbm the receive power in dBm
* \param txVector the TXVECTOR of the arriving packet
* \param preamble the preamble of the arriving packet
* \param mpdutype the type of the MPDU as defined in WifiPhy::mpduType.
* \param rxDuration the duration needed for the reception of the packet
*/
void StartReceivePreambleAndHeader (Ptr<Packet> packet,
double rxPowerDbm,
WifiTxVector txVector,
WifiPreamble preamble,
enum mpduType mpdutype,
Time rxDuration);
/**
* Starting receiving the payload of a packet (i.e. the first bit of the packet has arrived).
*
* \param packet the arriving packet
* \param txVector the TXVECTOR of the arriving packet
* \param preamble the preamble of the arriving packet
* \param mpdutype the type of the MPDU as defined in WifiPhy::mpduType.
* \param event the corresponding event of the first time the packet arrives
*/
void StartReceivePacket (Ptr<Packet> packet,
WifiTxVector txVector,
WifiPreamble preamble,
enum mpduType mpdutype,
Ptr<InterferenceHelper::Event> event);
virtual void SetReceiveOkCallback (WifiPhy::RxOkCallback callback);
virtual void SetReceiveErrorCallback (WifiPhy::RxErrorCallback callback);
virtual void SendPacket (Ptr<const Packet> packet, WifiTxVector txVector, enum WifiPreamble preamble);
virtual void SendPacket (Ptr<const Packet> packet, WifiTxVector txVector, enum WifiPreamble preamble, enum mpduType mpdutype);
virtual void RegisterListener (WifiPhyListener *listener);
virtual void UnregisterListener (WifiPhyListener *listener);
virtual void SetSleepMode (void);
virtual void ResumeFromSleep (void);
virtual Ptr<WifiChannel> GetChannel (void) const;
protected:
// Inherited
virtual void DoDispose (void);
virtual bool DoChannelSwitch (uint16_t id);
virtual bool DoFrequencySwitch (uint32_t frequency);
private:
/**
* The last bit of the packet has arrived.
*
* \param packet the packet that the last bit has arrived
* \param preamble the preamble of the arriving packet
* \param mpdutype the type of the MPDU as defined in WifiPhy::mpduType.
* \param event the corresponding event of the first time the packet arrives
*/
void EndReceive (Ptr<Packet> packet, enum WifiPreamble preamble, enum mpduType mpdutype, Ptr<InterferenceHelper::Event> event);
Ptr<YansWifiChannel> m_channel; //!< YansWifiChannel that this YansWifiPhy is connected to
};
} //namespace ns3
#endif /* YANS_WIFI_PHY_H */
|