2010-10-12 11:37:41 +00:00
|
|
|
#ifndef COLLECT_VIEW_H
|
|
|
|
#define COLLECT_VIEW_H
|
|
|
|
|
|
|
|
#include "contiki-conf.h"
|
2013-12-12 22:58:52 +00:00
|
|
|
#include "net/linkaddr.h"
|
2010-10-20 15:21:43 +00:00
|
|
|
#include "net/rime/collect.h"
|
2010-10-12 11:37:41 +00: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 21:03:52 +00:00
|
|
|
uint16_t parent;
|
2010-10-12 11:37:41 +00:00
|
|
|
uint16_t parent_etx;
|
2010-10-24 21:03:52 +00:00
|
|
|
uint16_t current_rtmetric;
|
2010-10-12 11:37:41 +00:00
|
|
|
uint16_t num_neighbors;
|
|
|
|
uint16_t beacon_interval;
|
|
|
|
|
|
|
|
uint16_t sensors[10];
|
|
|
|
};
|
|
|
|
|
2010-10-20 15:21:43 +00:00
|
|
|
void collect_view_construct_message(struct collect_view_data_msg *msg,
|
2013-12-12 22:58:52 +00:00
|
|
|
const linkaddr_t *parent,
|
2010-10-20 15:21:43 +00:00
|
|
|
uint16_t etx_to_parent,
|
2010-10-24 21:03:52 +00:00
|
|
|
uint16_t current_rtmetric,
|
2010-10-20 15:21:43 +00:00
|
|
|
uint16_t num_neighbors,
|
|
|
|
uint16_t beacon_interval);
|
2010-10-12 11:37:41 +00:00
|
|
|
|
|
|
|
void collect_view_arch_read_sensors(struct collect_view_data_msg *msg);
|
|
|
|
|
|
|
|
#endif /* COLLECT_VIEW_H */
|