EasyManuals Logo

Agilent Technologies n5181a Programming Guide

Agilent Technologies n5181a
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 #127 background imageLoading...
Page #127 background image
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 117
Programming Examples
LAN Programming Interface Examples
numBytes = atol(result);
}
if (numBytes)
{
resultBytes = 0;
/* Loop until we get all the bytes we requested. */
/* Each call seems to return up to 1457 bytes, on HP-UX 9.05 */
do {
int rcount;
rcount = recv(sock, result, (int)numBytes, 0);
resultBytes += rcount;
result += rcount; /* Advance pointer */
} while ( resultBytes < numBytes );
/************************************************************
* For LAN dumps, there is always an extra trailing newline
* Since there is no EOI line. For ASCII dumps this is
* great but for binary dumps, it is not needed.
***********************************************************/
if (resultBytes == numBytes)
{
char junk;
count = recv(sock, &junk, 1, 0);
}
}
else
{
/* indefinite block ... dump til we can an extra line feed */
do
{
if (recv_line(sock, result, maxLength) == NULL) break;
if (strlen(result)==1 && *result == '\n') break;
resultBytes += strlen(result);
result += strlen(result);
} while (1);
}
}
else
{
/* ASCII response (not a binary block) */
*result = (char)ch;

Table of Contents

Other manuals for Agilent Technologies n5181a

Questions and Answers:

Question and Answer IconNeed help?

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

Agilent Technologies n5181a Specifications

General IconGeneral
BrandAgilent Technologies
Modeln5181a
CategoryPortable Generator
LanguageEnglish

Related product manuals