From 660faff6767bf043e872f5f0c933f21a56050f75 Mon Sep 17 00:00:00 2001 From: fros4943 Date: Tue, 18 Mar 2008 12:54:25 +0000 Subject: [PATCH] removed notion of byte and packet radio: all radios must now implement the default cooja packet type, and may addionally implement a custom data object --- .../se/sics/cooja/interfaces/ByteRadio.java | 40 ------------------- .../se/sics/cooja/interfaces/PacketRadio.java | 33 --------------- 2 files changed, 73 deletions(-) delete mode 100644 tools/cooja/java/se/sics/cooja/interfaces/ByteRadio.java delete mode 100644 tools/cooja/java/se/sics/cooja/interfaces/PacketRadio.java diff --git a/tools/cooja/java/se/sics/cooja/interfaces/ByteRadio.java b/tools/cooja/java/se/sics/cooja/interfaces/ByteRadio.java deleted file mode 100644 index 1c882ced6..000000000 --- a/tools/cooja/java/se/sics/cooja/interfaces/ByteRadio.java +++ /dev/null @@ -1,40 +0,0 @@ -package se.sics.cooja.interfaces; - -/** - * A byte radio is able to transmit and receive radio data on a byte level. - * - * The byte radio is a lower abstraction level than the packet radio and should, - * according to the bottom-up abstraction policy, implement the packet - * abstraction level. - * - * @author Fredrik Osterlind - */ -public interface ByteRadio extends PacketRadio { - - /** - * Radio receives given byte. - * - * @param b - * Byte - * @param delay - * Delay cycle information - */ - public void receiveByte(byte b, long delay); - - /** - * @return Last byte transmitted by radio - */ - public byte getLastByteTransmitted(); - - /** - * Returns number of cycles since last byte was transmitted. - * - * @return Timestamp info - */ - public long getLastByteTransmittedDelay(); - - /** - * @return Last byte received by radio - */ - public byte getLastByteReceived(); -} diff --git a/tools/cooja/java/se/sics/cooja/interfaces/PacketRadio.java b/tools/cooja/java/se/sics/cooja/interfaces/PacketRadio.java deleted file mode 100644 index cd799464b..000000000 --- a/tools/cooja/java/se/sics/cooja/interfaces/PacketRadio.java +++ /dev/null @@ -1,33 +0,0 @@ -package se.sics.cooja.interfaces; - -/** - * A packet radio is able to transmit and receive radio data on a packet level. - * - * The packet radio is the highest abstraction level of radios, and must - * therefore be implemented by all lower abstraction levels. - * - * @author Fredrik Osterlind - */ -public interface PacketRadio { - - /** - * Sets the packet data that is being received during a connection. Different - * radio may handle the data differently, but as a general rule this data - * should be supplied as soon as possible. - * - * @param p - * Packet dat - */ - public void setReceivedPacket(byte[] p); - - /** - * @return Last packet transmitted by radio - */ - public byte[] getLastPacketTransmitted(); - - /** - * @return Last packet received by radio - */ - public byte[] getLastPacketReceived(); - -}