[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] message port names
From: |
Martin Braun |
Subject: |
Re: [Discuss-gnuradio] message port names |
Date: |
Fri, 28 Feb 2014 09:19:29 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
On 02/28/2014 01:39 AM, Nowlan, Sean wrote:
>> 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.
I doubt anyone implemented that to limit names, it was more likely that
we didn't think of this use case. If you see this is a small,
non-invasive change that would allow other PMTs to be port names, that
would be interesting to see.
M