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

Spectrum.hh

Go to the documentation of this file.
00001 /*
00002 
00003     Spectrum server
00004     Copyright (C) 1999-2002 Jussi Laako
00005 
00006     This program is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU General Public License as published by
00008     the Free Software Foundation; either version 2 of the License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014     GNU General Public License for more details.
00015 
00016     You should have received a copy of the GNU General Public License
00017     along with this program; if not, write to the Free Software
00018     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 
00020 */
00021 
00022 
00023 #include <Alloc.hh>
00024 #include <dsp/DSPOp.hh>
00025 #include <dsp/Filter.hh>
00026 #include <dsp/Hankel.hh>
00027 #include <dsp/RecDecimator.hh>
00028 #include <dsp/ReBuffer.hh>
00029 
00030 #include "Config.h"
00031 #include "LocalMsg.h"
00032 #include "CfgFile.hh"
00033 #include "Messages.hh"
00034 #include "RemoveNoise.hh"
00035 #include "SockClie.hh"
00036 #include "SockOp.hh"
00037 
00038 
00039 #ifndef SPECTRUM_HH
00040     #define SPECTRUM_HH
00041 
00042 
00046     class clSpectrum
00047     {
00048             bool bRun;
00049             bool bReverseOrder;
00050             int iFilterType;
00051             int iInDataSize;
00052             long lInDataCount;
00053             long lFilterSize;
00054             long lDecimation;
00055             long lOldDataCount;
00056             long lNewDataCount;
00057             long lSpectPoints;
00058             long lSpectLen;
00059             long lResSize;
00060             float fLowCorner;
00061             float fHighCorner;
00062             char cpStreamSocket[_POSIX_PATH_MAX + 1];
00063             stSpectReq sReq;
00064             stSpectRes sResHdr;
00065             stRawDataFirst sRawHdr;
00066             clDSPAlloc InData;
00067             clDSPAlloc Window;
00068             clDSPAlloc SpectIn;
00069             clDSPAlloc SpectOut;
00070             clDSPAlloc ResMsg;
00071             clCfgFile Cfg;
00072             clDSPOp DSP;
00073             clDSPOp FFT;
00074             clHankel Hankel;
00075             clReBuffer ReBuffer;
00076             clRecDecimator Decimator;
00077             clRecDecimator WVDDec;
00078             clRemoveNoise RN;
00079             clSpectMsg Msg;
00080             clSockClie SClient;
00081             clSockOp SOpRequest;
00082             clSockOp SOpResult;
00083             clSockOp SOpData;
00084             bool GetCfg ();
00085             bool GetRq ();
00086             bool ConnectStream ();
00087             bool Init ();
00088             void CreateFilter ();
00089             void ProcessLoop ();
00090             bool GetData ();
00091             bool PullData (GDT *, long);
00092         public:
00093             clSpectrum (int, int);
00094             ~clSpectrum ();
00095             int Main ();
00096             void Stop () { bRun = false; }
00097     };
00098 
00099 #endif

Generated on Sun Oct 26 19:11:23 2003 for HASAS by doxygen 1.3.3