Share

TinyOS

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

Tinyos nesc code problem

You are viewing a single message from this topic. View all messages.

  1. 2009-08-27 17:54:22 UTC
    Hello, I am new to tinyos and nesc. and I have the following data strucuture

    typedef nx_struct rt_link {
    nx_addr_t target;
    nx_addr_t nexthop;
    } rt_link_t;

    typedef struct rt_entry {
    double some_double;
    uint8_t some_int;
    } rt_entry_t;

    uint8_t flag = 0x01;
    uint8_t i=0;
    rt_link_t * buf;
    rt_entry_t table[10];

    if ( flag & 0x01)
    {
    buf[i].target = table[i].some_double;
    buf[i].nexthop = table[i].some_int;
    }

    and if I use
    if ( flag == 1)
    {
    buf[i].target = table[i].some_double;
    buf[i].nexthop = table[i].some_int;
    }

    I will get different value from buf[0], whats the difference?
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.