TestApplication.h

00001 #ifndef TEST_APPLICATION_H
00002 #define TEST_APPLICATION_H
00003 
00004 #include <omnetpp.h>
00005 #include "BaseModule.h"
00006 #include "NetwControlInfo.h"
00007 #include "Signal_.h"
00008 #include "MacPkt_m.h"
00009 #include "ApplPkt_m.h"
00010 #include "AlohaMacLayer.h"
00011 #include "MacToPhyInterface.h"
00012 #include "Mapping.h"
00013 
00014 class TestApplication : public BaseModule {
00015 
00016 
00017     public:
00018   virtual ~TestApplication();
00019 
00020   virtual void initialize(int stage);
00021   virtual void handleMessage(cMessage* msg);
00022         virtual void finish();
00023 
00024     protected:
00025         // gates
00026       int dataOut;
00027       int dataIn;
00028         int ctrlOut;
00029         int ctrlIn;
00030 
00031         // timers
00032         cMessage* delayTimer;
00033 
00034         // module parameters
00035         int nbPackets, remainingPackets, headerLength, nodeAddr, dstAddr;
00036         double trafficParam;
00037         bool debug, stats, trace;
00038         bool flood;
00039         bool isTransmitting;
00040 
00041         // constants
00042         int INITIAL_DELAY;
00043         int PAYLOAD_SIZE;
00044 
00045         // state variables
00046         int nbPacketsReceived;
00047         vector < cStdDev > latencies;
00048         cOutVector latenciesRaw;
00049         cStdDev testStat;
00050 
00051 };
00052 
00053 #endif // TEST_APPLICATION_H
00054