GithubHelp home page GithubHelp logo

guruofquality / grextras Goto Github PK

View Code? Open in Web Editor NEW
62.0 62.0 12.0 5.6 MB

Advanced GNU Radio Blocks

Home Page: https://github.com/guruofquality/grextras/wiki

C 10.58% C++ 67.62% Python 21.80%

grextras's People

Contributors

guruofquality avatar ncorgan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grextras's Issues

Consume not behaving as expected when autoconsume is disabled.

When autoconsume is disabled even the basic example given in the wiki throws an exception. I've narrowed it down as much as possible, the following block:

!/usr/bin/env python

from gnuradio import gr
from gnuradio.extras import block_gateway
import numpy

class my_basic_pass_block(gr.block):
def init(self):
gr.block.init(self, name="my_basic_pass_block", in_sig=[numpy.float32], out_sig=[numpy.float32])
self.set_auto_consume(False)

def forecast(self, noutput_items, ninput_items_required):
ninput_items_required[0] = noutput_items

def work(self, input_items, output_items):
in0 = input_items[0]
out = output_items[0]
out[:] = in0
self.consume(0, len(in0))
return len(out)

Crashes with this message:

handler caught exception: operands could not be broadcast together with shapes (8192) (16383)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gnuradio/extras/block_gateway.py", line 53, in eval
try: self._callback()
File "/usr/local/lib/python2.7/dist-packages/gnuradio/extras/block_gateway.py", line 124, in __gr_block_handle
) for i in self.__out_indexes],
File "/home/user/mygnuradioblocks/my_basic_pass_block.py", line 18, in work
out[:] = in0
ValueError: operands could not be broadcast together with shapes (8192) (16383)
thread[thread-per-block[1]: <gr_block my_basic_pass_block (9)>]: caught unrecognized exception

But when commenting out the self.consume and self.set_auto_consume lines it works as expected.

create PMC manager

same idea as PMT manager:

  • store allocated PMC objects
  • use ref count to determine availability

(except this wont be a hack)

Python JIT block

Yea yea, python is already JIT-tastic. This is really a convenience block to take a python source and to just be a GRC block. This saves the user time making xml blocks.

time comprehension class

  • tags have standardized on a int64 + double time format, but dealing with this is a pain
  • create an object to deal with time but w/ conversions from and to this format

clang block - use clang api

Currently we execute the clang binary to get llvm bitcode. It should be possible to use the clang api to directly compile code and get an llvm Module. Some work here: https://github.com/guruofquality/grextras/tree/use_clang_api

However, ubuntu 12.10 has a clangdev missing important libraries. 13.04 has the working dev package. So users dont have to manually install clang-dev from source... we dont want to force the api usage option.

So when I get around to upgrading my ubuntu -- do an ifdef to support both executing and API.

zero copy time alignment block

This block would take several time-tagged async inputs and use the tags to produce sample aligned outputs. This could align multiple usrp source blocks, and keep alignment in the face of packet overflows/dropouts. This block would be zero copy, implemented as a passive workflow block.

swig doesnt get std::complex<integer type>

This breaks the python interface for the add/mult_const_v constructors.

Or it would be nice to use std::vectorstd::complex for all of them...

In any case, using std::complex isnt really heard of much.

-josh

make test errors

I was building grextras on a 32-bit Ubuntu 10.04 machine, when the build tests failed:

tjt7a@bt:~/src/grextras/build$ ctest
Test project /home/tjt7a/src/grextras/build
Start 1: qa_add_and_friends
1/9 Test #1: qa_add_and_friends ..............._Failed 0.23 sec
Start 2: qa_block_gateway
2/9 Test #2: qa_block_gateway ................. Passed 0.24 sec
Start 3: qa_delay
3/9 Test #3: qa_delay ......................... Passed 0.19 sec
Start 4: qa_noise_source
4/9 Test #4: qa_noise_source ..................
_Failed 0.20 sec
Start 5: qa_signal_source
5/9 Test #5: qa_signal_source ................. Passed 0.20 sec
Start 6: qa_pmt
6/9 Test #6: qa_pmt ..........................._Failed 0.20 sec
Start 7: qa_msg_passing
7/9 Test #7: qa_msg_passing ...................
_Failed 0.83 sec
Start 8: qa_pmt_to_python
8/9 Test #8: qa_pmt_to_python ................. Passed 0.20 sec
Start 9: qa_pmt_rpc
9/9 Test #9: qa_pmt_rpc ....................... Passed 2.21 sec

