📄 manager.h
字号:
//-------------------------------------------------------------------
// file name: manager.h
//
// - header file for the manager class
// - see the .cpp file for more details
//
//-------------------------------------------------------------------
#ifndef __MANAGER_H
#define __MANAGER_H
#include <omnetpp.h>
#include "globaldef.h"
/** manager simple module class. It is the central module that coordinates the message
* exchange between the sensor nodes. it is responsible for:
*- storing position information for all the nodes
*- managing the communication between the nodes
*- creating and destroying the links between the nodes
* function of the mobility and the transmission range
*/
struct nodepos /** 2D position structure */
{
int x; /**< x position */
int y; /**< y position */
};
class manager : public cSimpleModule
{
/** omnet++ specific code */
Module_Class_Members(manager,cSimpleModule,0);
/** initialization function */
void initialize();
//handle the messages received
void handleMessage(cMessage *msg);
void finish();
void topo();
};
Define_Module( manager );
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -