Remote control interfaces
R&S
®
NRP2
361
User Manual 1173.9157.02 ─ 03
printf("WinSocket initialization failed!\n");
return(1);
}
//---------------
// Create Sockets
//---------------
soLink1 = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
soLink2 = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if ((soLink1 == INVALID_SOCKET) || (soLink2 == INVALID_SOCKET))
{
printf("Creation of Sockets failed.\n");
return(1);
}
//---------------------------
// IP Address and Port of NRP2
//---------------------------
saDevice.sin_addr.s_addr = inet_addr(IP_ADDR);
saDevice.sin_port = htons((u_short) PORT_NO);
saDevice.sin_family = AF_INET;
//------------------
// Connecting Link 1
//------------------
nRet = connect(soLink1, (LPSOCKADDR) &saDevice, sizeof(SOCKADDR));
if (nRet)
{
printf("Connecting of Link 1 failed.\n");
return(1);
}
//------------------
// Connecting Link 2
//------------------
nRet = connect(soLink2, (LPSOCKADDR) &saDevice, sizeof(SOCKADDR));
if (nRet)
{
printf("Connecting of Link 2 failed.\n");
closesocket(soLink1);
return(1);
}
//----------
// send *SRE
//----------
nRet = send(soLink1, "*sre 0\r\n", strlen("*sre 0\r\n"), 0);
if (nRet == 0)
{
closesocket(soLink2);
Ethernet interface
Summary of Contents for NRP2
Page 1: ...R S NRP2 Power Meter User Manual User Manual 2 1173 9157 02 03 Test Measurement...
Page 20: ......
Page 24: ...Contents R S NRP2 6 User Manual 1173 9157 02 03...
Page 40: ...Putting into Operation R S NRP2 22 User Manual 1173 9157 02 03 Starting the R S NRP2...
Page 352: ...Maintenance R S NRP2 334 User Manual 1173 9157 02 03 Storage...
Page 366: ...Error Messages and Troubleshooting R S NRP2 348 User Manual 1173 9157 02 03 Bootmenu...
Page 382: ...Remote control interfaces R S NRP2 364 User Manual 1173 9157 02 03 USB interface...
Page 394: ...Standard Configurations R S NRP2 376 User Manual 1173 9157 02 03...
Page 422: ...Compatibility Information R S NRP2 404 User Manual 1173 9157 02 03...