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 <[email protected]>

> How about memcmp in string.h? This is standard C.
>
> Janos
>
> On Mon, Mar 2, 2009 at 11:13 AM, Jordi Pérez <[email protected]> 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
> > [email protected]
> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> >
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to