[Tinyos-help] Casting byte[] packet to Message

Carolin Latze carolin.latze at gmail.com
Wed Oct 29 01:26:32 PDT 2008


Hello everybody,

I implemented a SerialForwarder like message forwarder where I read packets
using packetReceived and send them to my clients using writePacket inside
packetReceived. My forwarder should not only forward, but also filter
messages according to their types (my sensors send debug and sensor messages
and I only want to forward the sensor messages). Is there any easy way to
convert the byte[] packet into a Message? I tried several things but got
lost in all those offsets... I also found out, that there is an example in
net.tinyos.message.Receiver but that uses protected methods of Message.

Any hints are appreciated!
Regards
Carolin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20081029/ca649bb5/attachment.htm 


More information about the Tinyos-help mailing list