Agora  1.2.0
Agora project
Radio Class Referenceabstract

#include <radio.h>

Inheritance diagram for Radio:
Collaboration diagram for Radio:

Public Types

enum  RadioType { kSoapySdrStream, kSoapySdrSocket }
 
enum  RxFlags { kRxFlagNone = 0, kEndReceive = 1 }
 
enum  TxFlags { kTxFlagNone = 0, kEndTransmit = 1, kTxWaitTrigger = 2 }
 
enum  ActivationTypes { kActivate, kActivateWaitTrigger }
 

Public Member Functions

virtual ~Radio ()
 
size_t Id () const
 
const std::string & SerialNumber () const
 
bool HwFramer () const
 
virtual void Init (const Config *cfg, size_t id, const std::string &serial, const std::vector< size_t > &enabled_channels, bool hw_framer)=0
 
virtual void Setup (const std::vector< double > &tx_gains, const std::vector< double > &rx_gains)=0
 
virtual void Activate (Radio::ActivationTypes type=Radio::ActivationTypes::kActivate, long long act_time_ns=0, size_t samples=0)=0
 
virtual void Deactivate ()=0
 
virtual void Close ()=0
 
virtual void Flush ()=0
 
virtual int Tx (const void *const *tx_buffs, size_t tx_size, TxFlags tx_flags, long long &tx_time_ns)=0
 
virtual int Rx (std::vector< std::vector< std::complex< int16_t >>> &rx_data, size_t rx_size, RxFlags &out_flags, long long &rx_time_ns)=0
 
virtual int Rx (std::vector< std::vector< std::complex< int16_t >> * > &rx_buffs, size_t rx_size, RxFlags &out_flags, long long &rx_time_ns)=0
 
virtual int Rx (std::vector< void * > &rx_locs, size_t rx_size, RxFlags &out_flags, long long &rx_time_ns)=0
 
virtual void ConfigureTddModeBs ([[maybe_unused]] bool is_ref_radio)
 
virtual void ConfigureTddModeUe ()
 
virtual void ClearSyncDelay ()
 
virtual void PrintSettings () const
 
virtual void Trigger ()
 
virtual void ReadSensor () const
 
virtual void SetTimeAtTrigger (long long time_ns=0)
 
virtual long long GetTimeNs ()
 
virtual void AdjustDelay ([[maybe_unused]] const std::string &delay)
 
const std::vector< size_t > & EnabledChannels () const
 

Static Public Member Functions

static std::unique_ptr< RadioCreate (RadioType type)
 

Protected Member Functions

 Radio ()
 

Protected Attributes

const Configcfg_ {nullptr}
 

Private Attributes

size_t id_ {0}
 
std::string serial_number_
 
std::vector< size_t > enabled_channels_
 
bool hw_framer_ {false}
 

Member Enumeration Documentation

◆ ActivationTypes

Enumerator
kActivate 
kActivateWaitTrigger 

◆ RadioType

Enumerator
kSoapySdrStream 
kSoapySdrSocket 

◆ RxFlags

Enumerator
kRxFlagNone 
kEndReceive 

◆ TxFlags

Enumerator
kTxFlagNone 
kEndTransmit 
kTxWaitTrigger 

Constructor & Destructor Documentation

◆ ~Radio()

Radio::~Radio ( )
virtual
Here is the call graph for this function:

◆ Radio()

Radio::Radio ( )
protected

Member Function Documentation

◆ Activate()

void Radio::Activate ( Radio::ActivationTypes  type = Radio::ActivationTypes::kActivate,
long long  act_time_ns = 0,
size_t  samples = 0 
)
pure virtual

Implemented in RadioSoapySdr.

Here is the caller graph for this function:

◆ AdjustDelay()

virtual void Radio::AdjustDelay ( [[maybe_unused] ] const std::string &  delay)
inlinevirtual

◆ ClearSyncDelay()

virtual void Radio::ClearSyncDelay ( )
inlinevirtual

Reimplemented in RadioSoapySdr.

◆ Close()

