EasyManuals Logo

R&S SMB100A User Manual

R&S SMB100A
528 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
Page #272 background imageLoading...
Page #272 background image
Remote Control Basics
R&S
®
SMB100A
257Operating Manual 1407.0806.32 ─ 21
void printUsage()
{
cout<<"usage: EthernetRawCommand <server-ip> [scpi-command]"<<endl;
}
int main( int argc, char *argv[] )
{
int errorCode = 0; //no error
bool useSingleCommand = false;
string singleCommand = "";
string hostname = "";
int port = 5025;
string input = "";
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
Starting a Remote Control Session

Table of Contents

Other manuals for R&S SMB100A

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the R&S SMB100A and is the answer not in the manual?

R&S SMB100A Specifications

General IconGeneral
BrandR&S
ModelSMB100A
CategoryInverter
LanguageEnglish