EasyManua.ls Logo

Rohde & Schwarz SMW200A - Page 1231

Rohde & Schwarz SMW200A
1312 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
®
SMW200A
1216User Manual 1175.6632.02 ─ 16
}
string TcpClient::getCurrentHostName( ) const
{
return currentHostName;
}
int TcpClient::getCurrentPort( ) const
{
return currentPort;
}
TelnetClient.cpp
#include <iostream>
#include "TcpClient.h"
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
}
Telnet program examples

Table of Contents

Related product manuals