📄 const.java
字号:
package dsr;//This class contains the various constants that are being used.import java.net.*;public class Const { public static InetAddress myIP; public static RouteTableEntry myEntry; //public static final InetAddress broadcastIP = // InetAddress.getByName("255.255.255.255"); public static final int SECOND = 1000; public static final int ACTIVE_ROUTE_TIMEOUT = 3000; public static final int ALLOWED_HELLO_LOSS = 3; public static final int HELLO_INTERVAL = 1000; public static final int DELETE_PERIOD = Math.max((ACTIVE_ROUTE_TIMEOUT), ((ALLOWED_HELLO_LOSS)*(HELLO_INTERVAL))); public static final int DSRPORT = 6667; //654; public static final int LOCAL_ADD = 3; public static final int MY_ROUTE_TIMEOUT = 2 * (ACTIVE_ROUTE_TIMEOUT); public static final int NET_DIAMETER = 35; public static final int NODE_TRAVERSAL_TIME = 50; public static final int NET_TRAVERSAL_TIME = 3 * NODE_TRAVERSAL_TIME * NET_DIAMETER/2; public static final int PATH_TRAVERSAL_TIME = 2*NET_TRAVERSAL_TIME; public static final int RREQ_RETRIES = 2; public static final int TTL_START = 1; public static final int TTL_INCREMENT = 2; public static final int TTL_THRESHOLD = 7; public static final byte RREQ_TYPE = 1; public static final byte RREP_TYPE = 2; public static final byte RERR_TYPE = 3; public static final byte RREP_ACK_TYPE = 4; public static final short EVENT_RREQ = 1; public static final short EVENT_RREP = 2; public static final short EVENT_RERR = 3; public static final short EVENT_RREP_ACK = 4; public static final short EVENT_HELLO = 5; public static final short EVENT_CLEANUP = 6; public static final short EVENT_NEIGHBOR = 7; public static final short FLAGS_ALL = (byte)255;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -