alchemist-incarnation-protelis / it.unibo.alchemist.protelis / AlchemistNetworkManager

AlchemistNetworkManager

class AlchemistNetworkManager : NetworkManager, Serializable

Emulates a NetworkManager. This particular network manager does not send messages instantly. Instead, it records the last message to send, and only when #simulateMessageArrival(double) is called the transfer is actually done.

Constructors

<init>

AlchemistNetworkManager(environment: Environment<Any!, *>!, local: ProtelisNode<Position<*>!>!, executionTime: Reaction<Any!>!, program: RunProtelisProgram<*>!)
AlchemistNetworkManager(environment: Environment<Any!, *>!, local: ProtelisNode<Position<*>!>!, executionTime: Reaction<Any!>!, program: RunProtelisProgram<*>!, retentionTime: Double)

Functions

getNeighborState

fun getNeighborState(): MutableMap<DeviceUID!, MutableMap<CodePath!, Any!>!>!

getRetentionTime

fun getRetentionTime(): Double

shareState

fun shareState(toSend: MutableMap<CodePath!, Any!>!): Unit

simulateMessageArrival

Simulates the arrival of the message to other nodes.

fun simulateMessageArrival(currentTime: Double): Unit