Data Type Adapter
The Data Type Adapter is the first processing block inside a Signal Conditioner when the later is using a Signal_Conditioner
implementation.
The role of a Data Type Adapter block is to perform a conversion of the data type in the sample stream.
This is the first processing block after the Signal Source, and each kind of source can deliver data in different formats.

If the Signal Source is delivering samples at a given intermediate frequency, the native data types can be:

Real samples:
byte
,short
,float
(8, 16 and 32 bits, respectively). 
Intervealed (I&Q) samples:
ibyte
,ishort
,gr_complex
(8+8, 16+16 and 32+32 bits, respectively).


If the Signal Source is delivering samples at baseband, the native data types can be:

Intervealed (I&Q) samples:
ibyte
,ishort
,gr_complex
(8+8, 16+16 and 32+32 bits, respectively). 
Complex samples:
cbyte
,cshort
,gr_complex
(8+8, 16+16 and 32+32 bits, respectively).

This block provide several implementations of data type conversions.
For more details about sample data types and their usage in GNSSSDR, please check out our tutorial on data types.
Implementation: Byte_To_Short
This implementation takes samples of type byte
(8 bits, real samples)
at its input and writes samples of type short
(16 bits, real samples)
at its output.
It accepts the following parameters:
Parameter  Description  Required 

implementation 
Byte_To_Short 
Mandatory 
Signal Conditioner implementation: Byte_To_Short
.
Example:
;######### DATA_TYPE_ADAPTER CONFIG ############
DataTypeAdapter.implementation=Byte_To_Short
Implementation: Ibyte_To_Cbyte
This implementation takes samples of type ibyte
(interleaved I&Q
samples, 8 bits each) at its input and writes samples of type cbyte
(complex samples with real and imaginary components of 8 bits each) at
its output. This reduces the sample rate by two.
It accepts the following parameters:
Parameter  Description  Required 

implementation 
Ibyte_To_Cbyte 
Mandatory 
Signal Conditioner implementation: Ibyte_To_Cbyte
.
Example:
;######### DATA_TYPE_ADAPTER CONFIG ############
DataTypeAdapter.implementation=Ibyte_To_Cbyte
Implementation: Ibyte_To_Complex
This implementation takes samples of type ibyte
(interleaved I&Q
samples, 8 bits each) at its input and writes samples of type
gr_complex
(complex samples with real and imaginary components of 32
bits each) at its output. This reduces the sample rate by two.
It accepts the following parameters:
Parameter  Description  Required 

implementation 
Ibyte_To_Complex 
Mandatory 
Signal Conditioner implementation: Ibyte_To_Complex
.
Example:
;######### DATA_TYPE_ADAPTER CONFIG ############
DataTypeAdapter.implementation=Ibyte_To_Complex
Implementation: Ishort_To_Cshort
This implementation takes samples of type ishort
(interleaved I&Q
samples, 16 bits each) at its input and writes samples of type cshort
(complex samples with real and imaginary components of 16 bits each) at
its output. This reduces the sample rate by two.
It accepts the following parameters:
Parameter  Description  Required 

implementation 
Ishort_To_Cshort 
Mandatory 
Signal Conditioner implementation: Ishort_To_Cshort
.
Example:
;######### DATA_TYPE_ADAPTER CONFIG ############
DataTypeAdapter.implementation=Ishort_To_Cshort
Implementation: Ishort_To_Complex
This implementation takes samples of type ishort
(interleaved I&Q
samples, 16 bits each) at its input and writes samples of type
gr_complex
(complex samples with real and imaginary components of 32
bits each) at its output. This reduces the sample rate by two.
It accepts the following parameters:
Parameter  Description  Required 

implementation 
Ishort_To_Complex 
Mandatory 
Signal Conditioner implementation: Ishort_To_Complex
.
Example:
;######### DATA_TYPE_ADAPTER CONFIG ############
DataTypeAdapter.implementation=Ishort_To_Complex
Implementation: Pass_Through
This implementation copies samples from its input to its output.
It accepts the following parameters:
Parameter  Description  Required 

implementation 
Pass_Through 
Mandatory 
item_type 
[gr_complex , cshort , cbyte ]: Format of data samples. It defaults to gr_complex . 
Optional 
Data Type Adapter implementation: Pass_Through
.
Examples:
;######### DATA_TYPE_ADAPTER CONFIG ############
DataTypeAdapter.implementation=Pass_Through
;######### DATA_TYPE_ADAPTER CONFIG ############
DataTypeAdapter.implementation=Pass_Through
DataTypeAdapter.item_type=cshort
Leave a Comment