EasyManuals Logo
Home>Agilent Technologies>Portable Generator>N5183A

Agilent Technologies N5183A User Manual

Agilent Technologies N5183A
366 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #226 background imageLoading...
Page #226 background image
216 Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide
Creating and Downloading Waveform Files
Creating Waveform Data
Line Code—Interleaving and Byte Swapping for Little Endian Order
20
21
22
23
24
25
26
27
28
29
30
char iqbuffer[NUMSAMPLES*4];
for(index=0; index<numsamples; index++)
{
short ivalue = idata[index];
short qvalue = qdata[index];
iqbuffer[index*4] = (ivalue >> 8) & 0xFF;
iqbuffer[index*4+1] = ivalue & 0xFF;
iqbuffer[index*4+2] = (qvalue >> 8) & 0xFF;
iqbuffer[index*4+3] = qvalue & 0xFF;
}
return 0;
Line Code Description—Interleaving and Byte Swapping for Little Endian Order
20 Define a character array to store the interleaved I and Q data. The character array makes byte swapping
easier, since each array location accepts only 8 bits (1 byte). The array size increases by four times to
accommodate two bytes of I data and two bytes of Q data.
21–29 Create a loop to do the following:
• Save the current I data array value to a variable.
NOTE In rare instances, a compiler may define short as larger than 16 bits. If this condition exists,
replace short with the appropriate object or label that defines a 16- bit integer.
• Save the current Q data array value to a variable.
• Swap the low bytes (bits 0–7) of the data with the high bytes of the data (done for both

Table of Contents

Other manuals for Agilent Technologies N5183A

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies N5183A and is the answer not in the manual?

Agilent Technologies N5183A Specifications

General IconGeneral
BrandAgilent Technologies
ModelN5183A
CategoryPortable Generator
LanguageEnglish

Related product manuals