Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 137
Programming Examples
LAN Programming Interface Examples
/* 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;
resul= strlen(result);
= strlen(result);
} while (1);
}
}
else
{
/* ASCII response (not a binary block) */
*result = (char)ch;
if (recv_line(sock, 1, maxLength-1) == NULL)
return 0;
/* REMOVE trailing newline, if present. And terminate
string. */
resultBytes = strlen(result);
if (result[resultBytes-1] == '\n') resultBytes -= 1;
result[resultBytes] = '\0';
}
} while (0);
return resultBytes;
}
/******************************************************************
*
Summary of Contents for X-Series
Page 4: ...4 ...
Page 10: ...10 Contents ...