Agora  1.2.0
Agora project
RadioSocket Class Reference

Class to commicate with the Radios. Including symbol parsing, packing and unpacking based on control plan MTU settings. More...

#include <radio_socket.h>

Public Member Functions

 RadioSocket ()
 
 ~RadioSocket ()
 
 RadioSocket (RadioSocket &&) noexcept=default
 
 RadioSocket (const RadioSocket &)=delete
 
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)
 
const std::string & Address () const
 
const std::string & Port () const
 
int RxSamples (std::vector< void * > &out_data, long long &rx_time_ns, size_t req_samples_per_channel)
 
void Flush ()
 

Private Member Functions

bool CheckSymbolComplete (const std::byte *in_data, const int &in_count)
 
size_t InspectRx (const std::byte *in_data, size_t in_count, long long &rx_time_ticks, size_t &burst_count) const
 
size_t UnpackSamples (std::vector< void * > &out_samples, size_t req_samples, long long &rx_time)
 
size_t LoadSamples (std::vector< void * > &out_samples, const std::complex< int16_t > *in_samples, size_t num_in_samples)
 
size_t GetUnpackedSamples (std::vector< void * > &out_samples, long long &rx_time, size_t req_total_samples)
 
size_t GetPackedSamples (std::vector< void * > &out_samples, long long &rx_time, size_t sample_offset, size_t req_samples)
 

Private Attributes

std::unique_ptr< UDPServersocket_
 
std::vector< std::byte > rx_buffer_
 
std::queue< size_t > rx_pkt_byte_count_
 
std::vector< std::complex< int16_t > > sample_buffer_
 
long long rx_time_unpacked_ {0}
 
size_t rx_bytes_ {0}
 
size_t rx_samples_ {0}
 
size_t samples_per_symbol_ {1}
 
const size_t bytes_per_element_ {3u}
 

Detailed Description

Class to commicate with the Radios. Including symbol parsing, packing and unpacking based on control plan MTU settings.

Constructor & Destructor Documentation

◆ RadioSocket() [1/3]

RadioSocket::RadioSocket ( )

◆ ~RadioSocket()

RadioSocket::~RadioSocket ( )

◆ RadioSocket() [2/3]

RadioSocket::RadioSocket ( RadioSocket &&  )
defaultnoexcept

◆ RadioSocket() [3/3]

RadioSocket::RadioSocket ( const RadioSocket )
explicitdelete

Member Function Documentation

◆ Address()

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

◆ CheckSymbolComplete()

bool RadioSocket::CheckSymbolComplete ( const std::byte *  in_data,
const int &  in_count 
)
private
Here is the call graph for this function:

◆ Create()

void RadioSocket::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 
)
Here is the caller graph for this function:

◆ Flush()

void RadioSocket::Flush ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPackedSamples()

size_t RadioSocket::GetPackedSamples ( std::vector< void * > &  out_samples,
long long &  rx_time,
size_t  sample_offset,
size_t  req_samples 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetUnpackedSamples()

size_t RadioSocket::GetUnpackedSamples ( std::vector< void * > &  out_samples,
long long &  rx_time,
size_t  req_total_samples 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ InspectRx()

size_t RadioSocket::InspectRx ( const std::byte *  in_data,
size_t  in_count,
long long &  rx_time_ticks,
size_t &  burst_count 
) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadSamples()

size_t RadioSocket::LoadSamples ( std::vector< void * > &  out_samples,
const std::complex< int16_t > *  in_samples,
size_t  num_in_samples 
)
private
Here is the caller graph for this function:

◆ Port()

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

◆ RxSamples()

int RadioSocket::RxSamples ( std::vector< void * > &  out_data,
long long &  rx_time_ns,
size_t  req_samples_per_channel 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ UnpackSamples()

size_t RadioSocket::UnpackSamples ( std::vector< void * > &  out_samples,
size_t  req_samples,
long long &  rx_time 
)
private

returns the number of processed_samples (unpacked / per channel) samples from the rx buffer this function unpackes the data from the byte buffer

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ bytes_per_element_

const size_t RadioSocket::bytes_per_element_ {3u}
private

◆ rx_buffer_

std::vector<std::byte> RadioSocket::rx_buffer_
private

◆ rx_bytes_

size_t RadioSocket::rx_bytes_ {0}
private

◆ rx_pkt_byte_count_

std::queue<size_t> RadioSocket::rx_pkt_byte_count_
private

◆ rx_samples_

size_t RadioSocket::rx_samples_ {0}
private

◆ rx_time_unpacked_

long long RadioSocket::rx_time_unpacked_ {0}
private

◆ sample_buffer_

std::vector<std::complex<int16_t> > RadioSocket::sample_buffer_
private

◆ samples_per_symbol_

size_t RadioSocket::samples_per_symbol_ {1}
private

◆ socket_

std::unique_ptr<UDPServer> RadioSocket::socket_
private

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