discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Using file descriptor sink ?


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] Using file descriptor sink ?
Date: Fri, 30 May 2014 20:00:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

I think you're mixing things up.
open() like you use it is a call to generate a python "file" object,
which is not the file descriptor a file_destructor_sink needs.
open() expects a string, but you offer a socket_pdu shared pointer (ie.
the python (swig) representation of the C++ block of that name).

I don't really understand what you are trying to do; could you explain?
I'm fairly certain file_descriptor_sink is not what you want...

Greetings,
Marcus

On 30.05.2014 19:46, Ruecan wrote:
> I mean if I try this:
>
>> self.blocks_socket_pdu_0_Rx = blocks.socket_pdu("UDP_CLIENT", "localhost",
>> "4000", 10000) 
> self.myFileDescriptor = blocks.file_descriptor_sink(2048,
> open(self.blocks_socket_pdu_0_Rx, 'r+b'))
>
> I got:
> TypeError: coercing to Unicode: need string or buffer, socket_pdu_sptr found
>
> I don't know how to get a file descriptor out of that to read it and
> retrieve packets received.
>
>
>
> --
> View this message in context: 
> http://gnuradio.4.n7.nabble.com/Using-file-descriptor-sink-tp48640p48647.html
> Sent from the GnuRadio mailing list archive at Nabble.com.
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio




reply via email to

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