HP 16500H User Manual page 59

Interface module
Hide thumbs Also See for 16500H:
Table of Contents

Advertisement

To write programs that open the command parser socket
serv_addr.sin_port = htons ( port );
/* Create an endpoint for communication */
sockfd = socket( AF_INET, SOCK_STREAM, 0 );
/* Initiate a connection on the created socket */
connect( sockfd, ( tdSOCKET_ADDR * )&serv_addr, sizeof (
serv_addr ) );
/* Send a message from the created socket */
send ( sockfd, cmdString, strlen ( cmdString ), 0 );
/* Receive a message from the 16500B socket */
recv ( sockfd, receiveBuffer, sizeof ( receiveBuffer ), 0
);
printf ( "%s\n", receiveBuffer );
close ( sockfd );
}
Programming the HP 16500B
5-13

Advertisement

Table of Contents
loading

Table of Contents