WorldUtilityStats.h

00001 //
00002 // This program is free software: you can redistribute it and/or modify
00003 // it under the terms of the GNU Lesser General Public License as published by
00004 // the Free Software Foundation, either version 3 of the License, or
00005 // (at your option) any later version.
00006 //
00007 // This program is distributed in the hope that it will be useful,
00008 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 // GNU Lesser General Public License for more details.
00011 //
00012 // You should have received a copy of the GNU Lesser General Public License
00013 // along with this program.  If not, see http://www.gnu.org/licenses/.
00014 //
00015 
00016 #ifndef __WORLDUTILITYSTATS_H__
00017 #define __WORLDUTILITYSTATS_H__
00018 
00019 #include <omnetpp.h>
00020 #include <BaseWorldUtility.h>
00021 
00028 class WorldUtilityStats : public BaseWorldUtility,
00029               public ImNotifiable
00030 {
00031 protected:
00033   int catPacket;
00034 
00036   double bitsSent;
00038   double bitsReceived;
00039 
00040   cOutVector sent;
00041   cOutVector rcvd;
00042 
00043   bool recordVectors;
00044 
00045   double bitrate;
00046 
00047 protected:
00048     virtual void initialize(int stage);
00049 
00050 public:
00051   virtual void receiveBBItem(int category, const BBItem *details, int scopeModuleId);
00052 
00053   virtual void finish();
00054 };
00055 
00056 #endif