00001 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 00002 /* 00003 * Copyright (c) 2008 Drexel University 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License version 2 as 00007 * published by the Free Software Foundation; 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 * 00018 * Author: Joe Kopena (tjkopena@cs.drexel.edu) 00019 */ 00020 00021 #ifndef __PACKET_DATA_CALCULATORS_H__ 00022 #define __PACKET_DATA_CALCULATORS_H__ 00023 00024 #include "ns3/packet.h" 00025 #include "ns3/mac48-address.h" 00026 00027 #include "data-calculator.h" 00028 00029 namespace ns3 { 00030 00031 class PacketCounterCalculator : public CounterCalculator<uint32_t> { 00032 public: 00033 PacketCounterCalculator(); 00034 virtual ~PacketCounterCalculator(); 00035 00036 void PacketUpdate(std::string path, Ptr<const Packet> packet); 00037 void FrameUpdate(std::string path, Ptr<const Packet> packet, 00038 Mac48Address realto); 00039 00040 protected: 00041 virtual void DoDispose(void); 00042 00043 // end class PacketCounterCalculator 00044 }; 00045 00046 00047 class PacketSizeMinMaxAvgTotalCalculator : 00048 public MinMaxAvgTotalCalculator<uint32_t> { 00049 public: 00050 PacketSizeMinMaxAvgTotalCalculator(); 00051 virtual ~PacketSizeMinMaxAvgTotalCalculator(); 00052 00053 void PacketUpdate(std::string path, Ptr<const Packet> packet); 00054 void FrameUpdate(std::string path, Ptr<const Packet> packet, 00055 Mac48Address realto); 00056 00057 protected: 00058 virtual void DoDispose(void); 00059 00060 // end class PacketSizeMinMaxAvgTotalCalculator 00061 }; 00062 00063 00064 // end namespace ns3 00065 }; 00066 00067 00068 #endif // __PACKET_DATA_CALCULATORS_H__