>________________________________________
>From: trond...@trondeau.com [trond...@trondeau.com] on behalf of Tom Rondeau 
>[t...@trondeau.com]
>Sent: Thursday, February 27, 2014 2:45 PM
>To: Nowlan, Sean
>Cc: discuss-gnuradio@gnu.org
>Subject: Re: [Discuss-gnuradio] message port names

>On Mon, Feb 24, 2014 at 2:46 PM, Nowlan, Sean
><sean.now...@gtri.gatech.edu> wrote:
>> Quick question: can a message port name be any valid PMT type? Or does it
>> have to be a string converted to a symbol?
>>
>> Thanks,
>>
>> Sean

>Hey Sean,

>I /think/ so. I'd have to double check, but at some point it's likely
>to go through a symbol_to_string conversion.

>Can you think of a need for a port name to be something other than a
>symbol/string? Maybe an enumeration or something?

>Tom

In a certain block I'm registering N ports, where N is a constructor argument 
to the block. I was hoping I could call them pmt::from_long(0) through 
pmt::from_long(N-1), but that didn't work. I ended up creating string names 
"out0" through "outK" (where K = N-1) and then used pmt::string_to_symbol.

Thanks,
Sean

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to