Hi Julien,
try: typedef struct MyCommand { uint8_t flag; uint8_t length; } MyCommand; MyCommand Cmd1; And set the value (Cmd1.flag = 0;) in an "executable environment" (e.g.: function, event, command), because otherwise the complier thinks that "Cmd1" is a interface with the command "flag". I think you don't have to use '0' for the assignment, just 0 or FALSE without the apostrophe. Don't use "command" as an identifier, because it is already a nesC keyword. Also take a look at http://nescc.sourceforge.net/papers/nesc-ref.pdf (Language Reference Manual from Phil Levis) Regards, OLE _____ Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von julien falco Gesendet: Montag, 11. Juni 2007 14:56 An: tinyos-help@Millennium.Berkeley.EDU Betreff: [Tinyos-help] struct type I am trying to set a value to an uint8_t type in a structure. i wrote it the C way: struct Command { uint8_t flag; uint8_t length; }; struct Command Cmd1; Cmd1.flag = '0'; but at compiling it says that ReaderControllerM.nc:52: unexpected interface reference in declaration of `Cmd1. flag' What does it mean? How to give a value to a byte in tinyos in general, and what are the types? I am actually trying to go a bit further with the struct and do something like this below, but since i am already stucked with a simple one...: struct Command { uint8_t flag[2]; uint8_t length[4]; }; thanks guys.
_______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help