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 is called the transfer is actually done.

Constructors

Link copied to clipboard
open fun AlchemistNetworkManager(executionTime: Reaction<Any>, program: RunProtelisProgram<out Any>)
Link copied to clipboard
open fun AlchemistNetworkManager(executionTime: Reaction<Any>, program: RunProtelisProgram<out Any>, retentionTime: Double)
Link copied to clipboard
open fun AlchemistNetworkManager(executionTime: Reaction<Any>, program: RunProtelisProgram<out Any>, retentionTime: Double, distanceLossDistribution: RealDistribution)

Functions

Link copied to clipboard
open fun getDistancePacketLossDistribution(): RealDistribution
Link copied to clipboard
abstract fun getNeighborState(): Map<DeviceUID, Map<CodePath, Any>>
Link copied to clipboard
open fun shareState(toSend: Map<CodePath, Any>)
Link copied to clipboard
open fun simulateMessageArrival(currentTime: Double)
Simulates the arrival of the message to other nodes.

Properties

Link copied to clipboard
private open val neighborState: ImmutableMap<DeviceUID, Map<CodePath, Any>>
Link copied to clipboard
private val retentionTime: Double