Hi,
In tutorial 6 of Tinyos-1.x, Is it possible to register the Message listener for multiple types of messages? (In GraphPanel.java, there are following codes)
==============================================================================

       // OK, connect to the serial forwarder and listen receiving data
       mote = new MoteIF(PrintStreamMessenger.err, oscilloscope.group_id);
       mote.registerListener(new OscopeMsg(), this);
===============================================================================


what I want to do is I have two (or three) types of messages and I want to process them accordingly in MessageReceive() method.However, In the registerListener it seems I can only register one type of messages. I tried to register the Father class (Message) into it but the compiler complain about the constructor of Message (though I might be able to fix it, I wondered if it is the right way to do it). Please advise if there is a way to register one Listener to multiple types of messages. Thanks in advance.

_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to