diff --git a/apps/collect-view/collect-view.c b/apps/collect-view/collect-view.c index a8a9a8bb1..e30633513 100644 --- a/apps/collect-view/collect-view.c +++ b/apps/collect-view/collect-view.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: collect-view.c,v 1.3 2010/10/20 15:21:43 adamdunkels Exp $ + * $Id: collect-view.c,v 1.4 2010/10/24 21:03:52 adamdunkels Exp $ */ /** @@ -40,19 +40,18 @@ #include "contiki.h" #include "net/rime/collect-neighbor.h" - #include "net/rime.h" - #include "net/rime/timesynch.h" - #include "collect-view.h" +#include + /*---------------------------------------------------------------------------*/ void collect_view_construct_message(struct collect_view_data_msg *msg, rimeaddr_t *parent, uint16_t parent_etx, - uint16_t parent_rtmetric, + uint16_t current_rtmetric, uint16_t num_neighbors, uint16_t beacon_interval) { @@ -95,9 +94,9 @@ collect_view_construct_message(struct collect_view_data_msg *msg, last_transmit = energest_type_time(ENERGEST_TYPE_TRANSMIT); last_listen = energest_type_time(ENERGEST_TYPE_LISTEN); - rimeaddr_copy(&msg->parent, parent); + memcpy(&msg->parent, &parent->u8[RIMEADDR_SIZE - 2], 2); msg->parent_etx = parent_etx; - msg->parent_rtmetric = parent_rtmetric; + msg->current_rtmetric = current_rtmetric; msg->num_neighbors = num_neighbors; msg->beacon_interval = beacon_interval; diff --git a/apps/collect-view/collect-view.h b/apps/collect-view/collect-view.h index 1de116da5..7df382393 100644 --- a/apps/collect-view/collect-view.h +++ b/apps/collect-view/collect-view.h @@ -13,9 +13,9 @@ struct collect_view_data_msg { uint16_t lpm; uint16_t transmit; uint16_t listen; - rimeaddr_t parent; + uint16_t parent; uint16_t parent_etx; - uint16_t parent_rtmetric; + uint16_t current_rtmetric; uint16_t num_neighbors; uint16_t beacon_interval; @@ -25,7 +25,7 @@ struct collect_view_data_msg { void collect_view_construct_message(struct collect_view_data_msg *msg, rimeaddr_t *parent, uint16_t etx_to_parent, - uint16_t rtmetric_rtmetric, + uint16_t current_rtmetric, uint16_t num_neighbors, uint16_t beacon_interval);