⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 manager.h

📁 一个简单的基于静态路由表的最佳路由过程
💻 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,16384);
	
	/** initialization function */
	void initialize();

	//handle the messages received
	
	void sendgb();
	void finish();

	//choose a new node to begin the topology request
	void choosehead();
       //void activity();
       void handleMessage(cMessage *msg);
	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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -