Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

receiver.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           receiver.h  -  description
00003                              -------------------
00004     begin                : Mit Mai 22 2002
00005     copyright            : (C) 2002 by Peter Haase
00006     email                : mail@p-haase.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU Lesser General Public            *
00013  *   License as published by the Free Software Foundation; either          *
00014  *   version 2.1 of the License, or (at your option) any later version.    *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00024  *   MA  02111-1307  USA                                                   *
00025  *                                                                         *
00026  ***************************************************************************/
00027 
00028 #ifndef RECEIVER_HEADER
00029 #define RECEIVER_HEADER
00030 
00031 #include <fstream>
00032 #include <string>
00033 #include <exception>
00034 
00035 #include "signals.h"
00036 #include "fft.h"
00037 #include "channel.h"
00038 #include "misc.h"
00039 
00040 #include "basicdevice.h"
00041 #include "interfaces.h"
00042 #include "modulator.h"
00043 
00044 
00045 namespace simthlib
00046 {
00047 
00048 typedef simth::SymSeq SignalSamples;
00049 
00050 class Receiver;
00051 
00052 
00053 std::ostream& operator<<(std::ostream &os, const Receiver &rcv);
00054 
00055 
00070 class Receiver : public simth::Device
00071 {
00072   private:
00073 
00074 
00075   protected:
00076 
00087     virtual int numTimeSamples(int numModSymbols) const = 0;
00088 
00092     virtual int numModSymbols(int numTimeSamples) const = 0;
00093 
00094 
00095   public:
00096 
00100     Receiver(int deviceID, simth::DeviceSystemIntf* system,
00101          const simth::PropertyList& pl);
00102 
00103     virtual ~Receiver(){};
00104 
00105     virtual void process();
00106 
00107     virtual void updateInputLengths();
00108     virtual void updateOutputLengths();
00109 
00110 
00114     virtual void receiveSignal(const simth::TimeSignal& SignalSamples_ptr,
00115                                simth::ModSeq* modSeq,
00116                                double* noise = NULL,
00117                                simth::ModSeq* trans = NULL) = 0;
00118 
00119     virtual void print(std::ostream &os) const;
00120 
00121     virtual void startOfSimulation();
00122 
00125     static void init(const std::string fileName,
00126                      simth::Device** dev,
00127                      simth::DeviceSystemIntf* sysPtr,
00128                      int ID,
00129                      const std::string& regionQualifier = "");
00130 
00135     static simth::Device *findChannel(simth::DeviceSystemIntf* sys);
00136 
00137 };
00138 
00139 }
00140 
00141 #endif

Generated on Tue Aug 9 14:35:11 2005 for simtheticlib by  doxygen 1.4.1