Aggregate Context
class AggregateContext(localId: ID, messages: Collection<InboundMessage>, previousState: Set<State<*>>)
Context for managing aggregate computation. It represents the localId of the device, the messages received from the neighbours, and the previousState of the device.
Functions
Link copied to clipboard
This function computes the local value of e_i, substituting variable n with the nvalue w of messages received from neighbours, using the local value of e_i (initial) as a default. The exchange returns the neighbouring or local value v_r from the evaluation of e_r applied to the body. e_s evaluates to a nvalue w_s consisting of local values to be sent to neighbour devices δ′, which will use their corresponding w_s(δ') as soon as they wake up and perform their next execution round.
Link copied to clipboard
Messages to send to the other nodes.
Link copied to clipboard
Observes the value of an expression type across neighbours.
Link copied to clipboard
fun <Initial, Return> AggregateContext.sharing(initial: Initial, transform: SharingContext<Initial, Return>.(Field<Initial>) -> SharingResult<Initial, Return>): Return