discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] ZMQ REQ / REP naming Swap?


From: Andy Walls
Subject: Re: [Discuss-gnuradio] ZMQ REQ / REP naming Swap?
Date: Fri, 29 Jul 2016 10:39:32 -0400

>                              From: 
> Francisco Albani
>                           Subject: 
> Re: [Discuss-gnuradio] ZMQ REQ /
> REP naming Swap?
>                              Date: 
> Thu, 28 Jul 2016 23:21:25 -0300
> 
> ______________________________________________________________________
> Michael, I found the need to do the same for some applications. I also
> needed to choose between bind and connect (I made this a parameter of
> my block).
> 
> 
> Wouldn't be better to have just one sink and one source with
> selectable options, like:
> * socket_type: REP/REQ/SUB/PUB/PUSH/PULL
> 
> * method: bind / connect
> 
> * interface: stream / message
> 

I think this would make the gr-zmq C++ block code unnecessarily complex
and harder to maintain.  The block requirements for each combination of
parameters grow in different directions.

Some things you'd have to deal with:
1. REP blocks have a receive then send main loop;
   REQ blocks have a send then receive main loop.

2.  REQ/REP can never drop messages/samples and so the tag propagation
code can be simple;
    PUB/SUB can drop messages/samples and tag propagation code needs to
account for that in tag offsets

3. GNURadio messages are usually small enough that they can be handled
in one call to work().  GNURadio sample stream payloads can have a great
many samples that need to be handled across several calls to work().

It's just not worth it at the C++ level.  Maybe at the GRC block XML
file level, it might be worth it.

My $0.02

Regards,
Andy




reply via email to

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