-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
62 changed files
with
2,396 additions
and
778 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
application.version=1.5 | ||
application.version=1.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package core.simulator | ||
|
||
import core.routing.Route | ||
|
||
/** | ||
* Created on 09-11-2017 | ||
* | ||
* @author David Fialho | ||
*/ | ||
class AdvertiseEvent<R: Route>(private val advertiser: Advertiser<R>, private val route: R): Event { | ||
|
||
/** | ||
* Processes this event. | ||
*/ | ||
override fun processIt() { | ||
advertiser.advertise(route) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package core.simulator | ||
|
||
import core.routing.Route | ||
|
||
/** | ||
* Created on 08-11-2017 | ||
* | ||
* @author David Fialho | ||
* | ||
* An advertisement is a data class that specifies the advertiser and the time at which it will/did take place. | ||
*/ | ||
data class Advertisement<R: Route>(val advertiser: Advertiser<R>, val route: R, val time: Time = 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package core.simulator | ||
|
||
import core.routing.NodeID | ||
import core.routing.Route | ||
|
||
/** | ||
* Created on 08-11-2017 | ||
* | ||
* @author David Fialho | ||
* | ||
* An advertiser is some entity that can advertise destinations. | ||
*/ | ||
interface Advertiser<in R: Route> { | ||
|
||
/** | ||
* Each advertiser is associated with a unique ID. | ||
*/ | ||
val id: NodeID | ||
|
||
/** | ||
* Advertises some destination. | ||
* | ||
* @param defaultRoute the default route for the destination. | ||
*/ | ||
fun advertise(defaultRoute: R) | ||
|
||
/** | ||
* Resets the state of the advertiser. This may be required before advertising. | ||
*/ | ||
fun reset() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package io | ||
|
||
import core.routing.NodeID | ||
import core.routing.Route | ||
import core.simulator.Time | ||
|
||
/** | ||
* Created on 14-11-2017 | ||
* | ||
* @author David Fialho | ||
*/ | ||
data class AdvertisementInfo<out R: Route>(val advertiserID: NodeID, val defaultRoute: R, val time: Time) |
Oops, something went wrong.