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

clComediSrv Class Reference

ComediServer. More...

#include <ComediSrv.hh>

Collaboration diagram for clComediSrv:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 clComediSrv ()
 ~clComediSrv ()
int Main (int, char **)
void * AudioInThread (void *)
void * ServeClientThread (void *)
void Stop ()

Public Attributes

clLogFile Log

Private Member Functions

bool GetAudioCfg (char *, int *, double *, int *, double *, int *)
bool InitCompress (int, int, int, int, int)

Private Attributes

volatile bool bRun
volatile int iAudioBufSize
volatile int iBlockCntr
stSoundStart sHdr
clAlloc AudioBuf
clAlloc CompHead
clAlloc FLACFrame
clMutex MtxAudio
clCondition CndAudio
clCfgFile Cfg

Detailed Description

ComediServer.

Input server with support for Comedi DAQ cards.

Definition at line 56 of file ComediSrv.hh.


Constructor & Destructor Documentation

clComediSrv::clComediSrv  ) 
 

Definition at line 253 of file ComediSrv.cc.

References clLogFile::Add(), bRun, Cfg, COM_CFGFILE, COM_LOGFILE, iAudioBufSize, iBlockCntr, Log, clLogFile::Open(), and clCfgFile::SetFileName().

clComediSrv::~clComediSrv  ) 
 

Definition at line 267 of file ComediSrv.cc.

References clLogFile::Add(), and Log.


Member Function Documentation

bool clComediSrv::GetAudioCfg char *  ,
int *  ,
double *  ,
int *  ,
double *  ,
int * 
[private]
 

Definition at line 112 of file ComediSrv.cc.

References clLogFile::Add(), Cfg, clCfgFile::GetFlt(), clCfgFile::GetInt(), clCfgFile::GetStr(), and Log.

Referenced by AudioInThread().

bool clComediSrv::InitCompress int  ,
int  ,
int  ,
int  ,
int 
[private]
 

Definition at line 149 of file ComediSrv.cc.

References clLogFile::Add(), Cfg, FLACFrame, clCfgFile::GetInt(), Log, and MSG_SOUND_COMPRESS_FLAC.

Referenced by AudioInThread().

int clComediSrv::Main int  ,
char ** 
 

Definition at line 280 of file ComediSrv.cc.

References clLogFile::Add(), bDaemon, clSockServ::Bind(), bRun, Cfg, COM_CONNECT_TIMEOUT, COM_SHUTDOWNFILE, clCfgFile::GetInt(), GLOBAL_VERSMAJ, GLOBAL_VERSMIN, GLOBAL_VERSPL, Log, SigHandler(), Stop(), clSockServ::WaitForConnect(), WrapAudioInThread(), and WrapServeClientThread().

Referenced by main().

void * clComediSrv::AudioInThread void *   ) 
 

Definition at line 356 of file ComediSrv.cc.

References clLogFile::Add(), AudioBuf, bRun, Cfg, clComediIO::Close(), CndAudio, COM_FRAG_SIZE_DEFAULT, COM_INTHREAD_PRIORITY, COM_LOGENTRY_SIZE, COM_USE_DITHER, _stSoundStart::dSampleRate, FLACFrame, GDT, GetAudioCfg(), clComediIO::GetBoardName(), clComediIO::GetDriverName(), clComediIO::GetErrorMsg(), clCfgFile::GetInt(), clComediIO::GetVersionCode(), iAudioBufSize, iBlockCntr, _stSoundStart::iChannels, _stSoundStart::iCompress, _stSoundStart::iFragmentSize, InitCompress(), Log, MSG_SOUND_COMPRESS_FLAC, MSG_SOUND_COMPRESS_NONE, MtxAudio, clComediIO::Open(), clComediIO::PcmBufferSizeGet(), clComediIO::PcmBufferSizeSet(), clComediIO::PcmGetIntSampleSize(), clComediIO::PcmInClose(), clComediIO::PcmInRead(), clComediIO::PcmInStart(), clComediIO::PcmInStop(), clSoundMsg::SetData(), sHdr, Stop(), clComediIO::VERS_MASK_MAJ, clComediIO::VERS_MASK_MIN, clComediIO::VERS_MASK_PL, clComediIO::VERS_SHIFT_MAJ, clComediIO::VERS_SHIFT_MIN, and clComediIO::VERS_SHIFT_PL.

Referenced by WrapAudioInThread().

void * clComediSrv::ServeClientThread void *   ) 
 

Definition at line 538 of file ComediSrv.cc.

References clLogFile::Add(), AudioBuf, bRun, Cfg, CndAudio, COM_LOGENTRY_SIZE, COM_OUTTHREAD_PRIORITY, COM_SOCKET_BUF_FRAGS, CompHead, clSockOp::DisableNagle(), clCfgFile::GetInt(), clSockOp::GetPeerName(), GLOBAL_HEADER_LEN, iAudioBufSize, iBlockCntr, _stSoundStart::iCompress, Log, MtxAudio, clSockOp::SetSendBufSize(), clSoundMsg::SetStart(), clSockOp::SetTypeOfService(), sHdr, SOp, and clSockOp::WriteN().

Referenced by WrapServeClientThread().

void clComediSrv::Stop  )  [inline]
 

Definition at line 86 of file ComediSrv.hh.

References bRun.

Referenced by AudioInThread(), Main(), and SigHandler().


Member Data Documentation

volatile bool clComediSrv::bRun [private]
 

Definition at line 58 of file ComediSrv.hh.

Referenced by AudioInThread(), clComediSrv(), Main(), ServeClientThread(), and Stop().

volatile int clComediSrv::iAudioBufSize [private]
 

Definition at line 59 of file ComediSrv.hh.

Referenced by AudioInThread(), clComediSrv(), and ServeClientThread().

volatile int clComediSrv::iBlockCntr [private]
 

Definition at line 60 of file ComediSrv.hh.

Referenced by AudioInThread(), clComediSrv(), and ServeClientThread().

stSoundStart clComediSrv::sHdr [private]
 

Definition at line 61 of file ComediSrv.hh.

Referenced by AudioInThread(), and ServeClientThread().

clAlloc clComediSrv::AudioBuf [private]
 

Definition at line 65 of file ComediSrv.hh.

Referenced by AudioInThread(), and ServeClientThread().

clAlloc clComediSrv::CompHead [private]
 

Definition at line 66 of file ComediSrv.hh.

Referenced by ServeClientThread().

clAlloc clComediSrv::FLACFrame [private]
 

Definition at line 67 of file ComediSrv.hh.

Referenced by AudioInThread(), and InitCompress().

clMutex clComediSrv::MtxAudio [private]
 

Definition at line 68 of file ComediSrv.hh.

Referenced by AudioInThread(), and ServeClientThread().

clCondition clComediSrv::CndAudio [private]
 

Definition at line 72 of file ComediSrv.hh.

Referenced by AudioInThread(), and ServeClientThread().

clCfgFile clComediSrv::Cfg [private]
 

Definition at line 73 of file ComediSrv.hh.

Referenced by AudioInThread(), clComediSrv(), GetAudioCfg(), InitCompress(), Main(), and ServeClientThread().

clLogFile clComediSrv::Log
 

Definition at line 80 of file ComediSrv.hh.

Referenced by AudioInThread(), clComediSrv(), GetAudioCfg(), InitCompress(), Main(), ServeClientThread(), SigHandler(), and ~clComediSrv().


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