A Discrete-Event Network Simulator
API
packet-data-calculators.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2008 Drexel 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: Joe Kopena (tjkopena@cs.drexel.edu)
19  */
20 
21 #include "ns3/log.h"
22 #include "ns3/packet.h"
23 #include "ns3/mac48-address.h"
24 
25 #include "ns3/basic-data-calculators.h"
27 
28 using namespace ns3;
29 
30 NS_LOG_COMPONENT_DEFINE ("PacketDataCalculators");
31 
32 //--------------------------------------------------------------
33 //----------------------------------------------
35 {
37 }
38 
40 {
42 }
43 void
45 {
47 
49  // PacketCounterCalculator::DoDispose
50 }
51 
52 void
54  Ptr<const Packet> packet)
55 {
57 
59 
60  // PacketCounterCalculator::Update
61 }
62 void
64  Ptr<const Packet> packet,
65  Mac48Address realto)
66 {
68 
70 
71  // PacketCounterCalculator::Update
72 }
73 
74 
75 
76 
77 //--------------------------------------------------------------
78 //----------------------------------------------
80 {
82 }
83 
85 {
87 }
88 void
90 {
92 
94  // end PacketSizeMinMaxAvgTotalCalculator::DoDispose
95 }
96 
97 void
99  Ptr<const Packet> packet)
100 {
102 
104 
105  // end PacketSizeMinMaxAvgTotalCalculator::Update
106 }
107 void
109  Ptr<const Packet> packet,
110  Mac48Address realto)
111 {
113 
115 
116  // end PacketSizeMinMaxAvgTotalCalculator::Update
117 }
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:201
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Definition: packet.h:766
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
void PacketUpdate(std::string path, Ptr< const Packet > packet)
Increments the packet stats by the size of the packet.
virtual void DoDispose(void)
Destructor implementation.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void DoDispose(void)
Destructor implementation.
void PacketUpdate(std::string path, Ptr< const Packet > packet)
Increments the packet counter by one.
an EUI-48 address
Definition: mac48-address.h:43
void FrameUpdate(std::string path, Ptr< const Packet > packet, Mac48Address realto)
Increments the packet stats by the size of the packet.
void Update(const T i)
Updates all variables of MinMaxAvgTotalCalculator.
void FrameUpdate(std::string path, Ptr< const Packet > packet, Mac48Address realto)
Increments the packet counter by one.
void Update()
Increments count by 1.
virtual void DoDispose(void)
Destructor implementation.
virtual void DoDispose(void)
Destructor implementation.