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
packet-data-calculators.h
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
#ifndef PACKET_DATA_CALCULATORS_H
22
#define PACKET_DATA_CALCULATORS_H
23
24
#include "ns3/packet.h"
25
#include "ns3/mac48-address.h"
26
#include "ns3/data-calculator.h"
27
#include "ns3/basic-data-calculators.h"
28
29
namespace
ns3 {
30
37
class
PacketCounterCalculator
:
public
CounterCalculator
<uint32_t> {
38
public
:
39
PacketCounterCalculator
();
40
virtual
~PacketCounterCalculator
();
41
48
void
PacketUpdate
(std::string path,
Ptr<const Packet>
packet);
49
58
void
FrameUpdate
(std::string path,
Ptr<const Packet>
packet,
59
Mac48Address
realto);
60
61
protected
:
62
virtual
void
DoDispose
(
void
);
63
64
// end class PacketCounterCalculator
65
};
66
67
74
class
PacketSizeMinMaxAvgTotalCalculator
:
75
public
MinMaxAvgTotalCalculator
<uint32_t> {
76
public
:
77
PacketSizeMinMaxAvgTotalCalculator
();
78
virtual
~PacketSizeMinMaxAvgTotalCalculator
();
79
86
void
PacketUpdate
(std::string path,
Ptr<const Packet>
packet);
87
95
void
FrameUpdate
(std::string path,
Ptr<const Packet>
packet,
96
Mac48Address
realto);
97
98
protected
:
99
virtual
void
DoDispose
(
void
);
100
101
// end class PacketSizeMinMaxAvgTotalCalculator
102
};
103
104
105
// end namespace ns3
106
};
107
108
109
#endif
/* PACKET_DATA_CALCULATORS_H */
ns3::Ptr< const Packet >
ns3::PacketSizeMinMaxAvgTotalCalculator::PacketSizeMinMaxAvgTotalCalculator
PacketSizeMinMaxAvgTotalCalculator()
Definition:
packet-data-calculators.cc:80
ns3::PacketCounterCalculator::~PacketCounterCalculator
virtual ~PacketCounterCalculator()
Definition:
packet-data-calculators.cc:40
ns3::PacketSizeMinMaxAvgTotalCalculator::PacketUpdate
void PacketUpdate(std::string path, Ptr< const Packet > packet)
Increments the packet stats by the size of the packet.
Definition:
packet-data-calculators.cc:99
ns3::PacketCounterCalculator::DoDispose
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Definition:
packet-data-calculators.cc:45
ns3::PacketSizeMinMaxAvgTotalCalculator
A stat for collecting packet size statistics: min, max and average.
Definition:
packet-data-calculators.h:74
ns3::PacketCounterCalculator::PacketCounterCalculator
PacketCounterCalculator()
Definition:
packet-data-calculators.cc:35
ns3::MinMaxAvgTotalCalculator
Template class MinMaxAvgTotalCalculator.
Definition:
basic-data-calculators.h:38
ns3::PacketCounterCalculator::PacketUpdate
void PacketUpdate(std::string path, Ptr< const Packet > packet)
Increments the packet counter by one.
Definition:
packet-data-calculators.cc:54
ns3::Mac48Address
an EUI-48 address
Definition:
mac48-address.h:41
ns3::PacketSizeMinMaxAvgTotalCalculator::FrameUpdate
void FrameUpdate(std::string path, Ptr< const Packet > packet, Mac48Address realto)
Increments the packet stats by the size of the packet.
Definition:
packet-data-calculators.cc:109
ns3::PacketCounterCalculator
A stat for counting packets.
Definition:
packet-data-calculators.h:37
ns3::PacketCounterCalculator::FrameUpdate
void FrameUpdate(std::string path, Ptr< const Packet > packet, Mac48Address realto)
Increments the packet counter by one.
Definition:
packet-data-calculators.cc:64
ns3::PacketSizeMinMaxAvgTotalCalculator::~PacketSizeMinMaxAvgTotalCalculator
virtual ~PacketSizeMinMaxAvgTotalCalculator()
Definition:
packet-data-calculators.cc:85
ns3::CounterCalculator
Template class CounterCalculator.
Definition:
basic-data-calculators.h:247
ns3::PacketSizeMinMaxAvgTotalCalculator::DoDispose
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Definition:
packet-data-calculators.cc:90
src
network
utils
packet-data-calculators.h
Generated on Sat Apr 19 2014 14:07:06 for ns-3 by
1.8.6