Interface: tos.lib.net.DisseminationUpdate

interface DisseminationUpdate<typedef t>

Update a network shared (disseminated) value. Updates are assured to be eventually consistent across a connected network. If multiple nodes update a value simultaneously, then nodes within the network will see a series of one or more updates, the last update will be the same for all nodes. Components that need to use the variable should use the DisseminationValue interface.

Author:
Philip Levis
Gilman Tolle
Date:
January 7 2006

Commands
command void change(t *newVal) Update the variable to a new value.

Commands - Details

change

command void change(t *newVal)

Update the variable to a new value. This changes the local copy and begins to disseminate the new value throughout the network. As other nodes may have also changed the variable, it is possible that an update may not 'stick,' but will instead be overwritten by a separate update.

Parameters:
newVal - A pointer to the new value. The memory pointed to by newVal is copied out, so newVal can be reclaimed when change returns.