EasyManua.ls Logo

Keysight Technologies N5173B EXG - Page 129

Keysight Technologies N5173B EXG
398 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
Loading...
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 129
Programming Examples
LAN Programming Interface Examples
}
#endif /* WINSOCK */
/******************************************************************
*
> $Function: openSocket$
*
* $Description: open a TCP/IP socket connection to the instrument
$
*
* $Parameters: $
* (const char *) hostname . . . . Network name of instrument.
* This can be in dotted decimal
notation.
* (int) portNumber . . . . . . . The TCP/IP port to talk to.
* Use 5025 for the SCPI port.
*
* $Return: (int) . . . . . . . . A file descriptor similar to
open(1).$
*
* $Errors: returns -1 if anything goes wrong $
*
******************************************************************/
SOCKET openSocket(const char *hostname, int portNumber)
{
struct hostent *hostPtr;
struct sockaddr_in peeraddr_in;
SOCKET s;
memset(&peeraddr_in, 0, sizeof(struct sockaddr_in));

Table of Contents

Other manuals for Keysight Technologies N5173B EXG

Related product manuals