Message buffers

when taking the len of input buffer (len[0]) it shows 0 but when i am
calling pop_input_msg(0) it return the msg object ?

On 06/14/2013 01:02 AM, Yogesh Dahiya wrote:

when taking the len of input buffer (len[0]) it shows 0 but when i am
calling pop_input_msg(0) it return the msg object ?

So an input port can have 3 types of input buffers, messages, and tags.
Think of buffers as bulk data, tags are inline messages associated with
the bulk data, and messages are just messages that are asynchronous to
the bulk data.

len(ins[0]) would be non zero if an upstream block produced a buffer

pop_input_msg(0) would return a non-null PMC if an upstream block
produced a message.

In this case, I think your block is only expecting the asynchronous
messages, so len(ins[0]) would always == 0.

-josh