📄 simprovider.java
字号:
/*
JaNetSim --- Java Network Simulator
-------------------------------------
This software was developed at the Network Research Lab, Faculty of
Computer Science and Information Technology (FCSIT), University of Malaya.
This software may be used and distributed freely. FCSIT assumes no responsibility
whatsoever for its use by other parties, and makes no guarantees, expressed or
implied, about its quality, reliability, or any other characteristic.
We would appreciate acknowledgement if the software is used.
FCSIT ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND
DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING
FROM THE USE OF THIS SOFTWARE.
*/
package janetsim.component;
public class SimProvider {
////////////////////////// Global Event Constants ////////////////////////
/* NOTE:
If the value of any existing constant is changed, ALL simulation
components must be recompiled to ensure proper operation.
Therefore, only add new constants (only SimProvider needs to be
compiled) and you should be safe. Anyway, new global event
constants are needed very rarely.
This rule also holds for compInfo IDs.
*/
public static final int EV_RECEIVE = 1; //for passing Bits (frames, cells etc)
public static final int EV_READY = 2; //for link ready nofitication
public static final int EV_RECEIVE_UNI = 3; //for passing UNIInfo
public static final int EV_LINK_DOWN = 4; //for link down notification
public static final int EV_LINK_UP = 5; //for link up notification
public static final int EV_PRIVATE = 1000; //private events begin here
//////////////////////// End Global Event Constants //////////////////////
/////////////////////// compInfo Constants ////////////////////////////
public static final int CI_GET_MAC = 1; //for global uniqueness check of MAC address
//every MAC user MUST return all
//used MACs in a java.util.List
//containing Long's
public static final int CI_PF_INT = 2; //for feedback type SimParamInt
// (SimPFInt), this is the
// notification to the owner.
// The parameter here is a reference
// to the SimPFInt itself.
public static final int CI_TRANSPORT_SEND = 3; //send IP packet for a transport
//agent (e.g. TCP)
//Parameter: the IPPacket
public static final int CI_TRANSPORT_SEND2LINK = 4;
//send IP packet for a transport
//agent (e.g. TCP) to a specified
//link
//Parameter: an Object []
//Element 0: the packet (IPPacket)
//Element 1: the link (SimComponent)
public static final int CI_PRIVATE = 1000; //private IDs begin here
////////////////////// End compInfo Constants /////////////////////////
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -