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

clDirection Class Reference

Direction calculation server. More...

#include <Direction.hh>

Collaboration diagram for clDirection:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 clDirection (int, int)
 ~clDirection ()
int Exec ()
 Main method, call this only.

void * ReceiveData (void *)
 Receive data thread.

void * ProcessData (void *)
 Dataprocessing thread (there can be multiple instances of these).

void * SendResults (void *)
 Send results thread.


Private Member Functions

bool GetRequest ()
bool GetFirstMsg ()
bool InitArray ()
void Stop ()
void Scale (GDT *)
void CalcDipoleBeams (int, long, long, bool)
void CalcDipoleCorrs (int, long, long, bool)
void StartTiming ()
void StopTiming ()

Private Attributes

volatile bool bRun
volatile bool bConnected
int iProcessorCount
int iStartChannel
int iArrayType
int iShadingType
int iHorizSensors
int iVertSensors
int iRawBufSize
volatile int iResultsRefCount
long lWindowSize
double dTimingReal
GDT fSensorSpacing
GDT fpHorizSpacing [BF_MAX_X_SENSORS]
GDT fpVertSpacing [BF_MAX_Y_SENSORS]
clock_t ctTiming
pthread_t tidReceiveData
pthread_t tidpProcessData [DIR_MAX_CPUS]
pthread_t tidSendResults
stDirReq sDirRequest
stDirRes sDirResHdr
stRawDataFirst sDataFirst
clCondition CndDataReady
clCondition CndResultsReady
clMutex MtxClassData
clMutex MtxDataReady
clMutex MtxResultsReady
clCfgFileCfgStreamDist
clCfgFileCfgDirection
clSockClie SClient
clSockOpSOpRequest
clSockOpSOpResult
clSockOpSOpData
clDirMsg DirMsg
clDSPAlloc RawData
clDSPAlloc DirResData
clDSPOp DSP
clRemoveNoise NoiseEstRem
clArrayDipole ArDipole
clBeamDipoleBeDipole [DIR_MAX_CPUS]
clCorrDipoleCoDipole [DIR_MAX_CPUS]

Detailed Description

Direction calculation server.

Definition at line 67 of file Direction.hh.


Constructor & Destructor Documentation

clDirection::clDirection int  ,
int 
 

Definition at line 390 of file Direction.cc.

References bConnected, BeDipole, bRun, CfgDirection, CfgStreamDist, CoDipole, DIR_CFGFILE, DIR_DEF_WIN_SIZE, DIR_MAX_CPUS, iProcessorCount, iResultsRefCount, iStartChannel, lWindowSize, SD_CFGFILE, SOpData, SOpRequest, and SOpResult.

clDirection::~clDirection  ) 
 

Definition at line 413 of file Direction.cc.

References BeDipole, CfgDirection, CfgStreamDist, CoDipole, iProcessorCount, SOpData, SOpRequest, and SOpResult.


Member Function Documentation

bool clDirection::GetRequest  )  [private]
 

Definition at line 106 of file Direction.cc.

References bDebug, DIR_REQ_TIMEOUT, DirMsg, clSockOp::GetErrno(), clDirMsg::GetRequest(), GLOBAL_HEADER_LEN, clSockOp::ReadN(), clSockOp::ReadSelect(), sDirRequest, and SOpRequest.

Referenced by Exec().

bool clDirection::GetFirstMsg  )  [private]
 

Definition at line 126 of file Direction.cc.

References bDebug, DIR_RAW1ST_TIMEOUT, clSockOp::GetErrno(), _stRawDataReq::iChannel, clSockOp::ReadN(), clSockOp::ReadSelect(), sDataFirst, SOpData, and clSockOp::WriteN().

Referenced by Exec().

bool clDirection::InitArray  )  [private]
 

Definition at line 153 of file Direction.cc.

References ArDipole, bDaemon, bDebug, BeDipole, CfgDirection, cpaArrayTypes, DIR_ARRAY_TYPE_DIPOLE, DIR_ARRAY_TYPE_LINE, DIR_ARRAY_TYPE_TRIANGLE, _stRawDataFirst::dSampleRate, _stDirRes::fIntegrationTime, _stDirReq::fIntegrationTime, _stDirReq::fLowFreqLimit, fpHorizSpacing, fpVertSpacing, fSensorSpacing, _stDirReq::fSoundSpeed, GDT, clCfgFile::GetFlt(), clCfgFile::GetFltArray(), clCfgFile::GetInt(), clBeamDipole::GetIntegrationTime(), _stDirReq::iAlgorithm, iArrayType, _stRawDataFirst::iChannels, iHorizSensors, clArrayDipole::Initialize(), iProcessorCount, iRawBufSize, iShadingType, iVertSensors, lWindowSize, MSG_DIR_ALG_BEAM, sDataFirst, sDirRequest, and sDirResHdr.

