A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
wave-bsm-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2014 North Carolina State University
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Scott E. Carpenter <scarpen@ncsu.edu>
18
*
19
*/
20
21
#ifndef WAVE_BSM_HELPER_H
22
#define WAVE_BSM_HELPER_H
23
24
#include "ns3/application-container.h"
25
#include "ns3/bsm-application.h"
26
#include "ns3/internet-stack-helper.h"
27
#include "ns3/mobility-model.h"
28
#include "ns3/nstime.h"
29
#include "ns3/object-factory.h"
30
#include "ns3/wave-bsm-stats.h"
31
32
#include <vector>
33
34
namespace
ns3
35
{
45
class
WaveBsmHelper
46
{
47
public
:
51
WaveBsmHelper
();
52
59
void
SetAttribute
(std::string name,
const
AttributeValue
&
value
);
60
69
ApplicationContainer
Install
(
Ipv4InterfaceContainer
i)
const
;
70
78
ApplicationContainer
Install
(
Ptr<Node>
node)
const
;
79
96
void
Install
(
Ipv4InterfaceContainer
& i,
97
Time
totalTime,
// seconds
98
uint32_t wavePacketSize,
// bytes
99
Time
waveInterval,
// seconds
100
double
gpsAccuracyNs,
// clock drift range in number of ns
101
std::vector<double> ranges,
// m
102
int
chAccessMode,
// channel access mode (0=continuous; 1=switching)
103
Time
txMaxDelay);
// max delay prior to transmit
104
109
Ptr<WaveBsmStats>
GetWaveBsmStats
();
110
122
int64_t
AssignStreams
(
NodeContainer
c, int64_t stream);
123
128
static
std::vector<int>&
GetNodesMoving
();
129
130
private
:
137
Ptr<Application>
InstallPriv
(
Ptr<Node>
node)
const
;
138
139
ObjectFactory
m_factory
;
140
WaveBsmStats
m_waveBsmStats
;
142
std::vector<double>
m_txSafetyRangesSq
;
143
static
std::vector<int>
nodesMoving
;
144
};
145
146
}
// namespace ns3
147
148
#endif
/* WAVE_BSM_HELPER_H*/
ns3::ApplicationContainer
holds a vector of ns3::Application pointers.
Definition:
application-container.h:44
ns3::AttributeValue
Hold a value for an Attribute.
Definition:
attribute.h:70
ns3::Ipv4InterfaceContainer
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Definition:
ipv4-interface-container.h:56
ns3::NodeContainer
keep track of a set of node pointers.
Definition:
node-container.h:40
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition:
object-factory.h:48
ns3::Ptr< Node >
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3::WaveBsmHelper
The WaveBsmHelper class manages IEEE 1609 WAVE (Wireless Access in Vehicular Environments) Basic Safe...
Definition:
wave-bsm-helper.h:46
ns3::WaveBsmHelper::Install
ApplicationContainer Install(Ipv4InterfaceContainer i) const
Install an ns3::BsmApplication on each node of the input container configured with all the attributes...
Definition:
wave-bsm-helper.cc:63
ns3::WaveBsmHelper::nodesMoving
static std::vector< int > nodesMoving
nodes moving
Definition:
wave-bsm-helper.h:143
ns3::WaveBsmHelper::InstallPriv
Ptr< Application > InstallPriv(Ptr< Node > node) const
Install an ns3::BsmApplication on the node.
Definition:
wave-bsm-helper.cc:78
ns3::WaveBsmHelper::m_txSafetyRangesSq
std::vector< double > m_txSafetyRangesSq
tx safety range squared, for optimization
Definition:
wave-bsm-helper.h:142
ns3::WaveBsmHelper::m_waveBsmStats
WaveBsmStats m_waveBsmStats
wave BSM stats
Definition:
wave-bsm-helper.h:140
ns3::WaveBsmHelper::GetNodesMoving
static std::vector< int > & GetNodesMoving()
Returns the list of moving nove indicators.
Definition:
wave-bsm-helper.cc:160
ns3::WaveBsmHelper::SetAttribute
void SetAttribute(std::string name, const AttributeValue &value)
Helper function used to set the underlying application attributes.
Definition:
wave-bsm-helper.cc:51
ns3::WaveBsmHelper::m_factory
ObjectFactory m_factory
Object factory.
Definition:
wave-bsm-helper.h:139
ns3::WaveBsmHelper::GetWaveBsmStats
Ptr< WaveBsmStats > GetWaveBsmStats()
Returns the WaveBsmStats instance.
Definition:
wave-bsm-helper.cc:134
ns3::WaveBsmHelper::WaveBsmHelper
WaveBsmHelper()
Constructor.
Definition:
wave-bsm-helper.cc:32
ns3::WaveBsmHelper::AssignStreams
int64_t AssignStreams(NodeContainer c, int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
Definition:
wave-bsm-helper.cc:140
ns3::WaveBsmStats
The WaveBsmStats class implements a stats collector for IEEE 1609 WAVE (Wireless Access in Vehicular ...
Definition:
wave-bsm-stats.h:51
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
second.value
value
Definition:
second.py:41
src
wave
helper
wave-bsm-helper.h
Generated on Fri Mar 31 2023 13:30:52 for ns-3 by
1.9.1