N-sim
Emulation and simulation of
Wireless Sensor Networks



   Home


   Project Page


   Download


   CVS



   Installation


   Configuration


   Plug-ins




 Hosted by
SourceForge.net Logo

Configuration Class Reference

#include <configuration.h>

List of all members.

Public Member Functions

 Configuration ()
 Configuration (char *)
 ~Configuration ()
void clear ()
Coordinates get_origin ()
char * get_name ()
AVL_tree< unsigned long > * get_nodes ()
Source_type_treeget_sources ()
int modded ()
void set_origin (Coordinates c)
void set_name (const char *n, int len)
void on_start_element (const char *, const char **)
void on_end_element (const char *)
void on_character_data (const char *, int)
void add_Source_type (char *name)
int Source_type_index (char *name)
char * index_Source_type (int idx)
AVL_tree< unsigned long > * Source_type_tree_index (Source_type_tree *t, char *type)
int open (char *)
int save (char *)
char * cfg_to_xml ()
int xml_to_cfg (char *string)
int read_file (FILE *file)
int write_file (FILE *file)


Detailed Description

Definition at line 45 of file configuration.h.


Constructor & Destructor Documentation

Configuration::Configuration  ) 
 

Definition at line 41 of file configuration.cpp.

References name, sensors, and Coordinates::set_ellipsoid().

Configuration::Configuration char *   ) 
 

Definition at line 57 of file configuration.cpp.

References name, sensors, and Coordinates::set_ellipsoid().

Configuration::~Configuration  ) 
 

Definition at line 73 of file configuration.cpp.

References clear().


Member Function Documentation

void Configuration::add_Source_type char *  name  ) 
 

Definition at line 151 of file configuration.cpp.

References Source_type_tree::next, Source_type::next, and sensors.

Referenced by on_start_element().

char * Configuration::cfg_to_xml  ) 
 

Todo:
current time??

Definition at line 323 of file configuration_xml_handling.cpp.

References AVL_node< Key >::elt(), AVL_tree< Key >::find_min(), AVL_node< Key >::get_next(), Coordinates::lat, Coordinates::lon, and name.

Referenced by ctl_server(), and write_file().

void Configuration::clear  ) 
 

Definition at line 79 of file configuration.cpp.

References AVL_tree< Key >::burn(), name, Source_type_tree::next, Source_type::next, and sensors.

Referenced by ~Configuration().

char* Configuration::get_name  ) 
 

Definition at line 94 of file configuration.h.

AVL_tree<unsigned long>* Configuration::get_nodes  ) 
 

Definition at line 95 of file configuration.h.

Referenced by checkpoint().

Coordinates Configuration::get_origin  ) 
 

Definition at line 93 of file configuration.h.

Referenced by main().

Source_type_tree* Configuration::get_sources  ) 
 

Definition at line 96 of file configuration.h.

char * Configuration::index_Source_type int  idx  ) 
 

Definition at line 192 of file configuration.cpp.

References Source_type::get_name(), and Source_type::next.

int Configuration::modded  ) 
 

Definition at line 97 of file configuration.h.

void Configuration::on_character_data const char *  ,
int 
 

Definition at line 262 of file configuration_xml_handling.cpp.

References Coordinates::altitude, Environ_object::get_coordinates(), Coordinates::lat, Coordinates::lon, Environ_object::set_coordinates(), Sensor_device::set_data(), set_name(), and strcmp.

void Configuration::on_end_element const char *   ) 
 

Definition at line 244 of file configuration_xml_handling.cpp.

References strcmp.

void Configuration::on_start_element const char *  ,
const char ** 
 

Definition at line 164 of file configuration_xml_handling.cpp.

References add_Source_type(), AVL_node< Key >::elt(), AVL_tree< Key >::find_min(), AVL_node< Key >::get_next(), AVL_tree< Key >::insert_elt(), MAX_XML_PATH, Coordinates::meters2coords(), Environ_object::modify(), Sensor_node::move(), AVL_tree< Key >::retrieve(), Sensor_node::sensors, Environ_object::set_coordinates(), Source_type_index(), Source_type_tree_index(), and strcmp.

int Configuration::open char *   ) 
 

Definition at line 125 of file configuration.cpp.

References read_file().

Referenced by main().

int Configuration::read_file FILE *  file  ) 
 

Definition at line 485 of file configuration_xml_handling.cpp.

References error, and xml_to_cfg().

Referenced by open().

int Configuration::save char *   ) 
 

Definition at line 138 of file configuration.cpp.

References write_file().

Referenced by main().

void Configuration::set_name const char *  n,
int  len
 

Definition at line 100 of file configuration.h.

References MAX_NAME.

Referenced by on_character_data().

void Configuration::set_origin Coordinates  c  ) 
 

Definition at line 99 of file configuration.h.

int Configuration::Source_type_index char *  name  ) 
 

Definition at line 178 of file configuration.cpp.

References Source_type::get_name(), Source_type::next, and strcmp.

Referenced by on_start_element().

AVL_tree< unsigned long > * Configuration::Source_type_tree_index Source_type_tree t,
char *  type
 

Definition at line 210 of file configuration.cpp.

References Source_type_tree::get_name(), Source_type_tree::next, strcmp, and Source_type_tree::tree.

Referenced by on_start_element().

int Configuration::write_file FILE *  file  ) 
 

Definition at line 504 of file configuration_xml_handling.cpp.

References cfg_to_xml().

Referenced by save().

int Configuration::xml_to_cfg char *  string  ) 
 

Definition at line 460 of file configuration_xml_handling.cpp.

Referenced by read_file().


The documentation for this class was generated from the following files:


© 2007, Los Alamos National Security, LLC.