00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef TEST_APPL_LAYER_H
00023 #define TEST_APPL_LAYER_H
00024
00025 #include "BaseApplLayer.h"
00026
00027
00038 class TestApplLayer : public BaseApplLayer
00039 {
00040 public:
00041 virtual ~TestApplLayer();
00042
00044 virtual void initialize(int);
00045
00047 enum TestApplMessageKinds{
00048 SEND_BROADCAST_TIMER = LAST_BASE_APPL_MESSAGE_KIND,
00049 BROADCAST_MESSAGE,
00050 BROADCAST_REPLY_MESSAGE,
00051 LAST_TEST_APPL_MESSAGE_KIND
00052 };
00053
00054 protected:
00056 cMessage *delayTimer;
00057
00059 bool coreDebug;
00060
00061 protected:
00063 virtual void handleSelfMsg(cMessage*);
00064
00066 virtual void handleLowerMsg(cMessage*);
00067
00069 void sendBroadcast();
00070
00072 void sendReply(ApplPkt *msg);
00073 };
00074
00075 #endif