Good Morning,

I am trying to forward the type Message from a Class using MoteIF.
Whatever I triy, I always get the error below, even if I call
mpc.processMessage() without argument!
Can we not send the type Message any further?
Thank you for your help!


Class using MoteIF:

public void messageReceived(int dest_addr, Message msg) {

           if (msg instanceof AM_MultiPacket_Msg)
           {

               mpc.processMessage(msg);

           }
____________________________________
MPCoordinator class (mpc):

import net.tinyos.message.*;
...
public void processMessage(Message msg){
       AM_MultiPacket_Msg mpmsg;
       if(msg instanceof AM_MultiPacket_Msg){
           mpmsg = (AM_MultiPacket_Msg)msg;
           }


The error I get:


Exception in thread "Thread-4" java.lang.NullPointerException
       at MoteIFExtension.messageReceived(MoteIFExtension.java:80)
       at net.tinyos.message.Receiver.packetReceived(Receiver.java:218)
       at net.tinyos.packet.PhoenixSource.dispatch(PhoenixSource.java:160)
       at net.tinyos.packet.PhoenixSource.packetDipatchLoop(
PhoenixSource.java:
152)
       at net.tinyos.packet.PhoenixSource.run(PhoenixSource.java:169)
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to