globaldef.h
来自「omnet++ 平台下的flood 我弄了好久」· C头文件 代码 · 共 40 行
H
40 行
//一些常量的定义
//macros have been moved to macros.h,types and structures to structures.h
#ifndef _GLOBAL_H
#define _GLOBAL_H
#define MINIMUMDEALY 0.0001 //最小模拟时间为
#define GENERATIONDELAY 10
#define RETRANSMITDELAY 1
//COLOR AND TYPE RANGES
#define MAXCOLOR 10
#define MAXKIND 3
#define NNODES 20 //最大节点数
#define MAXCONN 20 //最大连接数
//CONSTANTS USED FOR POSITION AND MOBILITY(用于位置和变化的常量)
#define SPACEX 800
#define SPACEY 500
//CONSTANTS USED FOR THE DISPLAY
#define MX 30 //margins around the display area 显示空白处
#define MY 30
//消息类型
enum
{
M_LOWHIGH,//MESSAGE FORm LOWER LAYER TO HIGHER LAYER来个低层
M_HIGHLOW,//来自高层
M_NODE,//message from another node 该消息来自其它点
M_UPDATE,//refresh the layer 0 variables 刷新0层变量
M_CONNECT,//connect 2 gates(message inside the manage )
M_DISCONNECT,
M_UPDSSTRENGTH,//REPOART THE SIGNAL STRENGTH 报告信号强度
M_SELF//test message for the application测试消息来在应用层
};
#include "macros.h"//all the macros have been moved to this file
#include "types.h"// the type &structure definitions are moved to this file
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?