A Discrete-Event Network Simulator
API
wave-bsm-helper.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2014 North Carolina State University
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: Scott E. Carpenter <scarpen@ncsu.edu>
19  *
20  */
21 
22 #ifndef WAVE_BSM_HELPER_H
23 #define WAVE_BSM_HELPER_H
24 
25 #include <vector>
26 #include "ns3/wave-bsm-stats.h"
27 #include "ns3/bsm-application.h"
28 #include "ns3/object-factory.h"
29 #include "ns3/application-container.h"
30 #include "ns3/nstime.h"
31 #include "ns3/internet-stack-helper.h"
32 #include "ns3/mobility-model.h"
33 
34 namespace ns3 {
45 {
46 public:
51  WaveBsmHelper ();
52 
59  void SetAttribute (std::string name, const AttributeValue &value);
60 
70 
79 
98  Time totalTime, // seconds
99  uint32_t wavePacketSize, // bytes
100  Time waveInterval, // seconds
101  double gpsAccuracyNs, // clock drift range in number of ns
102  std::vector <double> ranges, // m
103  int chAccessMode, // channel access mode (0=continuous; 1=switching)
104  Time txMaxDelay); // max delay prior to transmit
105 
111 
123  int64_t AssignStreams (NodeContainer c, int64_t stream);
124 
129  static std::vector<int>& GetNodesMoving ();
130 
131 private:
139 
142  std::vector <double> m_txSafetyRangesSq;
144  static std::vector<int> nodesMoving;
145 };
146 
147 } // namespace ns3
148 
149 #endif /* WAVE_BSM_HELPER_H*/
holds a vector of ns3::Application pointers.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Hold a value for an Attribute.
Definition: attribute.h:68
int64_t AssignStreams(NodeContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
The WaveBsmHelper class manages IEEE 1609 WAVE (Wireless Access in Vehicular Environments) Basic Safe...
std::vector< double > m_txSafetyRangesSq
tx safety range squared, for optimization
The WaveBsmStats class implements a stats collector for IEEE 1609 WAVE (Wireless Access in Vehicular ...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
keep track of a set of node pointers.
WaveBsmStats m_waveBsmStats
wave BSM stats
Instantiate subclasses of ns3::Object.
static std::vector< int > & GetNodesMoving()
Returns the list of moving nove indicators.
Ptr< WaveBsmStats > GetWaveBsmStats()
Returns the WaveBsmStats instance.
ObjectFactory m_factory
Object factory.
ApplicationContainer Install(Ipv4InterfaceContainer i) const
Install an ns3::BsmApplication on each node of the input container configured with all the attributes...
void SetAttribute(std::string name, const AttributeValue &value)
Helper function used to set the underlying application attributes.
Ptr< Application > InstallPriv(Ptr< Node > node) const
Install an ns3::BsmApplication on the node.
WaveBsmHelper()
Constructor.
static std::vector< int > nodesMoving
nodes moving