void Radio::Close ( )
pure virtual

Implemented in RadioSoapySdr.

Here is the caller graph for this function:

◆ ConfigureTddModeBs()

virtual void Radio::ConfigureTddModeBs ( [[maybe_unused] ] bool  is_ref_radio)
inlinevirtual

◆ ConfigureTddModeUe()

virtual void Radio::ConfigureTddModeUe ( )
inlinevirtual

Reimplemented in RadioSoapySdr.

◆ Create()

std::unique_ptr< Radio > Radio::Create ( Radio::RadioType  type)
static
Here is the caller graph for this function:

◆ Deactivate()

void Radio::Deactivate ( )
pure virtual

Implemented in RadioSoapySdr.

Here is the caller graph for this function:

◆ EnabledChannels()

const std::vector<size_t>& Radio::EnabledChannels ( ) const
inline
Here is the caller graph for this function:

◆ Flush()

virtual void Radio::Flush ( )
pure virtual

Implemented in RadioSoapySdr.

◆ GetTimeNs()

virtual long long Radio::GetTimeNs ( )
inlinevirtual

Reimplemented in RadioSoapySdr.

◆ HwFramer()

bool Radio::HwFramer ( ) const
inline
Here is the caller graph for this function:

◆ Id()

size_t Radio::Id ( ) const
inline
Here is the caller graph for this function:

◆ Init()

void Radio::Init ( const Config cfg,
size_t  id,
const std::string &  serial,
const std::vector< size_t > &  enabled_channels,
bool  hw_framer 
)
pure virtual

Implemented in RadioSoapySdr.

Here is the caller graph for this function:

◆ PrintSettings()

virtual void Radio::PrintSettings ( ) const
inlinevirtual

Reimplemented in RadioSoapySdr.

◆ ReadSensor()

virtual void Radio::ReadSensor ( ) const
inlinevirtual

Reimplemented in RadioSoapySdr.

◆ Rx() [1/3]

virtual int Radio::Rx ( std::vector< std::vector< std::complex< int16_t >> * > &  rx_buffs,
size_t  rx_size,
RxFlags out_flags,
long long &  rx_time_ns 
)
pure virtual

Implemented in RadioSoapySdr.

◆ Rx() [2/3]

virtual int Radio::Rx ( std::vector< std::vector< std::complex< int16_t >>> &  rx_data,
size_t  rx_size,
RxFlags out_flags,
long long &  rx_time_ns 
)
pure virtual

Implemented in RadioSoapySdr.

◆ Rx() [3/3]

virtual int Radio::Rx ( std::vector< void * > &  rx_locs,
size_t  rx_size,
RxFlags out_flags,
long long &  rx_time_ns 
)
pure virtual

Implemented in RadioSoapySdr.

◆ SerialNumber()

const std::string& Radio::SerialNumber ( ) const
inline
Here is the caller graph for this function:

◆ SetTimeAtTrigger()

virtual void Radio::SetTimeAtTrigger ( long long  time_ns = 0)
inlinevirtual

Reimplemented in RadioSoapySdr.

Here is the call graph for this function:

◆ Setup()

void Radio::Setup ( const std::vector< double > &  tx_gains,
const std::vector< double > &  rx_gains 
)
pure virtual

Implemented in RadioSoapySdr.

◆ Trigger()

virtual void Radio::Trigger ( )
inlinevirtual

Reimplemented in RadioSoapySdr.

◆ Tx()

virtual int Radio::Tx ( const void *const *  tx_buffs,
size_t  tx_size,
TxFlags  tx_flags,
long long &  tx_time_ns 
)
pure virtual

Implemented in RadioSoapySdr.

Member Data Documentation

◆ cfg_

const Config* Radio::cfg_ {nullptr}
protected

◆ enabled_channels_

std::vector<size_t> Radio::enabled_channels_
private

◆ hw_framer_

bool Radio::hw_framer_ {false}
private

◆ id_

size_t Radio::id_ {0}
private

◆ serial_number_

std::string Radio::serial_number_
private

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