Show sympathy_app.h syntax highlighted
/* ex: set tabstop=2 expandtab shiftwidth=2 softtabstop=2: */
#ifndef SYMPATHY_APP_H
#define SYMPATHY_APP_H
#include "sympathy_dev.h"
#include <tos-contrib/sympathy/tos/lib/RingBuff.h>
#include <tos-contrib/sympathy/tos/lib/Sympathy.h>
#include <tos-contrib/sympathy/tos/lib/Sympathy_events.h>
#define SSTATUS_APP_BASE "/dev/sympathy_app"
#define EVENT_REQUEST_PERIOD_MSEC (METRICS_PERIOD_MSEC + 15000)
#define NUM_RB_ELEMS RING_BUF_NUM_ELEMS
#define SEVENTS_STATUS "all_events"
#define SEVENTS_UPDATE "event_update"
#define SEVENTS_CMD "event_cmd"
#define TIME_DIFF_THRESH 100000
#define SMAX_SRCS 100
typedef struct sevent_rb {
if_id_t addr;
/* Event-related structs */
uint16_t rb_head; /* Points at first empty element */
uint16_t rb_num_elems;
uint32_t last_event_time_mins;
uint8_t rb_full;
RBelem_t rb[NUM_RB_ELEMS];
int pkts_rx_from_node;
// struct timeval last_updated_pkts_rx;
struct timeval event_time;
} sevent_rb_t;
typedef struct sevent_ctx {
int num_srcs;
uint16_t node_ctr;
sevent_rb_t events[SMAX_SRCS];
int sevent_req_period_secs;
int num_sevent_reqs;
lu_context_t* update_lu;
g_event_t* sreq_timer;
lu_context_t* mh_link;
} sevent_ctx_t;
#endif
See more files for this project here
EmStar is a software system for developing and deploying wireless sensor networks involving Linux-based platforms. As the wireless sensor network community has attempted to deploy more complex designs---large-scale, long-lived systems that need self-organization and adaptivity---a number of difficult software design issues have arisen. Advances in software design have not kept pace with the capabilities of hardware. This is because designing for an adaptive, efficient, and useful sensor network has turned out to be surprisingly complex and difficult. EmStar is a Linux-based software framework, whose goal is to dramatically reduce this complexity, enabling work to be shared and reused, and simplifying and speeding the design of new sensor network applications.
Project homepage:
http://cvs.cens.ucla.edu/emstar/
Programming language(s): C,Shell Script
License: other
sympathy.h
sympathy_app.h
sympathy_dev.h
sympathy_routing.h