SoDaRadio-5.0.3-master:8901fb5
Public Member Functions | Static Public Member Functions | List of all members
SoDa::TRControl Class Referenceabstract

Generic Control class to activate T/R switching, band switching, and other control functions. More...

#include <TRControl.hxx>

Inheritance diagram for SoDa::TRControl:
SoDa::B200Control SoDa::N200Control SoDa::NoopControl

Public Member Functions

 TRControl ()
 
virtual bool setTXOn ()=0
 activate external controls to enable transmit mode. More...
 
virtual bool setTXOff ()=0
 activate external controls to disable transmit mode. More...
 
virtual bool getTX ()=0
 report state of transmit-enable. More...
 
virtual bool setBand (unsigned int band, bool state)
 turn on/off signal path for selected band note that multiple bands can be enabled at one time(!) More...
 
virtual bool getBand (unsigned int band)
 query state of signal path for selected band More...
 
virtual bool setServo (unsigned int servo_sel, double val)
 set state of selected servo More...
 

Static Public Member Functions

static TRControlmakeTRControl (uhd::usrp::multi_usrp::sptr usrp, int mboard=0)
 make the appropriate TR control widget given a pointer to a USRP device. More...
 

Detailed Description

Generic Control class to activate T/R switching, band switching, and other control functions.

On some units, this may be provided by GPIO pins on the USRP itself. (Systems with WBX modules and later model B2xx units have internal GPIO pins.) Others (like my own N200 with a UBX module) need an external widget of some sort.

All members of the control class provide the basic features, but may choose to treat them as no-ops.

However, ALL subclasses of Control.hxx must do something useful for setTXOn(), setTXOff(), getTX().

Definition at line 51 of file TRControl.hxx.

Constructor & Destructor Documentation

◆ TRControl()

SoDa::TRControl::TRControl ( )
inline

Definition at line 53 of file TRControl.hxx.

References getTX(), setTXOff(), and setTXOn().

Member Function Documentation

◆ getBand()

virtual bool SoDa::TRControl::getBand ( unsigned int  band)
inlinevirtual

query state of signal path for selected band

Parameters
bandband selector (typically index from 1...7)
Returns
true if band signal path is enabled.

Reimplemented in SoDa::B200Control, and SoDa::N200Control.

Definition at line 90 of file TRControl.hxx.

◆ getTX()

virtual bool SoDa::TRControl::getTX ( )
pure virtual

report state of transmit-enable.

Returns
true iff the transmitter is currently enabled.

Implemented in SoDa::NoopControl, SoDa::B200Control, and SoDa::N200Control.

Referenced by TRControl().

◆ makeTRControl()

TRControl * SoDa::TRControl::makeTRControl ( uhd::usrp::multi_usrp::sptr  usrp,
int  mboard = 0 
)
static

make the appropriate TR control widget given a pointer to a USRP device.

This will be connected to the selected mboard.

Definition at line 45 of file TRControl.cxx.

References SoDa::PropTree::getProperty(), and SoDa::PropTree::getStringProp().

Referenced by main(), setServo(), and SoDa::USRPCtrl::USRPCtrl().

◆ setBand()

virtual bool SoDa::TRControl::setBand ( unsigned int  band,
bool  state 
)
inlinevirtual

turn on/off signal path for selected band note that multiple bands can be enabled at one time(!)

Parameters
bandband selector (typically index from 1...7)
statetrue to enable band, false otherwise.
Returns
true if band state was changed.

Reimplemented in SoDa::B200Control, and SoDa::N200Control.

Definition at line 82 of file TRControl.hxx.

◆ setServo()

virtual bool SoDa::TRControl::setServo ( unsigned int  servo_sel,
double  val 
)
inlinevirtual

set state of selected servo

Parameters
servo_sel– select the actuator that we're wiggling
val– the setting for the actuator
Returns
true if the actuator command was executed.

Definition at line 99 of file TRControl.hxx.

References makeTRControl().

◆ setTXOff()

virtual bool SoDa::TRControl::setTXOff ( )
pure virtual

activate external controls to disable transmit mode.

Returns
true if the operation completed successfully

Implemented in SoDa::NoopControl, SoDa::B200Control, and SoDa::N200Control.

Referenced by main(), SoDa::USRPCtrl::setTXEna(), and TRControl().

◆ setTXOn()

virtual bool SoDa::TRControl::setTXOn ( )
pure virtual

activate external controls to enable transmit mode.

Returns
true if the operation completed successfully

Implemented in SoDa::NoopControl, SoDa::B200Control, and SoDa::N200Control.

Referenced by main(), SoDa::USRPCtrl::setTXEna(), and TRControl().


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