22 #ifndef BSM_APPLICATION_H
23 #define BSM_APPLICATION_H
25 #include "ns3/application.h"
26 #include "ns3/wave-bsm-stats.h"
27 #include "ns3/random-variable-stream.h"
28 #include "ns3/internet-stack-helper.h"
72 uint32_t wavePacketSize,
75 std::vector <double> rangesSq,
77 std::vector<int> * nodesMoving,
115 uint32_t pktCount,
Time pktInterval,
116 uint32_t sendingNodeId);
Simulation virtual time values and global simulation resolution.
Smart pointer class similar to boost::intrusive_ptr.
Ipv4InterfaceContainer * m_adhocTxInterfaces
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Ptr< UniformRandomVariable > m_unirv
uint32_t m_wavePacketSize
int64_t AssignStreams(int64_t streamIndex)
Assign a fixed random variable stream number to the random variables used by this model...
void Setup(Ipv4InterfaceContainer &i, int nodeId, Time totalTime, uint32_t wavePacketSize, Time waveInterval, double gpsAccuracyNs, std::vector< double > rangesSq, Ptr< WaveBsmStats > waveBsmStats, std::vector< int > *nodesMoving, int mode, Time txDelay)
Setup BSM generation parameters for a node.
BsmApplication()
Constructor.
std::vector< double > m_txSafetyRangesSq
virtual void StartApplication(void)
Application specific startup code.
uint32_t m_numWavePackets
virtual void DoDispose(void)
Destructor implementation.
virtual ~BsmApplication()
The base class for all ns3 applications.
virtual void StopApplication(void)
Application specific shutdown code.
Ptr< Node > GetNode() const
The BsmApplication class sends and receives the IEEE 1609 WAVE (Wireless Access in Vehicular Environm...
void GenerateWaveTraffic(Ptr< Socket > socket, uint32_t pktSize, uint32_t pktCount, Time pktInterval, uint32_t sendingNodeId)
Creates and transmits a WAVE BSM packet.
Ptr< WaveBsmStats > m_waveBsmStats
void HandleReceivedBsmPacket(Ptr< Node > txNode, Ptr< Node > rxNode)
Handle the receipt of a WAVE BSM packet from sender to receiver.
Ptr< NetDevice > GetNetDevice(int id)
Get the net device for the desired id.
static int wavePort
(Arbitrary) port number that is used to create a socket for transmitting WAVE BSMs.
std::vector< int > * m_nodesMoving
void ReceiveWavePacket(Ptr< Socket > socket)
Receive a WAVE BSM packet.
static TypeId GetTypeId(void)
a unique identifier for an interface.