GithubHelp home page GithubHelp logo

kgadgil / gr-pipe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jolivain/gr-pipe

1.0 1.0 0.0 716 KB

Make GNU Radio blocks with standard pipes.

CMake 24.48% C 0.32% C++ 6.07% Python 69.13%

gr-pipe's Introduction

gr-pipe GNU Radio blocks.

gr-pipe is a set GNU Radio block for using any program as a source,
sink or filter by using standard I/O pipes.

The main goals of these blocks are:
- Fast development of new experimental blocks (no need to dig into C++
  / GNU Radio internals / SWIG / Python).
- Ability to use any programming language able to deal with standard
  input and output (code a block in your preferred language: C, Java,
  MatLab, Perl, Ruby...).


Simple interface:

The pipe blocks read and write samples sequentially in their GNU Radio
internal representation.  The format is the same as for gr_file_source
and gr_file_sink:

GNU Radio Type, C Type, size
Complex, two floats (I,Q), 2*4 bytes
Float, float, 4 bytes
Int, int, 4 bytes
Short, short, 2 bytes
Byte, char, 1 byte

A typical source block command will produce data "forever" on its
standard output, until a SIGTERM is sent by the pipe.source block to
ask for normal termination.  Also, in case of an exception, the pipe
will be closed and a SIGPIPE will be caught.

A typical sink block command will consume data on its standard input,
until end-of-file (EOF) is read, for a proper termination.

A typical filter block command will comsume data "forever" on its
standard input, process it, and produce data on its standard output,
until end-of-file (EOF) is read, for normal termination.  Also in case
of exception, SIGPIPE may be caught.

In pipe blocks, commands are executed in a /bin/sh shell, so every
standard shell features are available in commands provided to blocks
(variables, loops, pipes, redirection, etc...).

See examples for a "square" block implemented in C, Java, MatLab/GNU
Octave, Perl and Python.

Suggestions of use:
- Compression (gzip, lzma, ...)
- Encryption (gpg, openssl, ...)
- Encoding (ffmpeg, mencoder, gsm-tools, ...)
- Debugging (od, hexdump, ...)
- Interface to devices (aplay, arecord, pacat, parec, ...)
- Use your own tools...

Kown limitations and problems:
- Small performance loss, due to pipe communications.
- Small addition of latency, due to pipe buffers.  (On Linux, pipe
  buffer capacity can be changed.  See fcntl(2) F_SETPIPE_SZ).
- Not compatible with stream tags
- Limited to only one input and one output maximum per block
  (but you may use interleaver or multiple blocks).


How to build and install gr-pipe:
(Assuming you have development tools and GNU Radio already installed)

git clone git://github.com/jolivain/gr-pipe.git
mkdir gr-pipe/build
cd gr-pipe/build
cmake ..
make
sudo make install


Feedback and comments are welcome !

Julien Olivain <[email protected]>

gr-pipe's People

Contributors

kgadgil avatar

Stargazers

Quentin Smith avatar

Watchers

 avatar

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.