[Tinyos-help] compare bit to bit or byte to byte
Sonia Pardo
shanya86bcn at gmail.com
Tue Mar 3 09:39:48 PST 2009
Dear All,
We can't use memcmp because this function only say us if the packet is the
same or not.
We would like to compare bit to bit because I want to rebuild the packet.
For example, we receive three packets from three different motes (But three
motes send the same information). One of them receives Hello. Other mote
receives Hello too, but the third packet receives Mello. This packet has
errors, but if I compare the three packets bit to bit, I can rebuild the
message of the third packet and I can say that the information of this
packet is Hello too.
I need a function which compare bit to bit, because I don't know how can I
do this...and I think that memcmp is not valid for this.
Can anyone help us?
Thanks a lot
Sonia
2009/3/2 Janos Sallai <sallai at isis.vanderbilt.edu>
> How about memcmp in string.h? This is standard C.
>
> Janos
>
> On Mon, Mar 2, 2009 at 11:13 AM, Jordi Pérez <pr.jordi at gmail.com> wrote:
> > Dear all,
> >
> > I have a Base Station which receives the same packet from three different
> > motes. The packets must be the same, but maybe, one of them could have
> some
> > errors. So, I want to make a task which compare bit to bit, or byte to
> byte,
> > the three packet received to rebuild a new packet without errors.
> >
> > How could I do this task? I don't know how to compare bit to bit (or byte
> to
> > byte) a received packet. Can you help me please?
> >
> > Thanks in advanced,
> >
> > Jordi
> >
> > _______________________________________________
> > Tinyos-help mailing list
> > Tinyos-help at millennium.berkeley.edu
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >
>
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20090303/beac2db5/attachment.htm
More information about the Tinyos-help
mailing list