application.h
来自「topdisc算法的omnet仿真.平台:omnet+vc 6.0」· C头文件 代码 · 共 55 行
H
55 行
//-------------------------------------------------------------------// file name: application.h// // - header file for the application class// - see the .cpp file for more details////-------------------------------------------------------------------#ifndef __APPLICATION_H#define __APPLICATION_H#include <omnetpp.h>#include "globaldef.h"#include <list>/** Main class on top of all the protocol stack. It contains user defined code * as the top application or for debugging/testing the underlying layers *///int isreq=(int)parentModule()->par("TYPE");class application : public cSimpleModule{ /** omnet++ specific code */ Module_Class_Members(application,cSimpleModule,0); /** the initialization function */ void initialize(); /** main loop function */ void handleMessage(cMessage *msg); void finish(); // process message from black node or grey node
void processBlackRequest(cMessage *msg);
void processGreyRequest(cMessage *msg);
void processDarkGreyRequest(cMessage *msg);
// sign the node -1--white 0--grey 1--black 2--darkgrey int isreq;
double time;};Define_Module( application );#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?