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

clLofarDemon Class Reference

LOFAR/DEMON calculation server. More...

#include <LofarDemon.hh>

Collaboration diagram for clLofarDemon:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 clLofarDemon (int, int)
 ~clLofarDemon ()
int Exec ()

Public Attributes

volatile bool bRun

Private Member Functions

bool GetRequestMsg ()
bool GetDataHdr ()
bool Initialize ()
bool InitFilter ()
bool InitFFT ()
int MainLoop ()
void CalcSpect ()
bool SendResults ()
void PutData (GDT *, long)
bool PullData (GDT *, long)
void DemonProc (GDT *, long)
void SpectStdDev (GDT *)

Private Attributes

bool bReverseOrder
int iFilterType
int iDCBlock
int iNormIdx
int iNormHistCount
long lFilterSize
long lDecimation
long lDemonDecimation
long lWinSize
long lSpectSize
long lNewDataSize
long lOldDataSize
long lAvgCntr
long lHistCntr
GDT * fpWinFunc
GDT * fpDataBuf
GDT * fpSpectRes
GDT * fpLofarRes
GDT * fpNormHist
stRawDataFirst sDataHdr
stLofarReq sLofarRq
stLofarRes sLofarResHdr
clDSPAlloc WinFunc
clDSPAlloc DataBuf
clDSPAlloc SpectRes
clDSPAlloc LofarRes
clDSPAlloc HistoryBuf
clDSPAlloc NormHist
clCfgFile Cfg
clDSPOp DSP
clLofarMsg LofarMsg
clReBuffer ReBuffer
 This is used instead of decimator if decimation factor is < 2.

clRecDecimator Decimator
 This is always the last decimation.

clRecDecimator DemonDecimator
 DEMON BP decimation.

clIIRCascade DCBlockIIR
 DC notch for DEMON.

clFlipBand FlipBand
 Odd frequency band flipping.

clRemoveNoise RemoveNoise
clSockClie SockClie
clSockOp SOpRequest
clSockOp SOpResult
clSockOp SOpData

Detailed Description

LOFAR/DEMON calculation server.

Definition at line 47 of file LofarDemon.hh.


Constructor & Destructor Documentation

clLofarDemon::clLofarDemon int  ,
int 
 

Definition at line 758 of file LofarDemon.cc.

References bRun, fpDataBuf, _stLofarRes::fPeakLevel, fpLofarRes, fpSpectRes, fpWinFunc, lAvgCntr, lHistCntr, clSockOp::SetHandle(), sLofarResHdr, SOpRequest, and SOpResult.

clLofarDemon::~clLofarDemon  ) 
 

Definition at line 773 of file LofarDemon.cc.


Member Function Documentation

bool clLofarDemon::GetRequestMsg  )  [private]
 

Definition at line 104 of file LofarDemon.cc.

References clLofarMsg::GetRequest(), GLOBAL_HEADER_LEN, LOFAR_REQ_TIMEOUT, LofarMsg, clSockOp::ReadN(), clSockOp::ReadSelect(), sLofarRq, and SOpRequest.

Referenced by Exec().

bool clLofarDemon::GetDataHdr  )  [private]
 

Definition at line 117 of file LofarDemon.cc.

References Cfg, clSockClie::Connect(), clCfgFile::GetStr(), _stLofarReq::iChannel, _stRawDataReq::iChannel, LOFAR_RAW1ST_TIMEOUT, clSockOp::ReadN(), clSockOp::ReadSelect(), SD_CFGFILE, sDataHdr, clCfgFile::SetFileName(), clSockOp::SetHandle(), sLofarRq, SockClie, SOpData, and clSockOp::WriteN().

Referenced by Exec().

bool clLofarDemon::Initialize  )  [private]
 

Definition at line 141 of file LofarDemon.cc.

References Cfg, InitFFT(), InitFilter(), LOFAR_CFGFILE, and clCfgFile::SetFileName().

Referenced by Exec().

bool clLofarDemon::InitFilter  )  [private]
 

Definition at line 150 of file LofarDemon.cc.

References bDebug, _stLofarReq::bDemon, bReverseOrder, Cfg, DCBlockIIR, Decimator, DemonDecimator, _stRawDataFirst::dSampleRate, _stLofarRes::fDemonBand, _stLofarRes::fHighFreq, _stLofarReq::fHighFreq, FlipBand, _stLofarRes::fLowFreq, _stLofarReq::fLowFreq, GDT, clCfgFile::GetInt(), iDCBlock, iFilterType, lDecimation, lDemonDecimation, lFilterSize, LOFAR_DEF_DC_BLOCK, LOFAR_DEF_FILTER_SIZE, sDataHdr, sLofarResHdr, and sLofarRq.

