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

clBeamSrvMaster Class Reference

Beamforming input server, main process. More...

#include <BeamSrv.hh>

Collaboration diagram for clBeamSrvMaster:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 clBeamSrvMaster ()
 ~clBeamSrvMaster ()
int Main (int *, char ***)
void * InDataThread (void *)
void * ServerThread (void *)
void * ServeClientThread (void *)

Static Public Member Functions

void Abort ()

Private Member Functions

bool ReadConfig ()
bool InitFilterBank ()
bool InitProcessing ()
void ProcessLoop ()
bool SendNodeParams ()
bool WaitReady ()
bool SendInData (const GDT *, int)
void CompactData (GDT *, const GDT *, long, long, long, long)
bool FilterData (GDT *, const GDT *, long, long, long, long)

Private Attributes

int iFilterType
int iDecimate
int iDecFact
int iChOffset
int iOutDataCount
volatile int iBlockCntr
char cpLogBuf [BS_LOGBUFSIZE]
stRawDataFirst sInHdr
stBeamNodeParams sNodeParams
clAlloc FiltWork
clCfgFile Cfg
clDSPOp DSP
clLogFile Log
clRecDecimator * FilterBank
clSockOp SOpIn
clSockServ SServ
clReBuffer InBuf
clSemaphore SemIn
clMutex MtxIn
clAlloc OutData
clCondition CndOut
clMutex MtxOut

Detailed Description

Beamforming input server, main process.

This process reads data from streamdist, distributes it to slave processes, collects beamformed data and sends it to clients. Each beam is represented as a channel at output.

Definition at line 68 of file BeamSrv.hh.


Constructor & Destructor Documentation

clBeamSrvMaster::clBeamSrvMaster  ) 
 

Definition at line 501 of file BeamSrv.cc.

References clLogFile::Add(), BS_LOGFILE, FilterBank, iBlockCntr, Log, and clLogFile::Open().

clBeamSrvMaster::~clBeamSrvMaster  ) 
 

Definition at line 510 of file BeamSrv.cc.

References clLogFile::Add(), FilterBank, and Log.


Member Function Documentation

bool clBeamSrvMaster::ReadConfig  )  [private]
 

Definition at line 168 of file BeamSrv.cc.

References clLogFile::Add(), Cfg, _stBeamNodeParams::fSoundSpeed, _stBeamNodeParams::fSpacing, clCfgFile::GetFlt(), clCfgFile::GetInt(), _stBeamNodeParams::iBeamCount, _stBeamNodeParams::iBlockSize, iDecimate, _stBeamNodeParams::iSensors, _stBeamNodeParams::iType, _stBeamNodeParams::iWindowSize, Log, and sNodeParams.

Referenced by Main().

bool clBeamSrvMaster::InitFilterBank  )  [private]
 

Definition at line 215 of file BeamSrv.cc.

References Abort(), clLogFile::Add(), Cfg, cpLogBuf, _stRawDataFirst::dSampleRate, FilterBank, _stBeamNodeParams::fSampleRate, _stBeamNodeParams::fSoundSpeed, _stBeamNodeParams::fSpacing, GDT, clCfgFile::GetInt(), iDecFact, iDecimate, iFilterType, _stBeamNodeParams::iSensors, _stBeamNodeParams::iWindowSize, Log, sInHdr, and sNodeParams.

Referenced by Main().

bool clBeamSrvMaster::InitProcessing  )  [private]
 

Definition at line 262 of file BeamSrv.cc.

References clLogFile::Add(), _stBeamNodeParams::iBeamCount, _stRawDataFirst::iChannels, iChOffset, _stBeamNodeParams::iSensors, Log, SendNodeParams(), sInHdr, sNodeParams, and vProcInfo.

Referenced by Main().

void clBeamSrvMaster::ProcessLoop  )  [private]
 

Definition at line 280 of file BeamSrv.cc.

References clLogFile::Add(), bRun, CndOut, CompactData(), cpLogBuf, DSP, FilterData(), GDT, _stBeamNodeParams::iBeamCount, iBlockCntr, _stBeamNodeParams::iBlockSize, _stRawDataFirst::iChannels, iChOffset, iDecFact, InBuf, iOutDataCount, _stBeamNodeParams::iSensors, Log, MtxIn, MtxOut, OutData, SemIn, SendInData(), sInHdr, sNodeParams, and vProcInfo.

Referenced by Main().

bool clBeamSrvMaster::SendNodeParams  )  [private]
 

Definition at line 363 of file BeamSrv.cc.

References clLogFile::Add(), cpLogBuf, Log, sNodeParams, and vProcInfo.

Referenced by InitProcessing().

bool clBeamSrvMaster::WaitReady  )  [private]
 

Definition at line 391 of file BeamSrv.cc.

References clLogFile::Add(), cpLogBuf, Log, and vProcInfo.

Referenced by Main().

bool clBeamSrvMaster::SendInData const GDT *  ,
int 
[private]
 

Definition at line 422 of file BeamSrv.cc.

References clLogFile::Add(), cpLogBuf, GDT, Log, and vProcInfo.

Referenced by ProcessLoop().

void clBeamSrvMaster::CompactData GDT *  ,
const GDT *  ,
long  ,
long  ,
long  ,
long 
[private]
 

Definition at line 449 of file BeamSrv.cc.

Referenced by ProcessLoop().

bool clBeamSrvMaster::FilterData GDT *  ,
const GDT *  ,
long  ,
long  ,
long  ,
long 
[private]
 

Definition at line 469 of file BeamSrv.cc.

References DSP, FilterBank, FiltWork, and GDT.

Referenced by ProcessLoop().

int clBeamSrvMaster::Main int *  ,
char *** 
 

Definition at line 518 of file BeamSrv.cc.

References Abort(), clLogFile::Add(), BeamSrvMasterThreads, clSockServ::Bind(), BS_CFGFILE, Cfg, clSockClie::Connect(), cpLogBuf, _stRawDataFirst::dSampleRate, clSockOp::GetErrno(), clSockClie::GetErrno(), clSockServ::GetErrno(), clCfgFile::GetInt(), clCfgFile::GetStr(), _stRawDataReq::iChannel, _stRawDataFirst::iChannels, iChOffset, InDataThread(), InitFilterBank(), InitProcessing(), Log, ProcessLoop(), ReadConfig(), clSockOp::ReadN(), ServerThread(), clCfgFile::SetFileName(), clSockOp::SetHandle(), sInHdr, SOpIn, SServ, WaitReady(), and clSockOp::WriteN().

void clBeamSrvMaster::Abort  )  [static]
 

Definition at line 613 of file BeamSrv.cc.

References bRun.

Referenced by InDataThread(), InitFilterBank(), and Main().

void * clBeamSrvMaster::InDataThread void *   ) 
 

Definition at line 619 of file BeamSrv.cc.

References Abort(), BeamSrvMasterThreads, bRun, BS_INTHREAD_PRIORITY, GDT, _stBeamNodeParams::iBlockSize, _stRawDataFirst::iChannels, InBuf, MtxIn, clSockOp::ReadN(), SemIn, sInHdr, sNodeParams, and SOpIn.

Referenced by Main().

void * clBeamSrvMaster::ServerThread void *   ) 
 

Definition at line 647 of file BeamSrv.cc.

References BeamSrvMasterThreads, bRun, BS_ACCEPT_TO, ServeClientThread(), SServ, and clSockServ::WaitForConnect().

Referenced by Main().

void * clBeamSrvMaster::ServeClientThread void *   ) 
 

Definition at line 665 of file BeamSrv.cc.

References clLogFile::Add(), BeamSrvMasterThreads, bRun, BS_OUTTHREAD_PRIORITY, CndOut, clSockOp::DisableNagle(), _stSoundStart::dSampleRate, _stBeamNodeParams::fSampleRate, GDT, clSockOp::GetErrno(), GLOBAL_HEADER_LEN, _stBeamNodeParams::iBeamCount, iBlockCntr, _stSoundStart::iChannels, _stSoundStart::iCompress, _stSoundStart::iFragmentSize, iOutDataCount, Log, MSG_SOUND_COMPRESS_NONE, MtxOut, OutData, clSoundMsg::SetData(), clSockOp::SetHandle(), clSoundMsg::SetStart(), clSockOp::SetTypeOfService(), sNodeParams, SOp, and clSockOp::WriteN().

Referenced by ServerThread().


Member Data Documentation

int clBeamSrvMaster::iFilterType [private]
 