Referenced by Exec().

void clDirection::Stop  )  [private]
 

Definition at line 260 of file Direction.cc.

References bRun, and MtxClassData.

Referenced by ReceiveData(), and SendResults().

void clDirection::Scale GDT *   )  [inline, private]
 

Definition at line 268 of file Direction.cc.

References _stDirReq::fScalingExp, GDT, _stDirReq::iScaling, MSG_DIR_SCAL_EXP, MSG_DIR_SCAL_LIN, MSG_DIR_SCAL_LOG, MSG_DIR_SCAL_SIN, and sDirRequest.

Referenced by CalcDipoleBeams(), and CalcDipoleCorrs().

void clDirection::CalcDipoleBeams int  ,
long  ,
long  ,
bool 
[private]
 

Definition at line 293 of file Direction.cc.

References BeDipole, DirResData, _stDirReq::fLeftDir, _stDirReq::fRightDir, GDT, _stDirReq::lSectorCount, MtxClassData, clBeamDipole::Process(), Scale(), sDirRequest, and clBeamDipole::SetHistory().

Referenced by ProcessData().

void clDirection::CalcDipoleCorrs int  ,
long  ,
long  ,
bool 
[private]
 

Definition at line 322 of file Direction.cc.

References CoDipole, DirResData, _stDirReq::fLeftDir, _stDirReq::fRightDir, GDT, _stDirReq::lSectorCount, MtxClassData, clCorrDipole::Process(), Scale(), sDirRequest, and clCorrDipole::SetHistory().

Referenced by ProcessData().

void clDirection::StartTiming  )  [private]
 

Definition at line 350 of file Direction.cc.

References ctTiming, and dTimingReal.

Referenced by ProcessData().

void clDirection::StopTiming  )  [private]
 

Definition at line 361 of file Direction.cc.

References bDebug, ctTiming, dTimingReal, _stDirRes::fIntegrationTime, and sDirResHdr.

Referenced by ProcessData().

int clDirection::Exec  ) 
 

Main method, call this only.

Definition at line 430 of file Direction.cc.

References bDaemon, bDebug, CfgDirection, CfgStreamDist, clSockClie::Connect(), DirResData, GDT, GetFirstMsg(), clCfgFile::GetInt(), GetRequest(), clCfgFile::GetStr(), InitArray(), iProcessorCount, iRawBufSize, _stDirReq::iRemoveNoise, iStartChannel, _stDirReq::lSectorCount, lWindowSize, MSG_DIR_BNER_OTA, MSG_DIR_BNER_TPSW, MtxClassData, RawData, SClient, sDirRequest, SOpData, ThrProcessData(), ThrReceiveData(), ThrSendResults(), tidpProcessData, tidReceiveData, and tidSendResults.

Referenced by main().

void * clDirection::ReceiveData void *   ) 
 

Receive data thread.

Definition at line 512 of file Direction.cc.

References clArrayDipole::AddData(), ArDipole, bDebug, bRun, CndDataReady, DIR_ARRAY_TYPE_CYLINDER, DIR_ARRAY_TYPE_DIPOLE, DIR_ARRAY_TYPE_LINE, DIR_ARRAY_TYPE_PLANE, DIR_ARRAY_TYPE_SPHERE, DIR_ARRAY_TYPE_TRIANGLE, DIR_TIMEOUT, clSockOp::GetErrno(), iArrayType, _stRawDataFirst::iChannels, iRawBufSize, iStartChannel, MtxClassData, MtxDataReady, RawData, clSockOp::ReadN(), clSockOp::ReadSelect(), sDataFirst, SOpData, and Stop().

Referenced by ThrReceiveData().

void * clDirection::ProcessData void *   ) 
 

Dataprocessing thread (there can be multiple instances of these).

Definition at line 559 of file Direction.cc.