Referenced by Initialize().

bool clLofarDemon::InitFFT  )  [private]
 

Definition at line 255 of file LofarDemon.cc.

References bDebug, Cfg, cpaWindowFuncs, DataBuf, DSP, fpDataBuf, fpLofarRes, fpNormHist, fpSpectRes, fpWinFunc, _stLofarReq::fWinParameter, GDT, clCfgFile::GetInt(), HistoryBuf, _stLofarReq::iClip, iNormHistCount, iNormIdx, _stLofarReq::iOverlap, _stLofarReq::iType, _stLofarReq::iWindow, _stLofarReq::lMeanLength, lNewDataSize, LOFAR_NWINS, LofarRes, lOldDataSize, _stLofarRes::lSpectLength, lSpectSize, _stLofarReq::lWinLength, lWinSize, MSG_LOFAR_CLIP_SLIDING, MSG_LOFAR_TYPE_AUTOCORR, MSG_LOFAR_TYPE_CEPSTRUM, MSG_LOFAR_TYPE_FFT, MSG_LOFAR_WIN_BARTLETT, MSG_LOFAR_WIN_BLACKMAN, MSG_LOFAR_WIN_BM_HARRIS, MSG_LOFAR_WIN_COS_TAPER, MSG_LOFAR_WIN_EXP, MSG_LOFAR_WIN_FLATTOP, MSG_LOFAR_WIN_HAMMING, MSG_LOFAR_WIN_HANNING, MSG_LOFAR_WIN_KAI_BES, MSG_LOFAR_WIN_KAISER, MSG_LOFAR_WIN_RECT, MSG_LOFAR_WIN_TUKEY, NormHist, sLofarResHdr, sLofarRq, SpectRes, and WinFunc.

Referenced by Initialize().

int clLofarDemon::MainLoop  )  [private]
 

Definition at line 348 of file LofarDemon.cc.

References bDebug, _stLofarReq::bDemon, bRun, CalcSpect(), _stRawDataFirst::dSampleRate, DSP, _stLofarRes::fLineTime, fpDataBuf, _stLofarRes::fPeakLevel, fpLofarRes, GDT, clSockOp::GetRecvBufSize(), lAvgCntr, _stLofarReq::lAvgCount, lDecimation, lDemonDecimation, lFilterSize, lNewDataSize, lOldDataSize, lSpectSize, _stLofarReq::lWinLength, PullData(), PutData(), clSockOp::ReadN(), sDataHdr, SendResults(), clSockOp::SetRecvBufSize(), sLofarResHdr, sLofarRq, SOpData, and _stLofarRes::sTimeStamp.

Referenced by Exec().

void clLofarDemon::CalcSpect  )  [private]
 

Definition at line 417 of file LofarDemon.cc.

References _stLofarReq::bDemon, _stLofarReq::bLinear, clRemoveNoise::Diff(), DSP, _stLofarReq::fAlpha, _stLofarRes::fLowFreq, fpDataBuf, fpLofarRes, fpNormHist, fpSpectRes, fpWinFunc, GCDT, GDT, _stLofarReq::iClip, iNormHistCount, iNormIdx, clRemoveNoise::InvDiff(), _stLofarReq::iRemoveNoise, _stLofarReq::iType, lAvgCntr, _stLofarReq::lAvgCount, _stLofarReq::lGapLength, _stLofarReq::lMeanLength, lSpectSize, _stLofarReq::lWinLength, lWinSize, MSG_LOFAR_BNER_DIFF, MSG_LOFAR_BNER_IDIFF, MSG_LOFAR_BNER_NONE, MSG_LOFAR_BNER_OTA, MSG_LOFAR_BNER_STDDEV, MSG_LOFAR_BNER_TPSW, MSG_LOFAR_CLIP_10DB, MSG_LOFAR_CLIP_20DB, MSG_LOFAR_CLIP_50P, MSG_LOFAR_CLIP_75P, MSG_LOFAR_CLIP_BOTH, MSG_LOFAR_CLIP_LOW, MSG_LOFAR_CLIP_MEAN, MSG_LOFAR_CLIP_MEDIAN, MSG_LOFAR_CLIP_NONE, MSG_LOFAR_CLIP_OFFSET, MSG_LOFAR_CLIP_OFFSET2, MSG_LOFAR_CLIP_OFFSET3, MSG_LOFAR_CLIP_SLIDING, MSG_LOFAR_TYPE_AUTOCORR, MSG_LOFAR_TYPE_CEPSTRUM, MSG_LOFAR_TYPE_FFT, clRemoveNoise::OTA(), RemoveNoise, sLofarResHdr, sLofarRq, SpectStdDev(), and clRemoveNoise::TPSW().

Referenced by MainLoop().

