91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.36MB
    文件類型: .zip
    金幣: 2
    下載: 1 次
    發布日期: 2024-03-18
  • 語言: 其他
  • 標簽: java??

資源簡介

機會路由源代碼+仿真工具:The Social-aware Content-based Opportunistic Routing Protocol (SCORP)

資源截圖

代碼片段和文件信息

/*?
?*?Copyright?2010?Aalto?University?ComNet
?*?Released?under?GPLv3.?See?LICENSE.txt?for?details.?
?*/

package?applications;

import?java.util.Random;

import?report.PingAppReporter;
import?core.Application;
import?core.DTNHost;
import?core.Message;
import?core.Settings;
import?core.SimClock;
import?core.SimScenario;
import?core.World;

/**
?*?Simple?ping?application?to?demonstrate?the?application?support.?The?
?*?application?can?be?configured?to?send?pings?with?a?fixed?interval?or?to?only
?*?answer?to?pings?it?receives.?When?the?application?receives?a?ping?it?sends
?*?a?pong?message?in?response.
?*?
?*?The?corresponding?PingAppReporter?class?can?be?used?to?record
?*?information?about?the?application?behavior.
?*?
?*?@see?PingAppReporter
?*?@author?teemuk
?*/
public?class?PingApplication?extends?Application?{
/**?Run?in?passive?mode?-?don‘t?generate?pings?but?respond?*/
public?static?final?String?PING_PASSIVE?=?“passive“;
/**?Ping?generation?interval?*/
public?static?final?String?PING_INTERVAL?=?“interval“;
/**?Ping?interval?offset?-?avoids?synchronization?of?ping?sending?*/
public?static?final?String?PING_OFFSET?=?“offset“;
/**?Destination?address?range?-?inclusive?lower?exclusive?upper?*/
public?static?final?String?PING_DEST_RANGE?=?“destinationRange“;
/**?Seed?for?the?app‘s?random?number?generator?*/
public?static?final?String?PING_SEED?=?“seed“;
/**?Size?of?the?ping?message?*/
public?static?final?String?PING_PING_SIZE?=?“pingSize“;
/**?Size?of?the?pong?message?*/
public?static?final?String?PING_PONG_SIZE?=?“pongSize“;

/**?Application?ID?*/
public?static?final?String?APP_ID?=?“fi.tkk.netlab.PingApplication“;

//?Private?vars
private?double lastPing?=?0;
private?double interval?=?500;
private?boolean?passive?=?false;
private?int seed?=?0;
private?int destMin=0;
private?int destMax=1;
private?int pingSize=1;
private?int pongSize=1;
private?Random rng;

/**?
?*?Creates?a?new?ping?application?with?the?given?settings.
?*?
?*?@param?s Settings?to?use?for?initializing?the?application.
?*/
public?PingApplication(Settings?s)?{
if?(s.contains(PING_PASSIVE)){
this.passive?=?s.getBoolean(PING_PASSIVE);
}
if?(s.contains(PING_INTERVAL)){
this.interval?=?s.getDouble(PING_INTERVAL);
}
if?(s.contains(PING_OFFSET)){
this.lastPing?=?s.getDouble(PING_OFFSET);
}
if?(s.contains(PING_SEED)){
this.seed?=?s.getInt(PING_SEED);
}
if?(s.contains(PING_PING_SIZE))?{
this.pingSize?=?s.getInt(PING_PING_SIZE);
}
if?(s.contains(PING_PONG_SIZE))?{
this.pongSize?=?s.getInt(PING_PONG_SIZE);
}
if?(s.contains(PING_DEST_RANGE)){
int[]?destination?=?s.getCsvInts(PING_DEST_RANGE2);
this.destMin?=?destination[0];
this.destMax?=?destination[1];
}

rng?=?new?Random(this.seed);
super.setAppID(APP_ID);
}

/**?
?*?Copy-constructor
?*?
?*?@param?a
?*/
public?PingApplication(PingApplication?a)?{
super(a);
this.lastPing?=?a.getLastPing();
this.interval?=?a.getI

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-07-26?18:58??one_1.4.1_Scorp\
?????文件?????????422??2018-07-26?16:38??one_1.4.1_Scorp\.classpath
?????文件?????????391??2018-07-26?16:37??one_1.4.1_Scorp\.project
?????文件????????6940??2011-02-01?06:10??one_1.4.1_Scorp\HISTORY.txt
?????文件???????32783??2009-01-27?22:10??one_1.4.1_Scorp\LICENSE.txt
?????文件???????33303??2011-02-01?05:29??one_1.4.1_Scorp\README.txt
?????文件????????1475??2009-01-27?22:10??one_1.4.1_Scorp\WDM_conf_help.txt
?????目錄???????????0??2018-07-26?16:38??one_1.4.1_Scorp\applications\
?????文件????????5578??2018-07-26?16:38??one_1.4.1_Scorp\applications\PingApplication.class
?????文件????????7107??2010-03-16?06:00??one_1.4.1_Scorp\applications\PingApplication.java
?????文件????????3254??2009-04-29?19:38??one_1.4.1_Scorp\cluster_settings.txt
?????文件?????????278??2009-01-27?22:10??one_1.4.1_Scorp\compile.bat
?????目錄???????????0??2018-07-26?18:50??one_1.4.1_Scorp\core\
?????文件????????2035??2018-07-26?16:38??one_1.4.1_Scorp\core\Application.class
?????文件????????3497??2010-03-10?08:05??one_1.4.1_Scorp\core\Application.java
?????文件?????????217??2018-07-26?16:38??one_1.4.1_Scorp\core\ApplicationListener.class
?????文件?????????931??2010-03-10?08:05??one_1.4.1_Scorp\core\ApplicationListener.java
?????文件????????3251??2018-07-26?16:38??one_1.4.1_Scorp\core\CBRConnection.class
?????文件????????3813??2010-03-19?06:37??one_1.4.1_Scorp\core\CBRConnection.java
?????文件????????3734??2018-07-26?16:38??one_1.4.1_Scorp\core\Connection.class
?????文件????????6111??2010-03-10?08:05??one_1.4.1_Scorp\core\Connection.java
?????文件?????????209??2018-07-26?16:38??one_1.4.1_Scorp\core\ConnectionListener.class
?????文件?????????751??2010-03-10?08:05??one_1.4.1_Scorp\core\ConnectionListener.java
?????文件????????2884??2018-07-26?16:38??one_1.4.1_Scorp\core\Coord.class
?????文件????????3338??2010-03-10?08:05??one_1.4.1_Scorp\core\Coord.java
?????文件?????????572??2018-07-26?16:38??one_1.4.1_Scorp\core\DTN2Manager$EIDHost.class
?????文件????????5752??2018-07-26?16:38??one_1.4.1_Scorp\core\DTN2Manager.class
?????文件????????5958??2010-03-10?08:05??one_1.4.1_Scorp\core\DTN2Manager.java
?????文件???????12046??2018-07-26?18:51??one_1.4.1_Scorp\core\DTNHost.class
?????文件???????15644??2018-07-26?18:51??one_1.4.1_Scorp\core\DTNHost.java
?????文件????????5878??2018-07-26?16:38??one_1.4.1_Scorp\core\DTNSim.class
............此處省略558個文件信息

評論

共有 條評論