This file is indexed.

/usr/include/ns3.27/ns3/tv-spectrum-transmitter.h is in libns3-dev 3.27+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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 * Copyright (c) 2014 University of Washington
 *
 * 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
 *
 * Author: Benjamin Cizdziel <ben.cizdziel@gmail.com>
 */

#ifndef TV_SPECTRUM_TRANSMITTER_H
#define TV_SPECTRUM_TRANSMITTER_H

#include <ns3/spectrum-value.h>
#include <ns3/spectrum-phy.h>
#include <ns3/spectrum-channel.h>
#include <ns3/antenna-model.h>
#include <ns3/spectrum-signal-parameters.h>
#include <ns3/mobility-model.h>
#include <ns3/net-device.h>

namespace ns3
{


/**
 * \ingroup spectrum
 *
 * SpectrumPhy implementation that creates a customizable TV transmitter which
 * transmits a PSD spectrum specified by user-set attributes.
 *
 *
 * This PHY model supports a single antenna model instance which is
 * used for transmission (this PHY model never receives).
 */
class TvSpectrumTransmitter : public SpectrumPhy
{

public:
  /** 
   * types of TV transmitters: analog, digital 8-VSB, or digital COFDM
   */
  enum TvType
  {
    TVTYPE_ANALOG,
    TVTYPE_8VSB,
    TVTYPE_COFDM
  };
  
  TvSpectrumTransmitter ();
  virtual ~TvSpectrumTransmitter ();
  
  /**
   * Register this type.
   * \return The object TypeId.
   */
  static TypeId GetTypeId (void);

  // inherited from SpectrumPhy
  void SetChannel (Ptr<SpectrumChannel> c);
  void SetMobility (Ptr<MobilityModel> m);
  void SetDevice (Ptr<NetDevice> d);
  Ptr<MobilityModel> GetMobility ();
  Ptr<NetDevice> GetDevice () const;
  // device does not use Rx but these pure virtual methods must be implemented
  Ptr<const SpectrumModel> GetRxSpectrumModel () const;
  Ptr<AntennaModel> GetRxAntenna ();
  void StartRx (Ptr<SpectrumSignalParameters> params);

  /** 
   * Get the spectrum channel
   * 
   * @return a pointer to the assigned spectrum channel
   */
  Ptr<SpectrumChannel> GetChannel () const;

  /** 
   * Creates power spectral density (PSD) spectrum of the TV transmitter and
   * sets it for transmission.
   * Before calling this method, must set attributes and parameters that are 
   * applicable to your transmitter.
   * 
   * 8-VSB PSD approximated from Figure 3 of the following article:
   * Baron, Stanley. "First-Hand:Digital Television: The Digital Terrestrial 
   * Television Broadcasting (DTTB) Standard." IEEE Global History Network.
   * <http://www.ieeeghn.org/wiki/index.php/First-Hand:Digital_Television:_The_
   * Digital_Terrestrial_Television_Broadcasting_(DTTB)_Standard>.
   *
   * COFDM PSD approximated from Figure 12 (8k mode) of the following article:
   * Kopp, Carlo. "High Definition Television." High Definition Television. Air 
   * Power Australia. <http://www.ausairpower.net/AC-1100.html>.
   *
   * Analog PSD approximated from Figure 4 of the following paper:
   * Stephen Shellhammer, Ahmed Sadek, and Wenyi Zhang. "Technical Challenges 
   * for Cognitive Radio in the TV White Space Spectrum." Qualcomm Incorporated.
   *
   *
   * @return a pointer to the power spectral density of the TV transmitter
   */
  virtual void CreateTvPsd ();

  /** 
   * Get the power spectral density of the TV transmitter's signal
   * 
   * @return a pointer to the PSD
   */  
  Ptr<SpectrumValue> GetTxPsd () const;

  /** 
   * Starts the TV Transmitter's transmission on the spectrum channel
   */
  virtual void Start ();

  /** 
   * Stops the TV Transmitter's transmission on the spectrum channel
   */
  virtual void Stop ();


private:
  Ptr<MobilityModel> m_mobility; //!< Pointer to mobility model object
  Ptr<AntennaModel> m_antenna; //!< Pointer to antenna model object
  Ptr<NetDevice> m_netDevice; //!< Pointer to net device object
  Ptr<SpectrumChannel> m_channel; //!< Pointer to spectrum channel object

  /** Sets up signal to be transmitted */
  virtual void SetupTx ();

  enum TvType m_tvType; //!< Type of TV transmitter
  double m_startFrequency; //!< Start frequency (in Hz) of TV transmitter's signal
  double m_channelBandwidth; //!< Bandwidth (in Hz) of TV transmitter's signal
  double m_basePsd; //!< Base power spectral density value (in dBm/Hz) of TV transmitter's signal
  Ptr<SpectrumValue> m_txPsd; //!< Pointer to power spectral density of TV transmitter's signal
  Time m_startingTime; //!< Timepoint after simulation begins that TV transmitter will begin transmitting
  Time m_transmitDuration; //!< Length of time that TV transmitter will transmit for
  bool m_active; //!< True if TV transmitter is transmitting

};

} // namespace ns3

#endif /* TV_SPECTRUM_TRANSMITTER_H */