📄 agent.h
字号:
#ifndef __AGENT_H__
#define __AGENT_H__
#include "SimEvent.h"
class Node;
class Agent: public SimEventHandler{
public:
/*
**attached node in topology
*/
Node* mNode;
/*
**agent id
*/
int mAgentID;
unsigned long MaxOutBandWidth;
unsigned long MaxInBandwidth;
/*
**for agent id
*/
static int NEXTAGENTID;
public:
Agent(void);
Agent(int i);
~Agent(void);
Node* getNode(void){
return mNode;
};
int getID(void){
return mAgentID;
}
void attachTo( Node* node );
void handler(SimEvent*);
void setMaxInBandwidth( unsigned long mount){
MaxInBandwidth = mount;
}
void setMaxOutBandwidth( unsigned long mount){
MaxOutBandWidth = mount;
}
unsigned long getInBandwidth( void ){
return MaxInBandwidth;
}
unsigned long getOutBandwidth(void){
return MaxOutBandWidth;
};
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -