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
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
No comments:
Post a Comment