Interface: tos.lib.net.DisseminationValue

interface DisseminationValue<typedef t>

Read a network shared (disseminated) variable and be notified of updates.

Author:
Philip Levis
Gilman Tolle
Date:
Jan 7 2006

Commands
command const t *get() Obtain a pointer to the variable.
command void set(const t *) Set the variable to a new value.

Events
event void changed() Signalled whenever variable may have changed.

Commands - Details

get

command const t *get()

Obtain a pointer to the variable. The provider of this interface only will change the memory the pointer references in tasks. Therefore the memory region does not change during the execution of any other task. A user of this interface must not in any circumstance write to this memory location.

Returns:
A const pointer to the variable.

set

command void set(const t *)

Set the variable to a new value. The provider of this interface will copy the value from the pointer. NOTE: This command does not cause the new value to begin disseminating. It is intended to be used for setting default values.

Events - Details

changed

event void changed()

Signalled whenever variable may have changed.