SoDaRadio-5.0.3-master:8901fb5
Public Slots | Signals | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
GUISoDa::HamlibHandler Class Reference

#include <soda_hamlib_handler.hpp>

Inheritance diagram for GUISoDa::HamlibHandler:

Public Slots

void reportRXFreq (double f)
 
void reportTXFreq (double f)
 
void reportModulation (int mod_id)
 
void reportTXOn (bool tx_on)
 

Signals

void setRXFreq (double f)
 
void setTXFreq (double f)
 
void setModulation (SoDa::Command::ModulationType mod)
 
void setTXOn (bool tx_on)
 

Public Member Functions

 HamlibHandler (QObject *parent=0)
 
 ~HamlibHandler ()
 
void processCommand (const QString &cmd, QTcpSocket *socket_p)
 

Protected Types

typedef bool(HamlibHandler::* cmdHandler_t) (QTextStream &, QTextStream &, bool)
 

Protected Member Functions

void registerCommand (const char *shortname, const char *longname, cmdHandler_t handler, bool is_get)
 
bool cmdDumpState (QTextStream &out, QTextStream &in, bool getval)
 
bool cmdVFO (QTextStream &out, QTextStream &in, bool getval)
 
bool cmdFreq (QTextStream &out, QTextStream &in, bool getval)
 
bool cmdSplitFreq (QTextStream &out, QTextStream &in, bool getval)
 
bool cmdMode (QTextStream &out, QTextStream &in, bool getval)
 
bool cmdPTT (QTextStream &out, QTextStream &in, bool getval)
 
bool cmdSplitVFO (QTextStream &out, QTextStream &in, bool getval)
 
bool cmdQuit (QTextStream &out, QTextStream &in, bool getval)
 

Protected Attributes

double rx_freq
 
double tx_freq
 
bool tx_on
 
SoDa::Command::ModulationType modulation
 
std::map< QString, cmdHandler_tset_command_map
 
std::map< QString, cmdHandler_tget_command_map
 
std::map< SoDa::Command::ModulationType, QString > soda2hl_modmap
 
std::map< QString, SoDa::Command::ModulationTypehl2soda_modmap
 
QString current_VFO
 
QString tx_VFO
 
bool split_enabled
 
double current_rx_freq
 
double current_tx_freq
 
SoDa::Command::ModulationType current_modtype
 
bool current_tx_on
 

Private Member Functions

void initModTables ()
 
void initCommandTables ()
 

Detailed Description

Definition at line 43 of file soda_hamlib_handler.hpp.

Member Typedef Documentation

◆ cmdHandler_t

typedef bool(HamlibHandler::* GUISoDa::HamlibHandler::cmdHandler_t) (QTextStream &, QTextStream &, bool)
protected

Definition at line 74 of file soda_hamlib_handler.hpp.

Constructor & Destructor Documentation

◆ HamlibHandler()

GUISoDa::HamlibHandler::HamlibHandler ( QObject *  parent = 0)

◆ ~HamlibHandler()

GUISoDa::HamlibHandler::~HamlibHandler ( )

Definition at line 58 of file soda_hamlib_handler.cpp.

Member Function Documentation

◆ cmdDumpState()

bool GUISoDa::HamlibHandler::cmdDumpState ( QTextStream &  out,
QTextStream &  in,
bool  getval 
)
protected

Definition at line 153 of file soda_hamlib_handler.cpp.

Referenced by initCommandTables().

◆ cmdFreq()

bool GUISoDa::HamlibHandler::cmdFreq ( QTextStream &  out,
QTextStream &  in,
bool  getval 
)
protected

Definition at line 233 of file soda_hamlib_handler.cpp.

References current_VFO, rx_freq, setRXFreq(), setTXFreq(), split_enabled, and tx_freq.

Referenced by initCommandTables().

◆ cmdMode()

bool GUISoDa::HamlibHandler::cmdMode ( QTextStream &  out,
QTextStream &  in,
bool  getval 
)
protected

Definition at line 273 of file soda_hamlib_handler.cpp.

References hl2soda_modmap, modulation, setModulation(), and soda2hl_modmap.

Referenced by initCommandTables().

◆ cmdPTT()

bool GUISoDa::HamlibHandler::cmdPTT ( QTextStream &  out,
QTextStream &  in,
bool  getval 
)
protected

Definition at line 307 of file soda_hamlib_handler.cpp.

References setTXOn(), and tx_on.

Referenced by initCommandTables().

◆ cmdQuit()

bool GUISoDa::HamlibHandler::cmdQuit ( QTextStream &  out,
QTextStream &  in,
bool  getval 
)
protected

Definition at line 342 of file soda_hamlib_handler.cpp.

Referenced by initCommandTables().

◆ cmdSplitFreq()

bool GUISoDa::HamlibHandler::cmdSplitFreq ( QTextStream &  out,
QTextStream &  in,
bool  getval 
)
protected

Definition at line 256 of file soda_hamlib_handler.cpp.

References setTXFreq(), and tx_freq.

Referenced by initCommandTables().

◆ cmdSplitVFO()

bool GUISoDa::HamlibHandler::cmdSplitVFO ( QTextStream &  out,
QTextStream &  in,
bool  getval 
)
protected

Definition at line 324 of file soda_hamlib_handler.cpp.

References split_enabled, and tx_VFO.

Referenced by initCommandTables().

◆ cmdVFO()

bool GUISoDa::HamlibHandler::cmdVFO ( QTextStream &  out,
QTextStream &  in,
bool  getval 
)
protected

Definition at line 221 of file soda_hamlib_handler.cpp.

References current_VFO.

