simple patch to allow application motes to receive serial data
This commit is contained in:
parent
db777ce3d0
commit
308ecfed2a
|
@ -2,6 +2,7 @@ package se.sics.cooja.interfaces;
|
|||
|
||||
import se.sics.cooja.Mote;
|
||||
import se.sics.cooja.dialogs.SerialUI;
|
||||
import se.sics.cooja.motes.AbstractApplicationMote;
|
||||
|
||||
public class ApplicationSerialPort extends SerialUI {
|
||||
private Mote mote;
|
||||
|
@ -26,12 +27,12 @@ public class ApplicationSerialPort extends SerialUI {
|
|||
}
|
||||
|
||||
public void writeArray(byte[] s) {
|
||||
/* Not implemented */
|
||||
((AbstractApplicationMote) getMote()).writeArray(s);
|
||||
}
|
||||
public void writeByte(byte b) {
|
||||
/* Not implemented */
|
||||
((AbstractApplicationMote)getMote()).writeByte(b);
|
||||
}
|
||||
public void writeString(String s) {
|
||||
/* Not implemented */
|
||||
((AbstractApplicationMote)getMote()).writeString(s);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: AbstractApplicationMote.java,v 1.9 2010/02/03 15:11:48 fros4943 Exp $
|
||||
* $Id: AbstractApplicationMote.java,v 1.10 2010/03/05 14:59:43 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.motes;
|
||||
|
@ -188,4 +188,11 @@ public abstract class AbstractApplicationMote extends AbstractWakeupMote impleme
|
|||
return "AppMote " + getID();
|
||||
}
|
||||
|
||||
/* These methods should be overriden to allow application motes receiving serial data */
|
||||
public void writeArray(byte[] s) {
|
||||
}
|
||||
public void writeByte(byte b) {
|
||||
}
|
||||
public void writeString(String s) {
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue