EasyManua.ls Logo

R&S SMA100B - Page 778

R&S SMA100B
822 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...
Reference information for remote control
R&S
®
SMA100B
778User Manual 1178.3834.02 ─ 09
TcpClient client;
switch( argc )
{
case 3:
useSingleCommand = true;
singleCommand = argv[2];
case 2:
hostname = argv[1];
break;
default:
printUsage();
return(-1);
}
try
{
client.connectToServer( hostname, port );
bool terminate = false;
while( !terminate )
{
char buffer[1024];
if( useSingleCommand )
{
input = singleCommand; //send string
}
else
{
cin.getline( buffer, 1024 );
input = buffer;
if( input == "end" )
{
terminate = true;
}
}
if( !terminate)
{
client.transmit( input ); //send string
int qPos = input.find( "?", 0 );
//receive string only when needed
if( qPos > 0 )
{
string rcStr = "";
client.receive( rcStr );
cout << rcStr << endl;
}
}
if( useSingleCommand )
{
terminate = true;
}
}
Telnet program examples

Table of Contents

Other manuals for R&S SMA100B

Related product manuals