Definition at line 70 of file BeamSrv.hh.

Referenced by InitFilterBank().

int clBeamSrvMaster::iDecimate [private]
 

Definition at line 71 of file BeamSrv.hh.

Referenced by InitFilterBank(), and ReadConfig().

int clBeamSrvMaster::iDecFact [private]
 

Definition at line 72 of file BeamSrv.hh.

Referenced by InitFilterBank(), and ProcessLoop().

int clBeamSrvMaster::iChOffset [private]
 

Definition at line 73 of file BeamSrv.hh.

Referenced by InitProcessing(), Main(), and ProcessLoop().

int clBeamSrvMaster::iOutDataCount [private]
 

Definition at line 74 of file BeamSrv.hh.

Referenced by ProcessLoop(), and ServeClientThread().

volatile int clBeamSrvMaster::iBlockCntr [private]
 

Definition at line 75 of file BeamSrv.hh.

Referenced by clBeamSrvMaster(), ProcessLoop(), and ServeClientThread().

char clBeamSrvMaster::cpLogBuf[BS_LOGBUFSIZE] [private]
 

Definition at line 76 of file BeamSrv.hh.

Referenced by InitFilterBank(), Main(), ProcessLoop(), SendInData(), SendNodeParams(), and WaitReady().

stRawDataFirst clBeamSrvMaster::sInHdr [private]
 

Definition at line 77 of file BeamSrv.hh.

Referenced by InDataThread(), InitFilterBank(), InitProcessing(), Main(), and ProcessLoop().

stBeamNodeParams clBeamSrvMaster::sNodeParams [private]
 

Definition at line 78 of file BeamSrv.hh.

Referenced by InDataThread(), InitFilterBank(), InitProcessing(), ProcessLoop(), ReadConfig(), SendNodeParams(), and ServeClientThread().

clAlloc clBeamSrvMaster::FiltWork [private]
 

Definition at line 79 of file BeamSrv.hh.

Referenced by FilterData().

clCfgFile clBeamSrvMaster::Cfg [private]
 

Definition at line 80 of file BeamSrv.hh.

Referenced by InitFilterBank(), Main(), and ReadConfig().

clDSPOp clBeamSrvMaster::DSP [private]
 

Definition at line 81 of file BeamSrv.hh.

Referenced by FilterData(), and ProcessLoop().

clLogFile clBeamSrvMaster::Log [private]
 

Definition at line 82 of file BeamSrv.hh.

Referenced by clBeamSrvMaster(), InitFilterBank(), InitProcessing(), Main(), ProcessLoop(), ReadConfig(), SendInData(), SendNodeParams(), ServeClientThread(), WaitReady(), and ~clBeamSrvMaster().

clRecDecimator* clBeamSrvMaster::FilterBank [private]
 

Definition at line 83 of file BeamSrv.hh.

Referenced by clBeamSrvMaster(), FilterData(), InitFilterBank(), and ~clBeamSrvMaster().

clSockOp clBeamSrvMaster::SOpIn [private]
 

Definition at line 84 of file BeamSrv.hh.

Referenced by InDataThread(), and Main().

clSockServ clBeamSrvMaster::SServ [private]
 

Definition at line 85 of file BeamSrv.hh.

Referenced by Main(), and ServerThread().

clReBuffer clBeamSrvMaster::InBuf [private]
 

Definition at line 87 of file BeamSrv.hh.

Referenced by InDataThread(), and ProcessLoop().

clSemaphore clBeamSrvMaster::SemIn [private]
 

Definition at line 88 of file BeamSrv.hh.

Referenced by InDataThread(), and ProcessLoop().

clMutex clBeamSrvMaster::MtxIn [private]
 

Definition at line 89 of file BeamSrv.hh.

Referenced by InDataThread(), and ProcessLoop().

clAlloc clBeamSrvMaster::OutData [private]
 

Definition at line 91 of file BeamSrv.hh.

Referenced by ProcessLoop(), and ServeClientThread().

clCondition clBeamSrvMaster::CndOut [private]
 

Definition at line 92 of file BeamSrv.hh.

Referenced by ProcessLoop(), and ServeClientThread().

clMutex clBeamSrvMaster::MtxOut [private]
 

Definition at line 93 of file BeamSrv.hh.

Referenced by ProcessLoop(), and ServeClientThread().


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