Referenced by initCommandTables().

◆ initCommandTables()

void GUISoDa::HamlibHandler::initCommandTables ( )
private

◆ initModTables()

void GUISoDa::HamlibHandler::initModTables ( )
private

◆ processCommand()

void GUISoDa::HamlibHandler::processCommand ( const QString &  cmd,
QTcpSocket *  socket_p 
)

Definition at line 121 of file soda_hamlib_handler.cpp.

References get_command_map, and set_command_map.

Referenced by GUISoDa::HamlibListener::readyRead().

◆ registerCommand()

void GUISoDa::HamlibHandler::registerCommand ( const char *  shortname,
const char *  longname,
cmdHandler_t  handler,
bool  is_get 
)
protected

Definition at line 103 of file soda_hamlib_handler.cpp.

References get_command_map, and set_command_map.

Referenced by initCommandTables().

◆ reportModulation

void GUISoDa::HamlibHandler::reportModulation ( int  mod_id)
slot

Definition at line 358 of file soda_hamlib_handler.cpp.

References modulation.

◆ reportRXFreq

void GUISoDa::HamlibHandler::reportRXFreq ( double  f)
slot

Definition at line 350 of file soda_hamlib_handler.cpp.

References rx_freq.

◆ reportTXFreq

void GUISoDa::HamlibHandler::reportTXFreq ( double  f)
slot

Definition at line 354 of file soda_hamlib_handler.cpp.

References tx_freq.

◆ reportTXOn

void GUISoDa::HamlibHandler::reportTXOn ( bool  tx_on)
slot

Definition at line 364 of file soda_hamlib_handler.cpp.

References tx_on.

◆ setModulation

void GUISoDa::HamlibHandler::setModulation ( SoDa::Command::ModulationType  mod)
signal

Referenced by cmdMode().

◆ setRXFreq

void GUISoDa::HamlibHandler::setRXFreq ( double  f)
signal

Referenced by cmdFreq().

◆ setTXFreq

void GUISoDa::HamlibHandler::setTXFreq ( double  f)
signal

Referenced by cmdFreq(), and cmdSplitFreq().

◆ setTXOn

void GUISoDa::HamlibHandler::setTXOn ( bool  tx_on)
signal

Referenced by cmdPTT().

Member Data Documentation

◆ current_modtype

SoDa::Command::ModulationType GUISoDa::HamlibHandler::current_modtype
protected

Definition at line 99 of file soda_hamlib_handler.hpp.

◆ current_rx_freq

double GUISoDa::HamlibHandler::current_rx_freq
protected

Definition at line 97 of file soda_hamlib_handler.hpp.

◆ current_tx_freq

double GUISoDa::HamlibHandler::current_tx_freq
protected

Definition at line 98 of file soda_hamlib_handler.hpp.

◆ current_tx_on

bool GUISoDa::HamlibHandler::current_tx_on
protected

Definition at line 100 of file soda_hamlib_handler.hpp.

◆ current_VFO

QString GUISoDa::HamlibHandler::current_VFO
protected

Definition at line 95 of file soda_hamlib_handler.hpp.

Referenced by cmdFreq(), cmdVFO(), and HamlibHandler().

◆ get_command_map

std::map<QString, cmdHandler_t> GUISoDa::HamlibHandler::get_command_map
protected

Definition at line 76 of file soda_hamlib_handler.hpp.

Referenced by processCommand(), and registerCommand().

◆ hl2soda_modmap

std::map<QString, SoDa::Command::ModulationType> GUISoDa::HamlibHandler::hl2soda_modmap
protected

Definition at line 83 of file soda_hamlib_handler.hpp.

Referenced by cmdMode(), and initModTables().

◆ modulation

SoDa::Command::ModulationType GUISoDa::HamlibHandler::modulation
protected

Definition at line 69 of file soda_hamlib_handler.hpp.

Referenced by cmdMode(), HamlibHandler(), and reportModulation().

◆ rx_freq

double GUISoDa::HamlibHandler::rx_freq
protected

Definition at line 66 of file soda_hamlib_handler.hpp.

Referenced by cmdFreq(), HamlibHandler(), and reportRXFreq().

◆ set_command_map

std::map<QString, cmdHandler_t> GUISoDa::HamlibHandler::set_command_map
protected

Definition at line 75 of file soda_hamlib_handler.hpp.

Referenced by processCommand(), and registerCommand().

◆ soda2hl_modmap

std::map<SoDa::Command::ModulationType, QString> GUISoDa::HamlibHandler::soda2hl_modmap
protected

Definition at line 82 of file soda_hamlib_handler.hpp.

Referenced by cmdMode(), and initModTables().

◆ split_enabled

bool GUISoDa::HamlibHandler::split_enabled
protected

Definition at line 96 of file soda_hamlib_handler.hpp.

Referenced by cmdFreq(), cmdSplitVFO(), and HamlibHandler().

◆ tx_freq

double GUISoDa::HamlibHandler::tx_freq
protected

Definition at line 67 of file soda_hamlib_handler.hpp.

Referenced by cmdFreq(), cmdSplitFreq(), HamlibHandler(), and reportTXFreq().

◆ tx_on

bool GUISoDa::HamlibHandler::tx_on
protected

Definition at line 68 of file soda_hamlib_handler.hpp.

Referenced by cmdPTT(), HamlibHandler(), and reportTXOn().

◆ tx_VFO

QString GUISoDa::HamlibHandler::tx_VFO
protected

Definition at line 95 of file soda_hamlib_handler.hpp.

Referenced by cmdSplitVFO(), and HamlibHandler().


The documentation for this class was generated from the following files: