Agora  1.2.0
Agora project
radio_data_plane_socket.h
Go to the documentation of this file.
1 
5 #ifndef RADIO_DATA_PLANE_SOCKET_H_
6 #define RADIO_DATA_PLANE_SOCKET_H_
7 
8 #include "radio_data_plane.h"
9 #include "radio_socket.h"
10 
12  public:
14  // Allow move and disallow copy
15  RadioDataPlaneSocket(RadioDataPlaneSocket&&) noexcept = default;
16  explicit RadioDataPlaneSocket(const RadioDataPlaneSocket&) = delete;
17  ~RadioDataPlaneSocket() final;
18 
19  void Init(Radio* radio, const Config* cfg, bool hw_framer) final;
20  void Setup() final;
21  void Activate(Radio::ActivationTypes type = Radio::ActivationTypes::kActivate,
22  long long act_time_ns = 0, size_t samples = 0) final;
23  void Deactivate() final;
24  void Close() final;
25 
26  int Rx(std::vector<std::vector<std::complex<int16_t>>>& rx_data,
27  size_t rx_size, Radio::RxFlags& out_flags,
28  long long& rx_time_ns) final;
29 
30  int Rx(std::vector<std::vector<std::complex<int16_t>>*>& rx_buffs,
31  size_t rx_size, Radio::RxFlags& out_flags,
32  long long& rx_time_ns) final;
33 
34  int Rx(std::vector<void*>& rx_locations, size_t rx_size,
35  Radio::RxFlags& out_flags, long long& rx_time_ns) final;
36 
37  void Flush() final;
38 
39  private:
41 };
42 #endif // RADIO_DATA_PLANE_SOCKET_H_
RadioDataPlane::Configuration
const Config * Configuration() const
Definition: radio_data_plane.h:50
RadioDataPlaneSocket::Rx
int Rx(std::vector< std::vector< std::complex< int16_t >>> &rx_data, size_t rx_size, Radio::RxFlags &out_flags, long long &rx_time_ns) final
Definition: radio_data_plane_socket.cc:112
RadioDataPlaneSocket::Flush
void Flush() final
Definition: radio_data_plane_socket.cc:152
RadioDataPlane::radio_
Radio * radio_
Definition: radio_data_plane.h:54
Radio::Id
size_t Id() const
Definition: radio.h:27
RadioSocket
Class to commicate with the Radios. Including symbol parsing, packing and unpacking based on control ...
Definition: radio_socket.h:18
RadioDataPlaneSocket::~RadioDataPlaneSocket
~RadioDataPlaneSocket() final
Definition: radio_data_plane_socket.cc:15
RadioDataPlaneSocket::Setup
void Setup() final
Definition: radio_data_plane_socket.cc:34
RadioSocket::Port
const std::string & Port() const
Definition: radio_socket.h:30
RadioDataPlaneSocket::Deactivate
void Deactivate() final
Definition: radio_data_plane_socket.cc:29
RadioDataPlane::Activate
virtual void Activate(Radio::ActivationTypes type=Radio::ActivationTypes::kActivate, long long act_time_ns=0, size_t samples=0)=0
Definition: radio_data_plane.cc:57
RadioSocket::RxSamples
int RxSamples(std::vector< void * > &out_data, long long &rx_time_ns, size_t req_samples_per_channel)
Definition: radio_socket.cc:159
radio_data_plane_socket.h
Declaration file for the RadioDataPlaneSocket Class.
Radio::ActivationTypes
ActivationTypes
Definition: radio.h:23
RadioDataPlaneSocket::Init
void Init(Radio *radio, const Config *cfg, bool hw_framer) final
Definition: radio_data_plane_socket.cc:17
network_utils.h
Helper definations for networking.
RadioDataPlane::Deactivate
virtual void Deactivate()=0
Definition: radio_data_plane.cc:91
AGORA_LOG_TRACE
#define AGORA_LOG_TRACE(...)
Definition: logger.h:92
RadioDataPlaneSocket::Activate
void Activate(Radio::ActivationTypes type=Radio::ActivationTypes::kActivate, long long act_time_ns=0, size_t samples=0) final
Definition: radio_data_plane_socket.cc:22
Radio
Definition: radio.h:15
radio_soapysdr.h
Defination file for the RadioSoapySdr class.
RadioDataPlaneSocket::RadioDataPlaneSocket
RadioDataPlaneSocket()
RadioDataPlaneSocket
Definition: radio_data_plane_socket.h:11
Radio::RxFlags
RxFlags
Definition: radio.h:19
RadioDataPlaneSocket::Close
void Close() final
Definition: radio_data_plane_socket.cc:31
RadioDataPlane::CheckMode
const Mode & CheckMode() const
Definition: radio_data_plane.h:51
agora_comm::GetLocalAddressFromScope
std::string GetLocalAddressFromScope(size_t scope_id)
Definition: network_utils.cc:143
RadioSocket::Create
void Create(size_t samples_per_symbol, const std::string &local_addr, const std::string &remote_addr, const std::string &local_port, const std::string &remote_port)
Definition: radio_socket.cc:137
RadioSocket::Address
const std::string & Address() const
Definition: radio_socket.h:29
RadioDataPlane
Definition: radio_data_plane.h:16
Config
Definition: config.h:26
AGORA_LOG_FRAME
#define AGORA_LOG_FRAME(...)
Definition: logger.h:72
RadioDataPlane::Close
virtual void Close()=0
Definition: radio_data_plane.cc:113
RtAssert
static void RtAssert(bool condition, const char *throw_str)
Definition: utils.h:104
AGORA_LOG_WARN
#define AGORA_LOG_WARN(...)
Definition: logger.h:53
RadioDataPlane::Init
virtual void Init(Radio *radio, const Config *cfg, bool hw_framer)=0
Definition: radio_data_plane.cc:36
to_string
std::string to_string() const
Definition: eth_common.h:64
rx_data
case QPSK rx_data
Definition: generate_data.m:160
RadioDataPlane::Setup
virtual void Setup()=0
Definition: radio_data_plane.cc:153
RadioDataPlaneSocket::socket_
RadioSocket socket_
Definition: radio_data_plane_socket.h:40
radio_socket.h
Declaration file for the RadioSocket class.
RadioSoapySdr
Definition: radio_soapysdr.h:16
radio_data_plane.h
Declaration file for the RadioDataPlane Class.
fmt::v8::detail::type
type
Definition: core.h:1131
RadioSocket::Flush
void Flush()
Definition: radio_socket.cc:420