discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with multiple input in Python OOT module


From: Ron Economos
Subject: Re: Problem with multiple input in Python OOT module
Date: Mon, 11 Jan 2021 16:32:12 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

The YAML for multiple inputs is:

inputs:
-   domain: stream
    dtype: complex
    multiplicity: '3'

Ron

On 1/11/21 15:15, George Edwards wrote:
Hello,

I wrote an OOT Python module with multiple inputs and when I run the QA test, it says there is an error in a swig file and throws the message below:

TypeError: 'in method vector_source_c_make', argument 1 of type 'std::vector< std::complex< float >,std::allocator< std::complex< float  > > > const &'

I looked in the swig file, but do not see anything at the stated line number that helps me. The comment in the swig file states that the block produces a stream of samples based on an input vector. Below, I describe how I coded in inputs and output python and QA test files, which must not be correct.
1. In the general_work() because I have 3 inputs (complex valued), I set:
in0 = input_items[0]  #to collect input stream 0
in1 = input_items[1]
in2 = input_items[2]
*  In the general_work(), I set the single output for now to be one of the inputs as follows:
output_items[0][:] = in0

2. In the method __init__(self), I set input/output as follows:
in_sig = [np.complex64, np.complex64, np.complex]     # import numpy as np
out_sig =[np.complex46]

3. In YML file, I set:
inputs:
- label: in0
  dtype: complex
- label: in1
  dtype: complex
- label: in2
  dtype: complex
4. In QA file, I assigned 3 complex source inputs src_d0, src_d1, src_d2 and so my source input is:
src = blocks.vector_source_c(src_d0, src_d1, src_d2)

I will appreciate any help or advice because something must be wrong with my code listed above.

Thank you!

George





reply via email to

[Prev in Thread] Current Thread [Next in Thread]