discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Byte Input into Custom Modulator


From: Martin Braun
Subject: Re: [Discuss-gnuradio] Byte Input into Custom Modulator
Date: Thu, 06 Feb 2014 16:41:05 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 06.02.2014 16:24, Jonathan Fox wrote:
Got a question concerning the byte data type in GNU Radio. I am writing
my own PSK modulator and I am having an issue understanding how the byte
data type appears as I am using it for my input.

I know byte is a char data type in C++ however how does it come in? Is
it the binary data stream of a character? Is it exactly how it is typed
in, e.g. 1, 3, 5?

I am asking because the test data I am trying to modulate is a series of
prime numbers in a vector source block. So I am not entirely sure if I
have to do the conversion to binary myself. I have tried to do a file
sink to see how char data appear but the file is just repeating
characters that make no sense.

Jonathan,

byte is just that -- bytes. If you're reading from a file, the bytes of this file get streamed as-is.

Don't confuse this with characters / strings! If you write '23' into a file, you'll get two bytes, with the ASCII codes of each character.

Martin




reply via email to

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