[Tinyos Core WG] CRC interface

Kevin Klues klueska at gmail.com
Tue Sep 25 21:13:07 PDT 2007


Does crc16_seeded follow the coding standard in TEP 3?

Section 4.1.1
Commands, events, tasks and functions should be mixed case, starting lower case.

Kevin

On 9/25/07, Philip Levis <pal at cs.stanford.edu> wrote:
> On Sep 25, 2007, at 6:40 PM, David Moss wrote:
>
> > The current CRC interface in TinyOS does not allow CRC's to be
> > generated starting with some given CRC value; instead, it uses a
> > seed of 0 for all CRC computations:
> >
> >
> >
> >   (tos/interfaces/CRC.h):
> >
> >   command uint16_t crc16(void* buf, uint8_t len);
> >
> >
> >
> > I propose we add an additional command to this CRC interface that
> > will allow developers to generate a CRC with a given start seed:
> >
> >
> >
> >   command uint16_t genericCrc16(uint16_t startCrc, void *buf,
> > uint8_t len);
> >
> >
> >
> > This would be useful for performing CRC's across multiple sets of
> > discontinuous data, and would use the same CRC implementation as
> > the current crc16 command so memory footprint is kept small.
> > Thoughts?
> >
> >
>
> Makes sense to me. I'd suggest crc16_seeded rather than genericCrc16,
> though. I assume crc16(a, b) is just a call to crc16_seeded(0, a, b)?
>
> Phil
>
> _______________________________________________
> Tinyos-2.0wg mailing list
> Tinyos-2.0wg at Mail.Millennium.Berkeley.EDU
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-2.0wg
>


-- 
~Kevin


More information about the Tinyos-2.0wg mailing list