stipcores library
Collection of Software Drivers for Hardware IP Cores for the Panoradio SDR
Public Member Functions | Protected Attributes | List of all members
Data_Capture Class Reference

Class Data Capture Module. More...

#include <Data_Capture.h>

Inheritance diagram for Data_Capture:
Data_Capture_Dual

Public Member Functions

 Data_Capture (int base_address, int size_in_k, int num_captured_words)
 class constructor More...
 
 ~Data_Capture ()
 class deconstructor
 
int get_num_captured_words ()
 returns number of captured words (memory depth)
 
void capture ()
 starts capture (non blocking)
 
int read (int *data_array)
 reads data, that has been captured previously by capture() (non blocking) More...
 
int capture_and_read (int *data_array)
 captures data and reads it out (blocking), for integer array More...
 
int capture_and_read (double *data_array)
 captures data and reads it out (blocking), overloaded for double array More...
 
int capture_and_read (double *data_array, int size)
 captures data and reads it out (blocking), overloaded for double array and with size specification More...
 

Protected Attributes

IP_Driverdata_capture_core_
 
int num_captured_words_
 
int timeout_counter_
 
const int timeout_max_
 
int * data_array_int2double_
 

Detailed Description

Class Data Capture Module.

Constructor & Destructor Documentation

Data_Capture::Data_Capture ( int  base_address,
int  size_in_k,
int  num_captured_words 
)

class constructor

Parameters
base_adressaddress of the spi core (from Vivado), e.g. 0x44C00000
size_in_ksize of the required adress space in k (from Vivado)
num_captured_wordsnumber of words to be captured (from IP core properties in Vivado)

Member Function Documentation

int Data_Capture::capture_and_read ( int *  data_array)

captures data and reads it out (blocking), for integer array

Parameters
data_arraypointer to integer data array, into which the function writes the captured data
Returns
0: no errors, -1: timeout during read (maybe IP addess wrong), -3: capture timeout = capture takes too long (read not possible)
int Data_Capture::capture_and_read ( double *  data_array)

captures data and reads it out (blocking), overloaded for double array

Parameters
data_arraypointer to double data array, into which the function writes the captured data, needs to be "num_captured_words" long
Returns
0: no errors, -1: timeout during read (maybe IP addess wrong), -3: capture timeout = capture takes too long (read not possible)
int Data_Capture::capture_and_read ( double *  data_array,
int  size 
)

captures data and reads it out (blocking), overloaded for double array and with size specification

Parameters
data_arraypointer to double data array of size "size", into which the function writes the captured data
sizesize if array data_array
Returns
0: no errors, -1: timeout during read (maybe IP addess wrong), -3: capture timeout = capture takes too long (read not possible)
int Data_Capture::read ( int *  data_array)

reads data, that has been captured previously by capture() (non blocking)

Parameters
data_arraypointer to a data array, into which the function writes the captured data
Returns
0: no errors, -1: timeout during read (maybe IP addess wrong), -2: module busy / capture in progess

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