|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlime.LimeTemplate
lime.motes.MoteLimeTemplate
This class, MotesLimeTemplate
, is used to wrap the tuple along with
the extra fields to be matched, e.g., the current, destination, and tuple
id fields.
In addition to the LimeTemplate, this implementation supports mote id localization,
necessary to specify a mote as destination of the pattern matching request.
LimeTuple
,
LimeTupleSpace
,
LimeTemplate
Field Summary | |
private int |
freshness
The freshness of the data that is required. |
private static int |
FRESHNESS_UNSPECIFIED
Constant that indicates the value of the freshness when it is unspec. |
private MoteID |
mote
The ID of the mote. |
Fields inherited from class lime.LimeTemplate |
|
Constructor Summary | |
MoteLimeTemplate(lights.interfaces.ITuple t)
Construct a new LimeTemplate with the cur, dest, freshness and tuple id formal. |
|
MoteLimeTemplate(Location cur,
AgentLocation dest,
LimeTupleID id,
lights.interfaces.ITuple t)
Construct a new MotesLimeTemplate. |
|
MoteLimeTemplate(Location cur,
AgentLocation dest,
MoteID mote,
int f,
LimeTupleID id,
lights.interfaces.ITuple t)
Construct a new MotesLimeTemplate. |
Method Summary | |
(package private) static lights.interfaces.ITuple |
cloneTuple(lights.interfaces.ITuple t)
Helper method used to clone a tuple. |
(package private) static lights.interfaces.ITuple |
cloneTuple(lights.interfaces.ITuple t,
int start,
int end)
Helper method for cloning a tuple |
int |
getFreshness()
Getter of the freshness of the template. |
MoteID |
getMoteid()
Getter for the moteID. |
MoteLimeTemplate |
insertMoteID()
Used to insert to mote id into the tuple that will be used for pattern matching. |
boolean |
isFreshnessSet()
This method is used to determine if the freshness is required or unspecified. |
java.lang.String |
toString()
|
Methods inherited from class lime.LimeTemplate |
getCurrent, getDestination, getDestination, getID, getID, getTuple, setCurrent, setTuple |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final int FRESHNESS_UNSPECIFIED
private MoteID mote
private int freshness
Constructor Detail |
public MoteLimeTemplate(Location cur, AgentLocation dest, MoteID mote, int f, LimeTupleID id, lights.interfaces.ITuple t)
cur
- current locationdest
- destination locationmote
- id of the motef
- the freshness required for the sensing.id
- tuple id, or null
for formalt
- the tuplepublic MoteLimeTemplate(Location cur, AgentLocation dest, LimeTupleID id, lights.interfaces.ITuple t)
cur
- current locationdest
- destination locationid
- tuple id, or null
for formalt
- the tuplepublic MoteLimeTemplate(lights.interfaces.ITuple t)
t
- the tupleMethod Detail |
public MoteID getMoteid()
public MoteLimeTemplate insertMoteID()
public java.lang.String toString()
toString
in class LimeTemplate
public int getFreshness()
public boolean isFreshnessSet()
true
if the freshness is unspecified, false
otherwise.static lights.interfaces.ITuple cloneTuple(lights.interfaces.ITuple t)
t
- the tuple to be cloned.
static lights.interfaces.ITuple cloneTuple(lights.interfaces.ITuple t, int start, int end)
t
- the tuple to be cloned.start
- the field to start the cloning from.end
- the field to end the cloning to.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |