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/OrbisQuartus/shared/sensor_device.h

Go to the documentation of this file.
00001 
00014 /*
00015  * Copyright 2007. Los Alamos National Security, LLC. This material
00016  * was produced under U.S. Government contract DE-AC52-06NA25396 for
00017  * Los Alamos National Laboratory (LANL), which is operated by Los
00018  * Alamos National Security, LLC, for the Department of Energy. The
00019  * U.S. Government has rights to use, reproduce, and distribute this
00020  * software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY,
00021  * LLC, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL
00022  * LIABILITY FOR THE USE OF THIS SOFTWARE. If software is modified to
00023  * produce derivative works, such modified software should be clearly
00024  * marked, so as not to confuse it with the version available from LANL.
00025  *
00026  * Additionally, this program is free software; you can redistribute
00027  * it and/or modify it under the terms of the GNU General Public
00028  * License as published by the Free Software Foundation; version 2 of
00029  * the License. Accordingly, this program is distributed in the hope
00030  * it will be useful, but WITHOUT ANY WARRANTY; without even the
00031  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00032  * PURPOSE. See the GNU General Public License for more details.
00033  */
00034 
00035 #ifndef _SENSOR_DEVICE_H_
00036 #define _SENSOR_DEVICE_H_
00037 
00038 #include <environ_object.h>
00039 #include <spectrum.h>
00040 #include "sensor_node.h"
00041 
00042 
00043 class Sensor_device : public Environ_object {
00044  protected:
00045         Signal min_range, max_range;
00046         char *data_buf;
00047         unsigned int buffer_size;
00048 
00049  public:
00050         Sensor_device();
00051         Sensor_device(unsigned long, char*);
00052         virtual ~Sensor_device();
00053 
00054         char *get_data() { return data_buf; };
00055         void set_data(const char*, int);
00056 
00057         void sq_dist_attenuate(Signal*, double);
00058         void wavefront_propagation(Signal);
00059 
00060         virtual void propagate(Signal) { return; };
00061         virtual void mitigate(Signal*, double) { return; };
00062         virtual char *transduce(Sensor_node*, Signal) { 
00063                 return "";
00064         };
00065 };
00066 
00067 
00068 #endif  // _SENSOR_DEVICE_H_


© 2007, Los Alamos National Security, LLC.