00001 /* 00002 00003 Spectrum based direction server, header 00004 Copyright (C) 2000-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 <limits.h> 00024 00025 #include <dsp/DSPOp.hh> 00026 00027 #include "Config.h" 00028 #include "LocalMsg.h" 00029 #include "CfgFile.hh" 00030 #include "Messages.hh" 00031 #include "SockClie.hh" 00032 #include "SockOp.hh" 00033 #include "SpectDirDipole.hh" 00034 #include "SpectDirLine.hh" 00035 00036 00037 #ifndef DIRECTION2_HH 00038 #define DIRECTION2_HH 00039 00040 00044 enum 00045 { 00046 DIR2_ARRAY_TYPE_DIPOLE = 0, 00047 DIR2_ARRAY_TYPE_TRIANGLE = 1, 00048 DIR2_ARRAY_TYPE_LINE = 2, 00049 DIR2_ARRAY_TYPE_PLANE = 3, 00050 DIR2_ARRAY_TYPE_CYLINDER = 4, 00051 DIR2_ARRAY_TYPE_SPHERE = 5 00052 }; 00053 00054 00058 class clDirection2 00059 { 00060 bool bRun; 00061 int iFilterType; 00062 int iArrayType; 00063 long lSensorCount; 00064 long lFilterSize; 00065 long lWindowSize; 00066 long lStartChannel; 00067 GDT fSensorSpacing; 00068 char cpStreamSocket[_POSIX_PATH_MAX + 1]; 00069 stDirReq sReq; 00070 stDirRes sResHdr; 00071 stRawDataFirst sRawHdr; 00072 clCfgFile Cfg; 00073 clDSPOp DSP; 00074 clDirMsg Msg; 00075 clSockClie SClient; 00076 clSockOp SOpRequest; 00077 clSockOp SOpResult; 00078 clSockOp SOpData; 00079 clSpectDirDipole *SDDipole; 00080 clSpectDirLine *SDLine; 00081 bool GetCfg (); 00082 bool GetRq (); 00083 bool ConnectStream (); 00084 bool InitDir (); 00085 void ProcessLoop (); 00086 public: 00087 clDirection2 (int, int); 00088 ~clDirection2 (); 00089 int Main (); 00090 }; 00091 00092 #endif 00093
1.3.3