Title: Aggregation Query in Sensor Network with Sketches
Description: This code is for the simulation of sensor network with sketches algorithms. It applies with aggregation queries.
Copyright: Computer Science Department, Boston University,Copyright (c) 2003
Company: Boston University
Field Detail |
protected Sensor sender
protected Vector recipients
protected boolean isBroadcast
protected int epoch
protected int bytes
Constructor Detail |
public Message(Sensor sender, int epoch, int bytes, boolean broadcast)
sender
- The sender of the messageepoch
- The epoch this message was sentbytes
- The number of bytes of the messageMethod Detail |
public Sensor getSender()
public void addRecipient(int recID)
public boolean isBroadcast()
public void setBroadcast(boolean val)
val
- Set the broadcast flag to this valuepublic boolean isRecipient(int id)
id
- The id of the sensor to look forpublic int numBytes()
public int getEpoch()