136 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Programming Examples
LAN Programming Interface Examples
count = recv(sock, result, (int)numDigits, 0);
result[count] = 0; /* null terminate */
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);
resul= 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
{
Содержание X-Series
Страница 4: ...4 ...
Страница 10: ...10 Contents ...