References clCorrDipole::AddData(), clBeamDipole::AddData(), bDebug, BeDipole, bRun, CalcDipoleBeams(), CalcDipoleCorrs(), CndDataReady, CndResultsReady, CoDipole, DIR_ARRAY_TYPE_CYLINDER, DIR_ARRAY_TYPE_DIPOLE, DIR_ARRAY_TYPE_LINE, DIR_ARRAY_TYPE_PLANE, DIR_ARRAY_TYPE_SPHERE, DIR_ARRAY_TYPE_TRIANGLE, _stDirRes::fPeakLevel, clCorrDipole::GetPeakLevel(), clBeamDipole::GetPeakLevel(), _stDirReq::iAlgorithm, iArrayType, iProcessorCount, iResultsRefCount, _stDirReq::lSectorCount, MSG_DIR_ALG_BEAM, MSG_DIR_ALG_CORR, MtxClassData, MtxDataReady, MtxResultsReady, sDirRequest, sDirResHdr, StartTiming(), StopTiming(), and tidpProcessData.

Referenced by ThrProcessData().

void * clDirection::SendResults void *   ) 
 

Send results thread.

Definition at line 681 of file Direction.cc.

References bDebug, _stDirReq::bNormalize, bRun, CndResultsReady, DIR_TIMEOUT, DirMsg, DirResData, DSP, _stDirReq::fAlpha, GDT, clSockOp::GetErrno(), GLOBAL_HEADER_LEN, iProcessorCount, _stDirReq::iRemoveNoise, iResultsRefCount, _stDirReq::lGapLength, _stDirReq::lMeanLength, _stDirReq::lSectorCount, MSG_DIR_BNER_OTA, MSG_DIR_BNER_TPSW, MtxClassData, MtxResultsReady, NoiseEstRem, clRemoveNoise::OTA(), sDirRequest, sDirResHdr, clDirMsg::SetResult(), SOpResult, _stDirRes::sTimeStamp, Stop(), clRemoveNoise::TPSW(), clSockOp::WriteN(), and clSockOp::WriteSelect().

Referenced by ThrSendResults().


Member Data Documentation

volatile bool clDirection::bRun [private]
 

Definition at line 70 of file Direction.hh.

Referenced by clDirection(), ProcessData(), ReceiveData(), SendResults(), and Stop().

volatile bool clDirection::bConnected [private]
 

Definition at line 71 of file Direction.hh.

Referenced by clDirection().

int clDirection::iProcessorCount [private]
 

Definition at line 72 of file Direction.hh.

Referenced by clDirection(), Exec(), InitArray(), ProcessData(), SendResults(), and ~clDirection().

int clDirection::iStartChannel [private]
 

Definition at line 73 of file Direction.hh.

Referenced by clDirection(), Exec(), and ReceiveData().

int clDirection::iArrayType [private]
 

Definition at line 74 of file Direction.hh.

Referenced by InitArray(), ProcessData(), and ReceiveData().

int clDirection::iShadingType [private]
 

Definition at line 75 of file Direction.hh.

Referenced by InitArray().

int clDirection::iHorizSensors [private]
 

Definition at line 76 of file Direction.hh.

Referenced by InitArray().

int clDirection::iVertSensors [private]
 

Definition at line 77 of file Direction.hh.

Referenced by InitArray().

int clDirection::iRawBufSize [private]
 

Definition at line 78 of file Direction.hh.

Referenced by Exec(), InitArray(), and ReceiveData().

volatile int clDirection::iResultsRefCount [private]
 

Definition at line 79 of file Direction.hh.

Referenced by clDirection(), ProcessData(), and SendResults().

long clDirection::lWindowSize [private]
 

Definition at line 80 of file Direction.hh.

Referenced by clDirection(), Exec(), and InitArray().

double clDirection::dTimingReal [private]
 

Definition at line 81 of file Direction.hh.

Referenced by StartTiming(), and StopTiming().

GDT clDirection::fSensorSpacing [private]
 

Definition at line 82 of file Direction.hh.

Referenced by InitArray().

GDT clDirection::fpHorizSpacing[BF_MAX_X_SENSORS] [private]
 

Definition at line 83 of file Direction.hh.

Referenced by InitArray().

GDT clDirection::fpVertSpacing[BF_MAX_Y_SENSORS] [private]
 

Definition at line 84 of file Direction.hh.

Referenced by InitArray().

clock_t clDirection::ctTiming [private]
 

Definition at line 85 of file Direction.hh.

Referenced by StartTiming(), and StopTiming().

