2008/4/14 Urs Hunkeler <[EMAIL PROTECTED]>:

> Hi Fatima,
>
> I think it's mainly a question of style. Often something starts as a
> simple test, and then all of a sudden the code is in some production release
> and everybody has forgotten about the little hack for testing purposes.
>
> Then again, why would you need the packet attribute anyways? The only
> reason I see for using the packet attribute (on TinyOS 1.x) is to actually
> ensure that all platforms put the data bytes at the same offset when
> transmitting data. So if you only use one platform (simulation), then the
> packed attribute is not necessary, and if you use multiple platforms
> (testing on real hardware) you should not use it :-)
>
> Cheers,
> Urs
>
> Hello,
i am still having small confusion about the way we can define an attribute.
Once the packed attribute shouldn't be used, can you tell me what is the
best way to change this declaration:

#ifndef _ATTRIBUTE_H_
#define _ATTRIBUTE_H_

typedef struct {
  uint8_t  key;          // key
  uint8_t  op;            // operator as defined in ..
  uint16_t value;      // Value

} __attribute__ ((packed)) Attribute;

typedef Attribute *AttributePtr;

#endif

your help will be kindly appreciated.
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to