[Top][All Lists]

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

Re: [Discuss-gnuradio] message port names

From: Nowlan, Sean
Subject: Re: [Discuss-gnuradio] message port names
Date: Fri, 28 Feb 2014 00:39:50 +0000

>From: address@hidden address@hidden on behalf of Tom Rondeau address@hidden
>Sent: Thursday, February 27, 2014 2:45 PM
>To: Nowlan, Sean
>Cc: address@hidden
>Subject: Re: [Discuss-gnuradio] message port names

>On Mon, Feb 24, 2014 at 2:46 PM, Nowlan, Sean
><address@hidden> 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?


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.


reply via email to

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