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 #ifndef __INET_MACRELAYUNITPP_H
00019 #define __INET_MACRELAYUNITPP_H
00020
00021
00022 #include "MACRelayUnitBase.h"
00023
00024 class EtherFrame;
00025
00031 class INET_API MACRelayUnitPP : public MACRelayUnitBase
00032 {
00033 public:
00034 MACRelayUnitPP();
00035 virtual ~MACRelayUnitPP();
00036
00037 protected:
00038
00039 struct PortBuffer
00040 {
00041 int port;
00042 bool cpuBusy;
00043 cQueue queue;
00044 };
00045
00046
00047 simtime_t processingTime;
00048 int bufferSize;
00049 long highWatermark;
00050 int pauseUnits;
00051 simtime_t pauseInterval;
00052
00053
00054 int bufferUsed;
00055 PortBuffer *buffer;
00056 simtime_t pauseLastSent;
00057
00058
00059 long numProcessedFrames;
00060 long numDroppedFrames;
00061 cOutVector bufferLevel;
00062
00063 protected:
00066 virtual void initialize();
00067
00072 virtual void handleMessage(cMessage *msg);
00073
00077 virtual void finish();
00079
00084 virtual void handleIncomingFrame(EtherFrame *msg);
00085
00090 virtual void processFrame(cMessage *msg);
00091 };
00092
00093 #endif
00094
00095