Hi all,

Once again, I have a quick question regarding Java and message
management.

When classes which require receiving messages from the motes are
programmed, usually all those classes are based on MessageListener. In
this way, we have the following method when we receive a message:

synchronized public void messageReceived( int to, Message m )

The problem comes when I have two classes, and each receives different
types of messages: both classes have a messageReceived method, but it
fires when a message is received, indepently from the message type, so
it could happen that one class gets the message which was sent for the
other class, and thus when I want to extract information from the
message it doesn't work... In the mote side this doesn't happen because
when send and receive are wired they are told which message type they
should expect...

How can I solve this problem on the Java side?

Thank you all,

- Jose.




_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to