56% tests passed, 4 tests failed out of 9

Total Test time (real) = 4.51 sec

The following tests FAILED:
1 - qa_add_and_friends (Failed)
4 - qa_noise_source (Failed)
6 - qa_pmt (Failed)
7 - qa_msg_passing (Failed)
Errors while running CTest

I then looked more closely at the qa_msg_passing test and got the following:

tjt7a@bt:~/src/grextras/build$ ctest -VV -R qa_msg
UpdateCTestConfiguration from :/home/tjt7a/src/grextras/build/DartConfiguration.tcl
UpdateCTestConfiguration from :/home/tjt7a/src/grextras/build/DartConfiguration.tcl
Test project /home/tjt7a/src/grextras/build
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
test 7
Start 7: qa_msg_passing

7: Test command: /bin/sh /home/tjt7a/src/grextras/build/python/qa_msg_passing_test.sh
7: Test timeout computed to be: 9.99988e+06
7: linux; GNU C++ version 4.4.3; Boost_104000; UHD_003.005.001-release
7:
7: EEE
7: ======================================================================
7: ERROR: test_disconnect (main.test_msg_passing)
7: ----------------------------------------------------------------------
7: Traceback (most recent call last):
7: File "/home/tjt7a/src/grextras/python/qa_msg_passing.py", line 133, in test_disconnect
7: self.assertItemsEqual(sink.msgs(), msgs)
7: AttributeError: 'test_msg_passing' object has no attribute 'assertItemsEqual'
7:
7: ======================================================================
7: ERROR: test_hier (main.test_msg_passing)
7: ----------------------------------------------------------------------
7: Traceback (most recent call last):
7: File "/home/tjt7a/src/grextras/python/qa_msg_passing.py", line 103, in test_hier
7: self.assertItemsEqual(sink.msgs(), msgs)
7: AttributeError: 'test_msg_passing' object has no attribute 'assertItemsEqual'
7:
7: ======================================================================
7: ERROR: test_top (main.test_msg_passing)
7: ----------------------------------------------------------------------
7: Traceback (most recent call last):
7: File "/home/tjt7a/src/grextras/python/qa_msg_passing.py", line 84, in test_top
7: self.assertItemsEqual(sink.msgs(), msgs)
7: AttributeError: 'test_msg_passing' object has no attribute 'assertItemsEqual'
7:
7: ----------------------------------------------------------------------
7: Ran 3 tests in 0.314s
7:
7: FAILED (errors=3)
1/1 Test #7: qa_msg_passing ...................***Failed 0.84 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) = 0.84 sec

The following tests FAILED:
7 - qa_msg_passing (Failed)
Errors while running CTest

It looks like I'm missing "assertItemsEqual".

stream selector - unit tests

  • unit test has issue with the done logic - see comments
  • need test for blocking, consuming, null/non producing source, etc

uhd properties block for programatic access

One of the things missing when we did precog was a programmatic way to access properties on the USRP. We sort of hacked around it with the PMT server calling into python functions in the top block -- its was a real kludge around and the code was a mess.

The properties interface in GRAS should make this seamless:
https://github.com/guruofquality/gras/wiki/Properties

What we need to do:

  • make a uhd properties block that:
  • opens a multi-usrp session
  • registers handlers for all setters/getters
  • register all known uhd swig types into PMC
  • grc xml registers this block into tree using the $(id)

Given that, any block in the flow graph can access the USRP properties in a very clean and programmatic way; in c++ or python. Look how simple it can be:
https://github.com/guruofquality/gras/wiki/Codeguide#wiki-property-access

opencl - use C API for opencl

The C++ API was fun but it has build problems across versions, specifically with opnecl 1.2. The C API should be way less hassle.

copy gr deps needed into next branch

the idea is to reduce breakage when updating and to minimize the changes needed in gr mainline

  • the packet framer relies on a modified correlator block - copy this into the lib
  • the noise source relies on gr random from core - copy this into lib

regular port to/from serilazation port

Take an input stream with tags, msgs, items and serialize it. This produces an output stream of type PacketMsg. The packet msg can be sent over TCP or even stored in a file.

Then vice-versa.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.