Hi!I am trying to create a project where a  node receives rssi values from
 other nodes and pick the  one with the greater  value.So i am  trying  to
 change rssidemo.So i do the following changes


enum {

  MAX_CHILDRENSAMEDEPTH = 4,
  MAX_RSSI =4,
  AM_RSSIMSG = 10
};

typedef nx_struct RssiMsg{
  nx_int16_t rssi;
  nx_int16_t id;//TOS_NODE_ID
  nx_uint16_t counter1;//this  is the counter for  botha arrays that  follow
  uint16_t Depthrssi[MAX_RSSI];//i  store here my rssi values
  nx_uint16_t childrensamedepth[MAX_CHILDRENSAMEDEPTH];//here store the id
 of the  node  that i receive  the node

} RssiMsg;



and i do


RssiMsg local1;

event message_t* RssiMsgReceive.receive(message_t* msg1, void*
payload,uint8_t len) {
        RssiMsg *omsg1 = payload;
        local1.Depthrssi[local1.counter1] = omsg1->rssi;
        local1.childrensamedepth[local1.counter1] = omsg1->id;
        .......
}
when i print  the values of the  reveiving rssi and id something seems to 
be wrong since  for  rssi  i have  like 65515,65520,......and  for my  id
i have 36868. Does anybody know why  is this?Do you  know  any way that  i
can  use the values  of  the  rssi and not just  print them with java?


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

Reply via email to