N-sim
Emulation and simulation of
Wireless Sensor Networks



   Home


   Project Page


   Download


   CVS



   Installation


   Configuration


   Plug-ins




 Hosted by
SourceForge.net Logo

/home/brennan/n-sim/Vaike/linux/system-addons/networking/mesh_metrics.h File Reference

WSN mesh network routing user metrics. More...

Go to the source code of this file.

Classes

struct  metric_t

Defines

#define MESH_METRICS_PORT   1009
#define MESH_METRICS_INTERVAL   180
#define MESH_METRICS_PACKETS   10
#define MESH_METRICS_ROUND   3

Enumerations

enum  mesh_metric { RELIABILITY = 0, GOODPUT, ENERGY }

Functions

int metric_by_name (char *name)
double compile_mesh_metrics (struct _protocol *proto, enum mesh_metric m, char *destination)
void init_metrics (metric_t *metrics)
int echo_statistics (struct _self *self)
int gather_statistics (struct _self *self)


Detailed Description

WSN mesh network routing user metrics.

Revision
1.1

Original Author: Sean M. Brennan <brennan@lanl.gov>

Author
sean_m_brennan

Created: August 1, 2007

Date
2008/02/03 22:00:48

Definition in file mesh_metrics.h.


Define Documentation

#define MESH_METRICS_INTERVAL   180
 

We use a currently unassigned IANA port * http://www.iana.org/assignments/port-numbers

Definition at line 45 of file mesh_metrics.h.

Referenced by gather_statistics().

#define MESH_METRICS_PACKETS   10
 

Definition at line 46 of file mesh_metrics.h.

Referenced by echo_statistics(), and gather_statistics().

#define MESH_METRICS_PORT   1009
 

Definition at line 41 of file mesh_metrics.h.

Referenced by echo_statistics(), and gather_statistics().

#define MESH_METRICS_ROUND   3
 

Definition at line 47 of file mesh_metrics.h.

Referenced by echo_statistics(), and gather_statistics().


Enumeration Type Documentation

enum mesh_metric
 

Enumerator:
RELIABILITY 
GOODPUT 
ENERGY 

Definition at line 50 of file mesh_metrics.h.


Function Documentation

double compile_mesh_metrics struct _protocol proto,
enum mesh_metric  m,
char *  destination
 

Definition at line 80 of file mesh_metrics.c.

References metric_t::energy, ENERGY, metric_t::goodput, GOODPUT, link_t::hop_count, ip_to_id(), _link_entry::link, _link_entry::metrics, metric_t::reliability, RELIABILITY, and retrieve_entry().

int echo_statistics struct _self self  ) 
 

Definition at line 99 of file mesh_metrics.c.

References error, _self::interface, MESH_METRICS_PACKETS, MESH_METRICS_PORT, MESH_METRICS_ROUND, and timed_recv().

Referenced by run_echo().

int gather_statistics struct _self self  ) 
 

Definition at line 174 of file mesh_metrics.c.

References _self::battery_enabled, error, get_discharge_rate(), _self::interface, ip_to_id(), MESH_METRICS_INTERVAL, MESH_METRICS_PACKETS, MESH_METRICS_PORT, MESH_METRICS_ROUND, retrieve_entry(), their_addr, and timed_recv().

Referenced by run_statistics().

void init_metrics metric_t metrics  ) 
 

Definition at line 72 of file mesh_metrics.c.

References metric_t::energy, metric_t::goodput, and metric_t::reliability.

Referenced by init_link_entry().

int metric_by_name char *  name  ) 
 

Definition at line 58 of file mesh_metrics.c.

References MESH_METRICS, and strcmp.


© 2007, Los Alamos National Security, LLC.