A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
animation-interface-helper.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* This program is free software; you can redistribute it and/or modify
4
* it under the terms of the GNU General Public License version 2 as
5
* published by the Free Software Foundation;
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software
14
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15
*
16
* Author: John Abraham <john.abraham@gatech.edu>
17
*/
18
19
// Animation Interface helpers
20
21
#ifndef _ANIMATION_INTERFACE_HELPER_H_
22
#define _ANIMATION_INTERFACE_HELPER_H_
23
24
#include "ns3/node.h"
25
#include "ns3/mobility-model.h"
26
#include "ns3/packet.h"
27
#include "ns3/simulator.h"
28
#include <vector>
29
#include <map>
30
31
namespace
ns3 {
32
33
47
class
AnimRxInfo
48
{
49
public
:
50
55
AnimRxInfo
() {};
56
64
AnimRxInfo
(
const
Time
& fbRx,
Ptr <const NetDevice>
nd ,
double
rxRange
)
65
:
m_fbRx
(fbRx.GetSeconds ()),
m_lbRx
(0),
m_rxnd
(nd), rxRange (rxRange),
m_PhyRxComplete
(false){}
66
72
double
m_fbRx
;
73
79
double
m_lbRx
;
80
86
Ptr <const NetDevice>
m_rxnd
;
87
93
double
rxRange
;
94
100
bool
IsPhyRxComplete
();
101
106
void
SetPhyRxComplete
();
107
108
private
:
109
bool
m_PhyRxComplete
;
110
111
};
112
128
class
AnimPacketInfo
129
130
{
131
public
:
132
137
AnimPacketInfo
();
138
148
AnimPacketInfo
(
Ptr <const NetDevice>
tx_nd,
const
Time
& fbTx,
const
Time
& lbTx,
Vector
txLoc, uint32_t txNodeId = 0);
149
155
Ptr <const NetDevice>
m_txnd
;
156
162
uint32_t
m_txNodeId
;
163
169
double
m_fbTx
;
170
176
double
m_lbTx
;
177
183
Vector
m_txLoc
;
184
185
191
std::map<uint32_t,AnimRxInfo>
m_rx
;
192
199
void
ProcessRxBegin
(
Ptr <const NetDevice>
nd,
const
Time
& fbRx);
200
209
bool
ProcessRxEnd
(
Ptr <const NetDevice>
nd,
const
Time
& fbRx,
Vector
rxLoc);
210
216
void
ProcessRxDrop
(
Ptr <const NetDevice>
nd);
217
224
AnimRxInfo
GetRxInfo
(
Ptr <const NetDevice>
nd);
225
231
void
RemoveRxInfo
(
Ptr <const NetDevice>
nd);
232
237
double
firstlastbitDelta
;
238
239
};
240
241
}
// namespace ns3
242
243
#endif
ns3::AnimRxInfo::rxRange
double rxRange
Reception range.
Definition:
animation-interface-helper.h:93
ns3::Time
keep track of time values and allow control of global simulation resolution
Definition:
nstime.h:81
ns3::Ptr
smart pointer class similar to boost::intrusive_ptr
Definition:
ptr.h:59
ns3::AnimPacketInfo::GetRxInfo
AnimRxInfo GetRxInfo(Ptr< const NetDevice > nd)
GetRxInfo.
Definition:
animation-interface-helper.cc:70
ns3::AnimPacketInfo::RemoveRxInfo
void RemoveRxInfo(Ptr< const NetDevice > nd)
RemoveRxInfo.
Definition:
animation-interface-helper.cc:77
ns3::AnimRxInfo
AnimRxInfo helper class.
Definition:
animation-interface-helper.h:47
ns3::AnimPacketInfo::m_txLoc
Vector m_txLoc
Transmitter's location.
Definition:
animation-interface-helper.h:183
ns3::AnimPacketInfo::ProcessRxEnd
bool ProcessRxEnd(Ptr< const NetDevice > nd, const Time &fbRx, Vector rxLoc)
Process RxEnd notifications.
Definition:
animation-interface-helper.cc:49
ns3::Vector3D
a 3d vector
Definition:
vector.h:31
ns3::AnimPacketInfo::ProcessRxBegin
void ProcessRxBegin(Ptr< const NetDevice > nd, const Time &fbRx)
Process RxBegin notifications.
Definition:
animation-interface-helper.cc:44
ns3::AnimPacketInfo::ProcessRxDrop
void ProcessRxDrop(Ptr< const NetDevice > nd)
Process RxDrop notifications.
Definition:
animation-interface-helper.cc:83
ns3::AnimRxInfo::m_PhyRxComplete
bool m_PhyRxComplete
Definition:
animation-interface-helper.h:109
ns3::AnimRxInfo::m_rxnd
Ptr< const NetDevice > m_rxnd
Ptr to receiving NetDevice.
Definition:
animation-interface-helper.h:86
ns3::AnimRxInfo::m_fbRx
double m_fbRx
First bit receive time.
Definition:
animation-interface-helper.h:72
ns3::AnimPacketInfo::firstlastbitDelta
double firstlastbitDelta
Time delta between First bit Rx and Last bit Rx.
Definition:
animation-interface-helper.h:237
ns3::AnimPacketInfo::m_lbTx
double m_lbTx
Last bit transmission time.
Definition:
animation-interface-helper.h:176
ns3::AnimPacketInfo::m_txNodeId
uint32_t m_txNodeId
Tx Node Id if NetDevice is unknown.
Definition:
animation-interface-helper.h:162
ns3::AnimRxInfo::m_lbRx
double m_lbRx
Last bit receive time.
Definition:
animation-interface-helper.h:79
ns3::AnimRxInfo::IsPhyRxComplete
bool IsPhyRxComplete()
Check if Wifi Phy Rx is Complete.
Definition:
animation-interface-helper.cc:87
ns3::AnimPacketInfo::m_rx
std::map< uint32_t, AnimRxInfo > m_rx
Collection of receivers.
Definition:
animation-interface-helper.h:191
ns3::AnimPacketInfo::m_txnd
Ptr< const NetDevice > m_txnd
Ptr to NetDevice that is transmitting.
Definition:
animation-interface-helper.h:155
ns3::AnimPacketInfo::AnimPacketInfo
AnimPacketInfo()
Default constructor.
Definition:
animation-interface-helper.cc:29
ns3::AnimPacketInfo::m_fbTx
double m_fbTx
First bit transmission time.
Definition:
animation-interface-helper.h:169
ns3::AnimRxInfo::AnimRxInfo
AnimRxInfo(const Time &fbRx, Ptr< const NetDevice > nd, double rxRange)
Constructor.
Definition:
animation-interface-helper.h:64
ns3::AnimRxInfo::SetPhyRxComplete
void SetPhyRxComplete()
Set Wifi Phy Rx Complete.
Definition:
animation-interface-helper.cc:92
ns3::AnimRxInfo::AnimRxInfo
AnimRxInfo()
Default constructor.
Definition:
animation-interface-helper.h:55
ns3::AnimPacketInfo
AnimPacketInfo helper class.
Definition:
animation-interface-helper.h:128
src
netanim
helper
animation-interface-helper.h
Generated on Sat Apr 19 2014 14:07:04 for ns-3 by
1.8.6