Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __INET_UDPBASICAPP_H
00021 #define __INET_UDPBASICAPP_H
00022
00023 #include <vector>
00024 #include <omnetpp.h>
00025 #include "UDPAppBase.h"
00026
00027
00031 class INET_API UDPBasicApp : public UDPAppBase
00032 {
00033 protected:
00034 std::string nodeName;
00035 int localPort, destPort;
00036 std::vector<IPvXAddress> destAddresses;
00037
00038 static int counter;
00039
00040 int numSent;
00041 int numReceived;
00042
00043
00044 virtual IPvXAddress chooseDestAddr();
00045 virtual cPacket *createPacket();
00046 virtual void sendPacket();
00047 virtual void processPacket(cPacket *msg);
00048
00049 protected:
00050 virtual int numInitStages() const {return 4;}
00051 virtual void initialize(int stage);
00052 virtual void handleMessage(cMessage *msg);
00053 };
00054
00055 #endif
00056
00057