mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
The collect view functions now take the node's routing metric, not the parent's routing metric. The node ID is now given as the last two bytes of the Rime address, to make it play nice with 8-byte Rime addresses.
This commit is contained in:
parent
fd4c0e64aa
commit
d0852a5bcc
@ -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 <string.h>
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
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;
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user