changed byte radio to supply delay meta data instead of timestamp
This commit is contained in:
parent
da3d423233
commit
438fa2a92d
2 changed files with 8 additions and 9 deletions
|
@ -16,10 +16,10 @@ public interface ByteRadio extends PacketRadio {
|
|||
*
|
||||
* @param b
|
||||
* Byte
|
||||
* @param timestamp
|
||||
* Timestamp information
|
||||
* @param delay
|
||||
* Delay cycle information
|
||||
*/
|
||||
public void receiveByte(byte b, long timestamp);
|
||||
public void receiveByte(byte b, long delay);
|
||||
|
||||
/**
|
||||
* @return Last byte transmitted by radio
|
||||
|
@ -27,12 +27,11 @@ public interface ByteRadio extends PacketRadio {
|
|||
public byte getLastByteTransmitted();
|
||||
|
||||
/**
|
||||
* Returns timestamp information of byte transmitted. This may for example be
|
||||
* the number of cycles since transmission started.
|
||||
* Returns number of cycles since last byte was transmitted.
|
||||
*
|
||||
* @return Timestamp info
|
||||
*/
|
||||
public long getLastByteTransmittedTimestamp();
|
||||
public long getLastByteTransmittedDelay();
|
||||
|
||||
/**
|
||||
* @return Last byte received by radio
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: AbstractRadioMedium.java,v 1.2 2007/04/23 08:25:50 fros4943 Exp $
|
||||
* $Id: AbstractRadioMedium.java,v 1.3 2007/04/23 11:33:54 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.radiomediums;
|
||||
|
@ -289,11 +289,11 @@ public abstract class AbstractRadioMedium extends RadioMedium {
|
|||
logger.fatal("Can't find active connection to forward byte in");
|
||||
} else {
|
||||
byte b = ((ByteRadio) radio).getLastByteTransmitted();
|
||||
long timestamp = ((ByteRadio) radio).getLastByteTransmittedTimestamp();
|
||||
long delay = ((ByteRadio) radio).getLastByteTransmittedDelay();
|
||||
|
||||
for (Radio dstRadio : connection.getDestinations()) {
|
||||
if (dstRadio instanceof ByteRadio) {
|
||||
((ByteRadio) dstRadio).receiveByte(b, timestamp);
|
||||
((ByteRadio) dstRadio).receiveByte(b, delay);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue