A Discrete-Event Network Simulator
API
 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 
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 
87 
93  double rxRange;
94 
100  bool IsPhyRxComplete ();
101 
106  void SetPhyRxComplete ();
107 
108 private:
110 
111 };
112 
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 
156 
162  uint32_t m_txNodeId;
163 
169  double m_fbTx;
170 
176  double m_lbTx;
177 
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 
217 
225 
232 
238 
239 };
240 
241 } // namespace ns3
242 
243 #endif