SoDaRadio-5.0.3-master:8901fb5
Functions
SoDaServer.cxx File Reference

The MAIN process that creates and supervises all the threads that make up the SoDa SDR. More...

#include <unistd.h>
#include <stdio.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <fstream>
#include "SoDaBase.hxx"
#include "MultiMBox.hxx"
#include "ProcInfo.hxx"
#include "Params.hxx"
#include "BaseBandRX.hxx"
#include "BaseBandTX.hxx"
#include "CWTX.hxx"
#include "UI.hxx"
#include "GPSmon.hxx"
#include "AudioPA.hxx"
#include "AudioALSA.hxx"
#include "Command.hxx"
#include "Debug.hxx"

Go to the source code of this file.

Functions

void createLockFile (const std::string &lock_file_name)
 
void deleteLockFile (const std::string &lock_file_name)
 
int doWork (SoDa::Params &params)
 do the work of creating the SoDa threads More...
 
int main (int argc, char *argv[])
 main entrypoint More...
 

Detailed Description

The MAIN process that creates and supervises all the threads that make up the SoDa SDR.

Author
Matt Reilly (kb1vc)

Definition in file SoDaServer.cxx.

Function Documentation

◆ createLockFile()

void createLockFile ( const std::string &  lock_file_name)

Definition at line 140 of file SoDaServer.cxx.

Referenced by main().

◆ deleteLockFile()

void deleteLockFile ( const std::string &  lock_file_name)

Definition at line 148 of file SoDaServer.cxx.

Referenced by main().

◆ doWork()

int doWork ( SoDa::Params params)

do the work of creating the SoDa threads

Parameters
argcnumber of command line arguments
argvcommand line arguments

create the components of the radio

doWork creates the audio server on the host machine. choices include a PortAudio interface and an ALSA interface. These are subclasses of the more generic SoDa::AudioIfc class

doWork creates the audio RX and audio TX unit threads These are also responsible for implementing IF tuning and modulation.

See also
SoDa::BaseBandRX
SoDa::BaseBandTX

doWork creates the morse code (CW) tx handler thread

See also
SoDa::CWTX

doWork creates the user interface (UI) thread

See also
SoDa::UI

Definition at line 156 of file SoDaServer.cxx.

References SoDa::AudioIfc::FLOAT, SoDa::Params::getAFBufferSize(), SoDa::Params::getAudioPortName(), SoDa::Params::getAudioSampleRate(), SoDa::Params::getDebugLevel(), SoDa::Params::getRadioType(), SoDa::Params::getReportFileName(), SoDa::Params::isRadioType(), SoDa::SoDaThread::join(), kb1vc::ProcInfo::reportInfo(), SoDa::Params::reportMemInfo(), SoDa::Debug::setDefaultLevel(), SoDa::SoDaThread::start(), and SoDa::SoDaThread::waitForJoin().

Referenced by main().

◆ main()

int main ( int  argc,
char *  argv[] 
)

main entrypoint

Start the SoDa USRP radio server threads

Parameters
argcnumber of command line arguments
argvcommand line arguments
See also
doWork

the command line parameter list is used to create a param object that holds configuration information from the command line and from the stored configuration files.

See also
SoDa::Params

create a lock file to signal that we're alive.

Definition at line 282 of file SoDaServer.cxx.

References createLockFile(), deleteLockFile(), doWork(), SoDa::Params::getLockFileName(), and SoDa::SoDaException::toString().