GNU Radio's LORA_SDR Package
gr::lora_sdr::data_source_sim_impl Class Reference

#include <data_source_sim_impl.h>

Inheritance diagram for gr::lora_sdr::data_source_sim_impl:
[legend]

Public Member Functions

 data_source_sim_impl (int pay_len, int n_frames, std::string string_input, uint32_t mean, bool multi_control)
 Construct a new data source impl object.
 
 ~data_source_sim_impl ()
 Destroy the data source impl object.
 
void forecast (int noutput_items, gr_vector_int &ninput_items_required)
 Place holder function does not do anything for the data source.
 
int general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
 Main function, generates random ([a-z A-Z 0-9]) data input to be sent over the network or if input_string set send this over the network. The sim version of the data_source has an internal sleep function set by the parameter mean.
 

Additional Inherited Members

- Public Types inherited from gr::lora_sdr::data_source_sim
typedef std::shared_ptr< data_source_simsptr
 
- Static Public Member Functions inherited from gr::lora_sdr::data_source_sim
static sptr make (int pay_len, int n_frames, std::string string_input, uint32_t mean, bool exit_control)
 Return a shared_ptr to a new instance of lora_sdr::data_source.
 

Constructor & Destructor Documentation

◆ data_source_sim_impl()

gr::lora_sdr::data_source_sim_impl::data_source_sim_impl ( int  pay_len,
int  n_frames,
std::string  string_input,
uint32_t  mean,
bool  multi_control 
)

Construct a new data source impl object.

Parameters
pay_len: payload length
n_frames: number of frames to generate data for
string_input: input string to be used
mean: Mean time for uniform distribution in ms

◆ ~data_source_sim_impl()

gr::lora_sdr::data_source_sim_impl::~data_source_sim_impl ( )

Destroy the data source impl object.

Member Function Documentation

◆ forecast()

void gr::lora_sdr::data_source_sim_impl::forecast ( int  noutput_items,
gr_vector_int &  ninput_items_required 
)

Place holder function does not do anything for the data source.

Parameters
noutput_items
ninput_items_required

◆ general_work()

int gr::lora_sdr::data_source_sim_impl::general_work ( int  noutput_items,
gr_vector_int &  ninput_items,
gr_vector_const_void_star &  input_items,
gr_vector_void_star &  output_items 
)

Main function, generates random ([a-z A-Z 0-9]) data input to be sent over the network or if input_string set send this over the network. The sim version of the data_source has an internal sleep function set by the parameter mean.

Parameters
noutput_items: number of output items : 1
ninput_items: number of input items : 0
input_items: input item : 0
output_items: output items :
Returns
int : work status

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