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.c File Reference

WSN mesh network routing metrics. More...

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <syslog.h>
#include "mesh_metrics.h"
#include "mesh_link.h"
#include "mesh_discovery.h"
#include "sensor_self.h"
#include "sensor_mesh.h"

Go to the source code of this file.

Defines

#define MESH_METRICS   3

Functions

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


Detailed Description

WSN mesh network routing 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.c.


Define Documentation

#define MESH_METRICS   3
 

Definition at line 53 of file mesh_metrics.c.

Referenced by metric_by_name().


Function Documentation

double compile_mesh_metrics protocol_t proto,
enum mesh_metric  m,
char *  destination
 

Definition at line 80 of file mesh_metrics.c.

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

int echo_statistics self_t 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 self_t 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.