pthread_t clDirection::tidReceiveData [private]
 

Definition at line 86 of file Direction.hh.

Referenced by Exec().

pthread_t clDirection::tidpProcessData[DIR_MAX_CPUS] [private]
 

Definition at line 87 of file Direction.hh.

Referenced by Exec(), and ProcessData().

pthread_t clDirection::tidSendResults [private]
 

Definition at line 88 of file Direction.hh.

Referenced by Exec().

stDirReq clDirection::sDirRequest [private]
 

Definition at line 90 of file Direction.hh.

Referenced by CalcDipoleBeams(), CalcDipoleCorrs(), Exec(), GetRequest(), InitArray(), ProcessData(), Scale(), and SendResults().

stDirRes clDirection::sDirResHdr [private]
 

Definition at line 91 of file Direction.hh.

Referenced by InitArray(), ProcessData(), SendResults(), and StopTiming().

stRawDataFirst clDirection::sDataFirst [private]
 

Definition at line 92 of file Direction.hh.

Referenced by GetFirstMsg(), InitArray(), and ReceiveData().

clCondition clDirection::CndDataReady [private]
 

Definition at line 94 of file Direction.hh.

Referenced by ProcessData(), and ReceiveData().

clCondition clDirection::CndResultsReady [private]
 

Definition at line 95 of file Direction.hh.

Referenced by ProcessData(), and SendResults().

clMutex clDirection::MtxClassData [private]
 

Definition at line 96 of file Direction.hh.

Referenced by CalcDipoleBeams(), CalcDipoleCorrs(), Exec(), ProcessData(), ReceiveData(), SendResults(), and Stop().

clMutex clDirection::MtxDataReady [private]
 

Definition at line 97 of file Direction.hh.

Referenced by ProcessData(), and ReceiveData().

clMutex clDirection::MtxResultsReady [private]
 

Definition at line 98 of file Direction.hh.

Referenced by ProcessData(), and SendResults().

clCfgFile* clDirection::CfgStreamDist [private]
 

Definition at line 99 of file Direction.hh.

Referenced by clDirection(), Exec(), and ~clDirection().

clCfgFile* clDirection::CfgDirection [private]
 

Definition at line 100 of file Direction.hh.

Referenced by clDirection(), Exec(), InitArray(), and ~clDirection().

clSockClie clDirection::SClient [private]
 

Definition at line 101 of file Direction.hh.

Referenced by Exec().

clSockOp* clDirection::SOpRequest [private]
 

Definition at line 102 of file Direction.hh.

Referenced by clDirection(), GetRequest(), and ~clDirection().

clSockOp* clDirection::SOpResult [private]
 

Definition at line 103 of file Direction.hh.

Referenced by clDirection(), SendResults(), and ~clDirection().

clSockOp* clDirection::SOpData [private]
 

Definition at line 104 of file Direction.hh.

Referenced by clDirection(), Exec(), GetFirstMsg(), ReceiveData(), and ~clDirection().

clDirMsg clDirection::DirMsg [private]
 

Definition at line 105 of file Direction.hh.

Referenced by GetRequest(), and SendResults().

clDSPAlloc clDirection::RawData [private]
 

Definition at line 106 of file Direction.hh.

Referenced by Exec(), and ReceiveData().

clDSPAlloc clDirection::DirResData [private]
 

Definition at line 107 of file Direction.hh.

Referenced by CalcDipoleBeams(), CalcDipoleCorrs(), Exec(), and SendResults().

clDSPOp clDirection::DSP [private]
 

Definition at line 108 of file Direction.hh.

Referenced by SendResults().

clRemoveNoise clDirection::NoiseEstRem [private]
 

Definition at line 109 of file Direction.hh.

Referenced by SendResults().

clArrayDipole clDirection::ArDipole [private]
 

Definition at line 110 of file Direction.hh.

Referenced by InitArray(), and ReceiveData().

clBeamDipole* clDirection::BeDipole[DIR_MAX_CPUS] [private]
 

Definition at line 111 of file Direction.hh.

Referenced by CalcDipoleBeams(), clDirection(), InitArray(), ProcessData(), and ~clDirection().

clCorrDipole* clDirection::CoDipole[DIR_MAX_CPUS] [private]
 

Definition at line 112 of file Direction.hh.

Referenced by CalcDipoleCorrs(), clDirection(), ProcessData(), and ~clDirection().


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