bool clLofarDemon::SendResults  )  [private]
 

Definition at line 614 of file LofarDemon.cc.

References bDebug, fpLofarRes, GDT, clSockOp::GetErrno(), GLOBAL_HEADER_LEN, LOFAR_TIMEOUT, LofarMsg, lSpectSize, clLofarMsg::SetResult(), sLofarResHdr, SOpResult, clSockOp::WriteN(), and clSockOp::WriteSelect().

Referenced by MainLoop().

void clLofarDemon::PutData GDT *  ,
long 
[private]
 

Definition at line 644 of file LofarDemon.cc.

References _stLofarReq::bDemon, bReverseOrder, DCBlockIIR, Decimator, DemonDecimator, DSP, FlipBand, iDCBlock, lDecimation, ReBuffer, and sLofarRq.

Referenced by MainLoop().

bool clLofarDemon::PullData GDT *  ,
long 
[private]
 

Definition at line 694 of file LofarDemon.cc.

References _stLofarReq::bDemon, bReverseOrder, Decimator, FlipBand, lDecimation, ReBuffer, and sLofarRq.

Referenced by MainLoop().

void clLofarDemon::DemonProc GDT *  ,
long 
[private]
 

Definition at line 718 of file LofarDemon.cc.

void clLofarDemon::SpectStdDev GDT *   )  [private]
 

Definition at line 729 of file LofarDemon.cc.

References DSP, GDT, HistoryBuf, lHistCntr, _stLofarReq::lMeanLength, lSpectSize, and sLofarRq.

Referenced by CalcSpect().

int clLofarDemon::Exec  ) 
 

Definition at line 778 of file LofarDemon.cc.

References bDebug, GetDataHdr(), GetRequestMsg(), Initialize(), and MainLoop().

Referenced by main().


Member Data Documentation

bool clLofarDemon::bReverseOrder [private]
 

Definition at line 49 of file LofarDemon.hh.

Referenced by InitFilter(), PullData(), and PutData().

int clLofarDemon::iFilterType [private]
 

Definition at line 50 of file LofarDemon.hh.

Referenced by InitFilter().

int clLofarDemon::iDCBlock [private]
 

Definition at line 51 of file LofarDemon.hh.

Referenced by InitFilter(), and PutData().

int clLofarDemon::iNormIdx [private]
 

Definition at line 52 of file LofarDemon.hh.

Referenced by CalcSpect(), and InitFFT().

int clLofarDemon::iNormHistCount [private]
 

Definition at line 53 of file LofarDemon.hh.

Referenced by CalcSpect(), and InitFFT().

long clLofarDemon::lFilterSize [private]
 

Definition at line 54 of file LofarDemon.hh.

Referenced by InitFilter(), and MainLoop().

long clLofarDemon::lDecimation [private]
 

Definition at line 55 of file LofarDemon.hh.

Referenced by InitFilter(), MainLoop(), PullData(), and PutData().

long clLofarDemon::lDemonDecimation [private]
 

Definition at line 56 of file LofarDemon.hh.

Referenced by InitFilter(), and MainLoop().

long clLofarDemon::lWinSize [private]
 

Definition at line 57 of file LofarDemon.hh.

Referenced by CalcSpect(), and InitFFT().

long clLofarDemon::lSpectSize [private]
 

Definition at line 58 of file LofarDemon.hh.

Referenced by CalcSpect(), InitFFT(), MainLoop(), SendResults(), and SpectStdDev().

long clLofarDemon::lNewDataSize [private]
 

Definition at line 59 of file LofarDemon.hh.

Referenced by InitFFT(), and MainLoop().

long clLofarDemon::lOldDataSize [private]
 

Definition at line 60 of file LofarDemon.hh.

Referenced by InitFFT(), and MainLoop().

long clLofarDemon::lAvgCntr [private]
 

Definition at line 61 of file LofarDemon.hh.

Referenced by CalcSpect(), clLofarDemon(), and MainLoop().

long clLofarDemon::lHistCntr [private]
 

Definition at line 62 of file LofarDemon.hh.

Referenced by clLofarDemon(), and SpectStdDev().

GDT* clLofarDemon::fpWinFunc [private]
 

Definition at line 63 of file LofarDemon.hh.

Referenced by CalcSpect(), clLofarDemon(), and InitFFT().

GDT* clLofarDemon::fpDataBuf [private]
 

Definition at line 64 of file LofarDemon.hh.

Referenced by CalcSpect(), clLofarDemon(), InitFFT(), and MainLoop().

GDT* clLofarDemon::fpSpectRes [private]
 

Definition at line 65 of file LofarDemon.hh.

Referenced by CalcSpect(), clLofarDemon(), and InitFFT().

GDT* clLofarDemon::fpLofarRes [private]
 

