[Tinyos Core WG] CRC interface

David Gay dgay42 at gmail.com
Wed Sep 26 23:32:18 PDT 2007


Is it really worth having both seededCrc16  and crc16, just to avoid
having to pass a 0 argument in some cases? (i.e., why not just have
seededCrc16, and call it crc16?)

David

On 9/26/07, David Moss <dmm at rincon.com> wrote:
> So.. how about we make the interface asynchronous while we're at it?  This
> can be used immediately to implement asynchronous software CRC checking of
> radio packets.
>
>
> interface Crc {
>
>   /**
>    * Compute the CRC-16 value of a byte array.
>    *
>    * @param   buf A pointer to the buffer over which to compute CRC.
>    * @param   len The length of the buffer over which to compute CRC.
>    * @return  The CRC-16 value.
>    */
>   async command uint16_t crc16(void* buf, uint8_t len);
>
>   /**
>    * Compute a generic CRC-16 using a given seed.  Used to compute CRC's
>    * of discontinuous data.
>    *
>    * @param startCrc An initial CRC value to begin with
>    * @param buf A pointer to a buffer of data
>    * @param len The length of the buffer
>    * @return The CRC-16 value.
>    */
>   async command uint16_t seededCrc16(uint16_t startCrc, void *buf, uint8_t
> len);
>
> }
>
> If there are no more suggestions, I'll update these modules by the end of
> the week.
>
> -David
>
>
> -----Original Message-----
> From: Philip Levis [mailto:pal at cs.stanford.edu]
> Sent: Tuesday, September 25, 2007 11:11 PM
> To: Kevin Klues
> Cc: David Moss; TinyOS Core WG
> Subject: Re: [Tinyos Core WG] CRC interface
>
> On Sep 25, 2007, at 9:13 PM, Kevin Klues wrote:
>
> > 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.
>
> Nope. Whoops. :)
>
> 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
>


More information about the Tinyos-2.0wg mailing list