Lesson 7: Accessing
the Base station's Tuple Space from the Laptop
The laptop runs a Java application called AgentInjector that provides
a TupleSpace object. This object serves two purposes: 1) it serves
as a local tuple space on the laptop, and 2) it allows an application
to perform operations on tuple spaces belonging to
nodes within
the sensor network.
The tuple space object is obtained by calling "injector.getTS()"
from within AgentInjector. The tuple space provides the following
operations that operate on the local tuple space:
- out(Tuple t)
- inp(Tuple t)
- rdp(Tuple t)
- in(Tuple template)
- rd(Tuple template)
These local operations have the same semantics as those within a
mote's tuple space, as described here.
The tuple space also provides the following remote tuple space operations:
- rout(Tuple t, AgillaLocation dest)
- rinp(Tuple template, AgillaLocation dest)
- rrdp(Tuple template, AgillaLocation dest)
These remote tuple space operations have the same semantics as those
within a mote's tuple space, as described here.
|