ClientMain.cpp
Go to the documentation of this file.
00001 #include "Client.h"
00002 #include <iostream>"
00003 Client *client;
00004 
00005 int main( int argc, char **argv)
00006 {
00007   client = new Client();
00008   client->initClient();
00009   while(1)
00010    { 
00011      puts("\n\n****COMMAND MENUE:*****");
00012      puts("a. Start/Stop Broadcasting\nb. Request Measurments\nc. Channel Switch On/Off");
00013      puts("Enter Choice:");
00014      char d[2];
00015      gets(d);
00016      if(strcmp(d,"a")==0)
00017                 { 
00018                   int frq;
00019                   puts("Enter Frequency (0=Stop, N=milisec):");
00020                   std::cin>>frq;
00021                   puts("got frq");
00022                   client->start_stopBroadcasting(frq);
00023                   
00024                 }
00025           else if(strcmp(d,"b")==0)
00026                { 
00027                         client->requestMeasurments();
00028                }
00029           else if(strcmp(d,"c")==0)
00030                 {
00031                      char channel[2],status[2];
00032                      ushort chan;
00033                      puts("Enter channel#:");
00034                      gets(channel);
00035                      puts("Enter Status(0=OFF,1=ON):");
00036                      gets(status);
00037                      if(strcmp(status,"0")==0)
00038                         client->on_offChannel(channel[0],'0');
00039                      else
00040                         client->on_offChannel(channel[0],'1');
00041                      
00042                      }
00043      
00044        
00045     }
00046     
00047 }


tug_ist_diagnosis_board
Author(s): Safdar Zaman, Gerald Steinbauer
autogenerated on Mon Jan 6 2014 11:51:23