Data Types
March 21, 2024Less than 1 minute
Data Types
- Signal Data Types: GNU Radio Companion (GRC) supports a variety of data types including complex and simple floats and integers, unpacked bits, asynchronous messages, bus connections, and more. For details, visit Signal Data Types.
Converting Data Types: To change data types, use components in the
Type Converters Group
, such asChar To Float
.Packing Bits: Use
Pack K Bits
to combine bits into bytes andUnpack K Bits
to separate bytes back into bits.Streams and Vectors: Signals can be streams (one sample at a time) or vectors (multiple samples at a time).
Stream / Vector Conversion Example
System Block:
Parameters:
- Signal Source 1: Default values
- Signal Source 2: Frequency=2000, Amplitude=0.5
- Streams to Vector: Number of Streams=2
- Vector to Stream: Number of Items=2
Result:
Tip
Use the middle mouse button to access the settings panel.
If the amplitude of the second signal is set to 0, the result changes as shown:
Exercise 1