manager.h.bak
来自「一个简单的基于静态路由表的最佳路由过程」· BAK 代码 · 共 70 行
BAK
70 行
//-------------------------------------------------------------------
// 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,16384);
/** initialization function */
void initialize();
//handle the messages received
void activity();
void finish();
//choose a new node to begin the topology request
void choosehead();
nodepos pos[NNODES];
int head[GX][GY];
int henergy[GX][GY];
//the number of run
int numofrun;
//output the topo
void topo();
//in which grid
int choosegird(int position);
};
Define_Module( manager );
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?