2010-10-12 13:37:41 +02:00
|
|
|
#ifndef COLLECT_VIEW_H
|
|
|
|
#define COLLECT_VIEW_H
|
|
|
|
|
|
|
|
#include "contiki-conf.h"
|
2013-12-05 22:45:43 +01:00
|
|
|
#include "net/rimeaddr.h"
|
2010-10-20 17:21:43 +02:00
|
|
|
#include "net/rime/collect.h"
|
2010-10-12 13:37:41 +02:00
|
|
|
|
|
|
|
struct collect_view_data_msg {
|
|
|
|
uint16_t len;
|
|
|
|
uint16_t clock;
|
|
|
|
uint16_t timesynch_time;
|
|
|
|
uint16_t cpu;
|
|
|
|
uint16_t lpm;
|
|
|
|
uint16_t transmit;
|
|
|
|
uint16_t listen;
|
2010-10-24 23:03:52 +02:00
|
|
|
uint16_t parent;
|
2010-10-12 13:37:41 +02:00
|
|
|
uint16_t parent_etx;
|
2010-10-24 23:03:52 +02:00
|
|
|
uint16_t current_rtmetric;
|
2010-10-12 13:37:41 +02:00
|
|
|
uint16_t num_neighbors;
|
|
|
|
uint16_t beacon_interval;
|
|
|
|
|
|
|
|
uint16_t sensors[10];
|
|
|
|
};
|
|
|
|
|
2010-10-20 17:21:43 +02:00
|
|
|
void collect_view_construct_message(struct collect_view_data_msg *msg,
|
2012-01-21 10:54:44 +01:00
|
|
|
const rimeaddr_t *parent,
|
2010-10-20 17:21:43 +02:00
|
|
|
uint16_t etx_to_parent,
|
2010-10-24 23:03:52 +02:00
|
|
|
uint16_t current_rtmetric,
|
2010-10-20 17:21:43 +02:00
|
|
|
uint16_t num_neighbors,
|
|
|
|
uint16_t beacon_interval);
|
2010-10-12 13:37:41 +02:00
|
|
|
|
|
|
|
void collect_view_arch_read_sensors(struct collect_view_data_msg *msg);
|
|
|
|
|
|
|
|
#endif /* COLLECT_VIEW_H */
|