discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] uint64_t to PMT in Python


From: Marcus Müller
Subject: Re: [Discuss-gnuradio] uint64_t to PMT in Python
Date: Sun, 14 Aug 2016 21:24:17 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

Hi Lakshay,

haven't tried that in a while; but wouldn't from_long() work?


Best regards,
Marcus


On 12.08.2016 16:26, Lakshay Narula wrote:
> Hello,
>
> I am trying to use the "tx_time" tag in my Python OOT block. The value
> for this tag is a tuple of PMTs: integer seconds in PMT format derived
> from uint64_t, and fractional seconds in PMT format derived from double.
>
> These data type conversions work well in C++. But in Python there are
> no built-in unsigned integer data types. So I tried using
> numpy.uint64, but the Python function pmt.from_uint64 shows up an
> error saying that the argument must be of type uint64_t.
>
> As a work around, I used long instead of numpy.uint64, and
> subsequently used pmt.from_long to pass the integer seconds. I have
> not tried if it works, but even if it does it is a bit of a hack.
>
> Is there a cleaner way to generate the "tx_time" value tuple in Python?
>
> Thanks,
> Lakshay.
>
>
> _______________________________________________
> 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]