SendToNeighbor

class SendToNeighbor(node: Node<Any>, reaction: Reaction<Any>, val protelisProgram: RunProtelisProgram<*>) : AbstractAction<Any>

Action that broadcasts the content of a Protelis program to neighbours.

Parameters

node

the local node hosting the action

reaction

the reaction triggering this action

Constructors

Link copied to clipboard
constructor(node: Node<Any>, reaction: Reaction<Any>, protelisProgram: RunProtelisProgram<*>)

Properties

Link copied to clipboard
open override val context: Context
Link copied to clipboard
Link copied to clipboard

the RunProtelisProgram whose data will be sent

Functions

Link copied to clipboard
open override fun cloneAction(newNode: Node<Any>, newReaction: Reaction<Any>): SendToNeighbor

This method allows to clone this action on a new node. It may result useful to support runtime creation of nodes with the same reaction programming, e.g. for morphogenesis.

Link copied to clipboard
open override fun execute()

Effectively executes this action.

Link copied to clipboard
open override fun getContext(): Context
Link copied to clipboard
infix fun Action<*>.shouldEqual(other: Action<*>)
Link copied to clipboard
open override fun toString(): String