Keysight E4428C ESG RF Programming Manual page 134

Signal generators
Table of Contents

Advertisement

Programming Examples
LAN Programming Interface Examples
#include <windows.h>
#
ifndef _WINSOCKAPI_
#
include <winsock.h>
#
endif
#else
#
include <sys/socket.h>
#
include <netinet/in.h>
#
include <netdb.h>
#
define SOCKET_ERROR (-1)
#
define INVALID_SOCKET (-1)
typedef
int SOCKET;
#endif /* WINSOCK */
#ifdef WINSOCK
/* Declared in getopt.c.
extern char *optarg;
extern int
optind;
extern int getopt(int argc, char * const argv[], const char* optstring);
#else
#
include <unistd.h>
#endif
#define COMMAND_ERROR
#define NO_CMD_ERROR
#define SCPI_PORT
5025
#define INPUT_BUF_SIZE (64*1024)
/**************************************************************************
* Display usage
**************************************************************************/
static void usage(char *basename)
{
fprintf(stderr,"Usage: %s [-nqu] <hostname> [<command>]\n", basename);
126
// BSD-style socket functions
/* UNIX with BSD sockets */
/* for connect and socket*/
/* for sockaddr_in
/* for gethostbyname
See example programs disk. */
/* for getopt(3C) */
(1)
(0)
*/
*/
Keysight Signal Generators Programming Guide

Advertisement

Table of Contents
loading

Table of Contents