Dear David,

I run the program in Cygwin, WinXP. How can I specify the platform? I am
just not aware of this.

It is weird that:

typedef struct MyMsg1 {
    uint8_t field1;
    union {
        start_sense_args field2;
    } args;
} MyMsg1;

typedef struct MyMsg2 {
    union {
        start_sense_args field2;
    } args;
} MyMsg2;

nesC interpret MyMsg1 as a 96-bit structure and MyMsg2 as a 64-bit
structure, where start_sense_args is a 64-bit structure.

Best regards,
Yours,
Zhifeng Lai

-----Original Message-----
From: David Gay [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 07, 2007 11:45 PM
To: Zhifeng Lai
Cc: tinyos help
Subject: Re: [Tinyos-help] Two dismatches between nesC and MIG.

On 6/7/07, Zhifeng Lai <[EMAIL PROTECTED]> wrote:
> Can anyone confirm that my finding of two data type dismatches in
interpreting messages between nesC programs and MIG in TinyOS 1.1.13 is
correct? (My OS is WinXP + SP2.)
>
>
>
> (1)     MIG regards "int" type as 16-bit data , while nesC treat it as 32
bits.
>
> (2)     In the following structure:
>
>
>
> nesC will allocate 96 bits for MyMsg while MIG interpret it as a 72-bit
structure.

Types like int, and composite types (structs) have different sizes and
alignment rules on different platforms. You didn't specify the same
platform when you used nesC and mig,

David Gay

_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to