Definition at line 66 of file LofarDemon.hh.

Referenced by CalcSpect(), clLofarDemon(), InitFFT(), MainLoop(), and SendResults().

GDT* clLofarDemon::fpNormHist [private]
 

Definition at line 67 of file LofarDemon.hh.

Referenced by CalcSpect(), and InitFFT().

stRawDataFirst clLofarDemon::sDataHdr [private]
 

Definition at line 68 of file LofarDemon.hh.

Referenced by GetDataHdr(), InitFilter(), and MainLoop().

stLofarReq clLofarDemon::sLofarRq [private]
 

Definition at line 69 of file LofarDemon.hh.

Referenced by CalcSpect(), GetDataHdr(), GetRequestMsg(), InitFFT(), InitFilter(), MainLoop(), PullData(), PutData(), and SpectStdDev().

stLofarRes clLofarDemon::sLofarResHdr [private]
 

Definition at line 70 of file LofarDemon.hh.

Referenced by CalcSpect(), clLofarDemon(), InitFFT(), InitFilter(), MainLoop(), and SendResults().

clDSPAlloc clLofarDemon::WinFunc [private]
 

Definition at line 71 of file LofarDemon.hh.

Referenced by InitFFT().

clDSPAlloc clLofarDemon::DataBuf [private]
 

Definition at line 72 of file LofarDemon.hh.

Referenced by InitFFT().

clDSPAlloc clLofarDemon::SpectRes [private]
 

Definition at line 73 of file LofarDemon.hh.

Referenced by InitFFT().

clDSPAlloc clLofarDemon::LofarRes [private]
 

Definition at line 74 of file LofarDemon.hh.

Referenced by InitFFT().

clDSPAlloc clLofarDemon::HistoryBuf [private]
 

Definition at line 75 of file LofarDemon.hh.

Referenced by InitFFT(), and SpectStdDev().

clDSPAlloc clLofarDemon::NormHist [private]
 

Definition at line 76 of file LofarDemon.hh.

Referenced by InitFFT().

clCfgFile clLofarDemon::Cfg [private]
 

Definition at line 77 of file LofarDemon.hh.

Referenced by GetDataHdr(), InitFFT(), InitFilter(), and Initialize().

clDSPOp clLofarDemon::DSP [private]
 

Definition at line 78 of file LofarDemon.hh.

Referenced by CalcSpect(), InitFFT(), MainLoop(), PutData(), and SpectStdDev().

clLofarMsg clLofarDemon::LofarMsg [private]
 

Definition at line 79 of file LofarDemon.hh.

Referenced by GetRequestMsg(), and SendResults().

clReBuffer clLofarDemon::ReBuffer [private]
 

This is used instead of decimator if decimation factor is < 2.

Definition at line 80 of file LofarDemon.hh.

Referenced by PullData(), and PutData().

clRecDecimator clLofarDemon::Decimator [private]
 

This is always the last decimation.

Definition at line 81 of file LofarDemon.hh.

Referenced by InitFilter(), PullData(), and PutData().

clRecDecimator clLofarDemon::DemonDecimator [private]
 

DEMON BP decimation.

Definition at line 82 of file LofarDemon.hh.

Referenced by InitFilter(), and PutData().

clIIRCascade clLofarDemon::DCBlockIIR [private]
 

DC notch for DEMON.

Definition at line 83 of file LofarDemon.hh.

Referenced by InitFilter(), and PutData().

clFlipBand clLofarDemon::FlipBand [private]
 

Odd frequency band flipping.

Definition at line 84 of file LofarDemon.hh.

Referenced by InitFilter(), PullData(), and PutData().

clRemoveNoise clLofarDemon::RemoveNoise [private]
 

Definition at line 85 of file LofarDemon.hh.

Referenced by CalcSpect().

clSockClie clLofarDemon::SockClie [private]
 

Definition at line 86 of file LofarDemon.hh.

Referenced by GetDataHdr().

clSockOp clLofarDemon::SOpRequest [private]
 

Definition at line 87 of file LofarDemon.hh.

Referenced by clLofarDemon(), and GetRequestMsg().

clSockOp clLofarDemon::SOpResult [private]
 

Definition at line 88 of file LofarDemon.hh.

Referenced by clLofarDemon(), and SendResults().

clSockOp clLofarDemon::SOpData [private]
 

Definition at line 89 of file LofarDemon.hh.

Referenced by GetDataHdr(), and MainLoop().

volatile bool clLofarDemon::bRun
 

Definition at line 103 of file LofarDemon.hh.

Referenced by clLofarDemon(), and MainLoop().


The documentation for this class was generated from the following files:
Generated on Sun Oct 26 19:12:22 2003 for HASAS by doxygen 1.3.3