Agora
1.2.0
Agora project
|
Go to the documentation of this file.
27 inline size_t Id()
const {
return id_; }
31 virtual void Init(
const Config* cfg,
size_t id,
const std::string& serial,
32 const std::vector<size_t>& enabled_channels,
34 virtual void Setup(
const std::vector<double>& tx_gains,
35 const std::vector<double>& rx_gains) = 0;
40 long long act_time_ns = 0,
size_t samples = 0) = 0;
43 virtual void Close() = 0;
44 virtual void Flush() = 0;
46 virtual int Tx(
const void*
const* tx_buffs,
size_t tx_size,
TxFlags tx_flags,
47 long long& tx_time_ns) = 0;
49 virtual int Rx(std::vector<std::vector<std::complex<int16_t>>>&
rx_data,
50 size_t rx_size,
RxFlags& out_flags,
long long& rx_time_ns) = 0;
52 virtual int Rx(std::vector<std::vector<std::complex<int16_t>>*>& rx_buffs,
53 size_t rx_size,
RxFlags& out_flags,
long long& rx_time_ns) = 0;
55 virtual int Rx(std::vector<void*>& rx_locs,
size_t rx_size,
56 RxFlags& out_flags,
long long& rx_time_ns) = 0;
69 inline virtual void AdjustDelay([[maybe_unused]]
const std::string& delay) {}
virtual void Init(const Config *cfg, size_t id, const std::string &serial, const std::vector< size_t > &enabled_channels, bool hw_framer)=0
Definition: radio.cc:46
Defination file for the Radio class.
size_t Id() const
Definition: radio.h:27
const std::vector< size_t > & EnabledChannels() const
Definition: radio.h:71
virtual void ConfigureTddModeUe()
Definition: radio.h:59
@ kLinuxSocket
Definition: radio_data_plane.h:18
bool hw_framer_
Definition: radio.h:84
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 void PrintSettings() const
Definition: radio.h:61
@ kSoapyStream
Definition: radio_data_plane.h:18
std::string serial_number_
Definition: radio.h:82
ActivationTypes
Definition: radio.h:23
@ kEndReceive
Definition: radio.h:19
#define AGORA_LOG_ERROR(...)
Definition: logger.h:39
virtual void ReadSensor() const
Definition: radio.h:63
bool HwFramer() const
Definition: radio.h:29
#define AGORA_LOG_TRACE(...)
Definition: logger.h:92
const std::string & SerialNumber() const
Definition: radio.h:28
virtual ~Radio()
Definition: radio.cc:30
@ kTxFlagNone
Definition: radio.h:20
@ kActivateWaitTrigger
Definition: radio.h:23
@ kActivate
Definition: radio.h:23
@ kEndTransmit
Definition: radio.h:20
virtual void Close()=0
Definition: radio.cc:35
TxFlags
Definition: radio.h:20
virtual void AdjustDelay([[maybe_unused]] const std::string &delay)
Definition: radio.h:69
RadioType
Definition: radio.h:17
Defination file for the RadioSoapySdr class.
virtual void SetTimeAtTrigger(long long time_ns=0)
Definition: radio.h:65
static std::unique_ptr< Radio > Create(RadioType type)
Definition: radio.cc:11
j template void())
Definition: json.hpp:4744
Radio()
Definition: radio.cc:26
const Config * cfg_
Definition: radio.h:78
virtual void Setup(const std::vector< double > &tx_gains, const std::vector< double > &rx_gains)=0
Definition: radio.cc:57
RxFlags
Definition: radio.h:19
virtual void ClearSyncDelay()
Definition: radio.h:60
size_t id_
Definition: radio.h:81
virtual long long GetTimeNs()
Definition: radio.h:66
@ kSoapySdrStream
Definition: radio.h:17
@ kRxFlagNone
Definition: radio.h:19
@ kTxWaitTrigger
Definition: radio.h:20
@ kSoapySdrSocket
Definition: radio.h:17
virtual void ConfigureTddModeBs([[maybe_unused]] bool is_ref_radio)
Definition: radio.h:58
Declaration file for the configuration class which importants json configuration values into class va...
uint16_t id
Definition: eth_common.h:65
case QPSK rx_data
Definition: generate_data.m:160
virtual void Activate(Radio::ActivationTypes type=Radio::ActivationTypes::kActivate, long long act_time_ns=0, size_t samples=0)=0
Definition: radio.cc:62
virtual void Deactivate()=0
Definition: radio.cc:71
std::vector< size_t > enabled_channels_
Definition: radio.h:83
virtual int Tx(const void *const *tx_buffs, size_t tx_size, TxFlags tx_flags, long long &tx_time_ns)=0
virtual void Trigger()
Definition: radio.h:62
type
Definition: core.h:1131