|
From: | Marcus Müller |
Subject: | Re: [Discuss-gnuradio] About Polymorphic types in gnuradio |
Date: | Wed, 6 Jan 2016 17:23:24 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
Ah, so it's a uniform vector of _u_signed _8_bit integers. Try pmt::u8vector_ref(VECT, k), where k is the index of the element you want to get. To modify, use pmt::u8vector_set(pmt_t, index,value). Since your pmt is really just a wrapper around memory-contiguous uint8_ts , you can also "cheat" and directly use the uint8_t* pmt::u8vector_writable_elements(pmt_t v, size_t & len) method, that will give you a C-array/pointer to the first element. All these functions are described on https://gnuradio.org/doc/doxygen/namespacepmt.html#a73605a64c44ec7f12f5f84bb98e2cae3 as linked from the page I mentioned below. Best regards, Marcus On 06.01.2016 17:13, Gabriel
Pechiarovich wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |