Apps Components Interfaces All Files Source Tree | source: tos.lib.TinyDB.Network.nc |
The network interface provides TinyDB to trap and monitor network communication -- TupleRouter could simply be wired directly to the appropriate AM send / handlers, but the network monitors topology and filters events in a semi-intelligent way.
Eventually, we'd like to abstract out the parts of this that are similar to Alec's fancy routing from the parts that are TinyDB magic (e.g. snooped messages) from the parts that really are just wrappers around other components (e.g. setPot).
Implemented by NetworkC.td.
Author: | Sam Madden (madden@cs.berkeley.edu) |
Commands |
Parameters: |
msg - The message to send |
Returns: | err_MsgSendFailed if message failed to xmit |
Parameters: |
msg - The message to send |
Returns: | err_MsgSendFailed if message failed to xmit |
Parameters: |
fanout - The branching factor of the topology tree |
Parameters: |
on - Whether data should be routed to the root |
Events |
Parameters: |
msg - The message that was sent amId - the AMId of the message that was sent |
Parameters: |
The - data message that was received |
Parameters: |
msg - The query message that was received |
Parameters: |
msg - The message that was heard msgid - The amid of the message parent - If the message was sent by our parent |
Parameters: |
The - message our neighbor sent |