Emulation and simulation of
Wireless Sensor Networks


   Project Page






 Hosted by
SourceForge.net Logo

/home/brennan/n-sim/Vaike/linux/system-addons/system/control/sensor_ctl.c File Reference

Defines/configures individual sensor node. More...

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/time.h>
#include <signal.h>
#include <wait.h>
#include <limits.h>
#include <stdint.h>
#include <gps.h>
#include <pthread.h>
#include <minisoap.h>
#include <ipc.h>
#include "sensor_ctl.h"

Go to the source code of this file.


#define BATTERY_DEV   "/dev/platx/batmon"
#define CONFIG_PATH   "/etc/sensord.conf"
#define GPS_PORT   "2947"
#define IPC_PORT_BASE   3133


void sensor_ctl (SoapEvent *env)
int main (int argc, char *argv[])


struct {
   char *   name
   double   equatorial_radius
   double   inverse_flattening
   char *   szParameter
   char   cIndex
   char   cMask
   char   cSigned
   snd_pcm_format_t   format
   unsigned int   channels
   unsigned int   rate
   char *   szParameter
   sensor_t *   sensors
   app_t *   applications
   double   fix_time
   double   satellites
   double   latitude
   double   longitude
   double   altitude
   double   voltage
   int   num_procs
   app_t *   processes

Detailed Description

Defines/configures individual sensor node.


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


Created: August 28, 2007

2008/02/03 22:00:52

Definition in file sensor_ctl.c.

Define Documentation

#define BATTERY_DEV   "/dev/platx/batmon"

Definition at line 51 of file sensor_ctl.c.

#define CONFIG_PATH   "/etc/sensord.conf"

Definition at line 52 of file sensor_ctl.c.

Referenced by main().

#define GPS_PORT   "2947"

Definition at line 53 of file sensor_ctl.c.

#define IPC_PORT_BASE   3133

Definition at line 54 of file sensor_ctl.c.

Referenced by main().

Function Documentation

int main int  argc,
char *  argv[]

Definition at line 410 of file sensor_ctl.c.

References cmd_thread, CONFIG_PATH, data_thread, error, _app::host, initialize_ipc(), IPC_CMD_PORT, IPC_DATA_PORT, _app::ipc_port, _sensor::ipc_port, IPC_PORT_BASE, my_ip_addr, NET_ADDR_LEN, _app::next, _sensor::next, _app::path, _sensor::path, PATH_MAX, register_cmd_handler(), register_data_handler(), register_soap_handler(), _app::required_apps, _app::running, sensor_ctl(), _app::sinks, soap_thread, status, and strcmp.

void sensor_ctl SoapEvent env  ) 

Definition at line 324 of file sensor_ctl.c.

References Command_Msg, Event_Msg, my_ip_addr, NET_ADDR_LEN, _soap_event::to, and _soap_event::type.

Referenced by main().

Variable Documentation

double altitude

Definition at line 67 of file sensor_ctl.c.

app_t* applications

Definition at line 60 of file sensor_ctl.c.

double fix_time

Definition at line 63 of file sensor_ctl.c.

double latitude

Definition at line 65 of file sensor_ctl.c.

double longitude

Definition at line 66 of file sensor_ctl.c.

int num_procs

Definition at line 71 of file sensor_ctl.c.

app_t* processes

Definition at line 72 of file sensor_ctl.c.

double satellites

Definition at line 64 of file sensor_ctl.c.

sensor_t* sensors

Definition at line 59 of file sensor_ctl.c.

Referenced by Configuration::add_Source_type(), Configuration::clear(), and Configuration::Configuration().

struct { ... } status

Referenced by ctl_client(), and main().

double voltage

Definition at line 70 of file sensor_ctl.c.

© 2007, Los Alamos National Security, LLC.