Changeset 3691

Show
Ignore:
Timestamp:
05/30/2012 07:05:26 PM (13 months ago)
Author:
kurtis.heimerl
Message:

Missed a small number of files

Location:
openbts/trunk/CLI
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • openbts/trunk/CLI/CLI.cpp

    r3688 r3691  
    7878 
    7979 
    80 int Parser::execute(char* line, ostream& os, istream& is) const 
     80int Parser::execute(char* line, ostream& os) const 
    8181{ 
    8282        // escape to the shell? 
     
    105105                return NOT_FOUND; 
    106106        } 
    107         int (*func)(int,char**,ostream&,istream&); 
     107        int (*func)(int,char**,ostream&); 
    108108        func = cfp->second; 
    109109        // Do it. 
    110         int retVal = (*func)(argc,argv,os,is); 
     110        int retVal = (*func)(argc,argv,os); 
    111111        // Give hint on bad # args. 
    112112        if (retVal==BAD_NUM_ARGS) os << help(argv[0]) << endl; 
     
    115115 
    116116 
    117 int Parser::process(const char* line, ostream& os, istream& is) const 
     117int Parser::process(const char* line, ostream& os) const 
    118118{ 
    119119        char *newLine = strdup(line); 
    120         int retVal = execute(newLine,os,is); 
     120        int retVal = execute(newLine,os); 
    121121        free(newLine); 
    122122        if (retVal>0) os << standardResponses[retVal] << endl; 
     
    138138 
    139139// forward refs 
    140 int printStats(int argc, char** argv, ostream& os, istream& is); 
     140int printStats(int argc, char** argv, ostream& os); 
    141141 
    142142/* 
     
    146146 
    147147/** Display system uptime and current GSM frame number. */ 
    148 int uptime(int argc, char** argv, ostream& os, istream& is) 
     148int uptime(int argc, char** argv, ostream& os) 
    149149{ 
    150150        if (argc!=1) return BAD_NUM_ARGS; 
     
    173173 
    174174/** Give a list of available commands or describe a specific command. */ 
    175 int showHelp(int argc, char** argv, ostream& os, istream& is) 
     175int showHelp(int argc, char** argv, ostream& os) 
    176176{ 
    177177        if (argc==2) { 
     
    201201 
    202202/** A function to return -1, the exit code for the caller. */ 
    203 int exit_function(int argc, char** argv, ostream& os, istream& is) 
     203int exit_function(int argc, char** argv, ostream& os) 
    204204{ 
    205205        unsigned wait =0; 
     
    231231        if (loads) { 
    232232                os << endl << "exiting with loads:" << endl; 
    233                 printStats(1,NULL,os,is); 
     233                printStats(1,NULL,os); 
    234234        } 
    235235        os << endl << "exiting..." << endl; 
     
    240240 
    241241// Forward ref. 
    242 int tmsis(int argc, char** argv, ostream& os, istream& is); 
     242int tmsis(int argc, char** argv, ostream& os); 
    243243 
    244244/** Dump TMSI table to a text file. */ 
    245 int dumpTMSIs(const char* filename, istream& is) 
     245int dumpTMSIs(const char* filename) 
    246246{ 
    247247        ofstream fileout; 
     
    251251        char* subargv[] = {"tmsis", NULL}; 
    252252        int subargc = 1; 
    253         return tmsis(subargc, subargv, fileout, is); 
     253        return tmsis(subargc, subargv, fileout); 
    254254} 
    255255 
     
    258258 
    259259/** Print or clear the TMSI table. */ 
    260 int tmsis(int argc, char** argv, ostream& os, istream& is) 
     260int tmsis(int argc, char** argv, ostream& os) 
    261261{ 
    262262        if (argc>=2) { 
     
    272272                        if (argc!=3) return BAD_NUM_ARGS; 
    273273                        os << "dumping TMSI table to " << argv[2] << endl; 
    274                         return dumpTMSIs(argv[2],is); 
     274                        return dumpTMSIs(argv[2]); 
    275275                } 
    276276                return BAD_VALUE; 
     
    285285 
    286286/** Submit an SMS for delivery to an IMSI. */ 
    287 int sendsimple(int argc, char** argv, ostream& os, istream& is) 
     287int sendsimple(int argc, char** argv, ostream& os) 
    288288{ 
    289289        if (argc!=3) return BAD_NUM_ARGS; 
     
    328328 
    329329/** Submit an SMS for delivery to an IMSI. */ 
    330 int sendsms(int argc, char** argv, ostream& os, istream& is) 
     330int sendsms(int argc, char** argv, ostream& os) 
    331331{ 
    332332        if (argc!=3) return BAD_NUM_ARGS; 
     
    353353 
    354354/** DEBUGGING: Sends a special sms that triggers a RRLP message to an IMSI. */ 
    355 int sendrrlp(int argc, char** argv, ostream& os, istream& is) 
     355int sendrrlp(int argc, char** argv, ostream& os) 
    356356{ 
    357357        if (argc!=3) return BAD_NUM_ARGS; 
     
    382382 
    383383/** Print current usage loads. */ 
    384 int printStats(int argc, char** argv, ostream& os, istream& is) 
     384int printStats(int argc, char** argv, ostream& os) 
    385385{ 
    386386        if (argc!=1) return BAD_NUM_ARGS; 
     
    399399 
    400400/** Get/Set MCC, MNC, LAC, CI. */ 
    401 int cellID(int argc, char** argv, ostream& os, istream& is) 
     401int cellID(int argc, char** argv, ostream& os) 
    402402{ 
    403403        if (argc==1) { 
     
    436436 
    437437/** Print table of current transactions. */ 
    438 int calls(int argc, char** argv, ostream& os, istream& is) 
     438int calls(int argc, char** argv, ostream& os) 
    439439{ 
    440440        if (argc!=1) return BAD_NUM_ARGS; 
     
    447447 
    448448/** Print or modify the global configuration table. */ 
    449 int config(int argc, char** argv, ostream& os, istream& is) 
     449int config(int argc, char** argv, ostream& os) 
    450450{ 
    451451        // no args, just print 
     
    486486 
    487487/** Remove a configiuration value. */ 
    488 int unconfig(int argc, char** argv, ostream& os, istream& is) 
     488int unconfig(int argc, char** argv, ostream& os) 
    489489{ 
    490490        if (argc!=2) return BAD_NUM_ARGS; 
     
    504504 
    505505/** Dump current configuration to a file. */ 
    506 int configsave(int argc, char** argv, ostream& os, istream& is) 
     506int configsave(int argc, char** argv, ostream& os) 
    507507{ 
    508508        os << "obsolete" << endl; 
     
    513513 
    514514/** Change the registration timers. */ 
    515 int regperiod(int argc, char** argv, ostream& os, istream& is) 
     515int regperiod(int argc, char** argv, ostream& os) 
    516516{ 
    517517        if (argc==1) { 
     
    544544 
    545545/** Print the list of alarms kept by the logger, i.e. the last LOG(ALARM) << <text> */ 
    546 int alarms(int argc, char** argv, ostream& os, istream& is) 
     546int alarms(int argc, char** argv, ostream& os) 
    547547{ 
    548548        std::ostream_iterator<std::string> output( os, "\n" ); 
     
    554554 
    555555/** Version string. */ 
    556 int version(int argc, char **argv, ostream& os, istream& is) 
     556int version(int argc, char **argv, ostream& os) 
    557557{ 
    558558        if (argc!=1) return BAD_NUM_ARGS; 
     
    562562 
    563563/** Show start-up notices. */ 
    564 int notices(int argc, char **argv, ostream& os, istream& is) 
     564int notices(int argc, char **argv, ostream& os) 
    565565{ 
    566566        if (argc!=1) return BAD_NUM_ARGS; 
     
    569569} 
    570570 
    571 int page(int argc, char **argv, ostream& os, istream& is) 
     571int page(int argc, char **argv, ostream& os) 
    572572{ 
    573573        if (argc==1) { 
     
    594594 
    595595 
    596 int endcall(int argc, char **argv, ostream& os, istream& is) 
     596int endcall(int argc, char **argv, ostream& os) 
    597597{ 
    598598        if (argc!=2) return BAD_NUM_ARGS; 
     
    634634 
    635635 
    636 int chans(int argc, char **argv, ostream& os, istream& is) 
     636int chans(int argc, char **argv, ostream& os) 
    637637{ 
    638638        if (argc!=1) return BAD_NUM_ARGS; 
     
    676676 
    677677 
    678 int power(int argc, char **argv, ostream& os, istream& is) 
     678int power(int argc, char **argv, ostream& os) 
    679679{ 
    680680        os << "current downlink power " << gBTS.powerManager().power() << " dB wrt full scale" << endl; 
     
    705705 
    706706 
    707 int rxgain(int argc, char** argv, ostream& os, istream& is) 
     707int rxgain(int argc, char** argv, ostream& os) 
    708708{ 
    709709        os << "current RX gain is " << gConfig.getNum("GSM.Radio.RxGain") << " dB" << endl; 
     
    719719} 
    720720 
    721 int noise(int argc, char** argv, ostream& os, istream& is) 
     721int noise(int argc, char** argv, ostream& os) 
    722722{ 
    723723        if (argc!=1) return BAD_NUM_ARGS; 
  • openbts/trunk/CLI/CLI.h

    r3165 r3691  
    3737 
    3838/** A table for matching strings to actions. */ 
    39 typedef std::map<std::string,int (*)(int,char**,std::ostream&,std::istream&)> ParseTable; 
     39typedef std::map<std::string,int (*)(int,char**,std::ostream&)> ParseTable; 
    4040 
    4141/** The help table. */ 
     
    5858                @return 0 on sucess, -1 on exit request, error codes otherwise 
    5959        */ 
    60         int process(const char* line, std::ostream& os, std::istream& is) const; 
     60        int process(const char* line, std::ostream& os) const; 
    6161 
    6262        /** Add a command to the parsing table. */ 
    63         void addCommand(const char* name, int (*func)(int,char**,std::ostream&,std::istream&), const char* helpString) 
     63        void addCommand(const char* name, int (*func)(int,char**,std::ostream&), const char* helpString) 
    6464                { mParseTable[name] = func; mHelpTable[name]=helpString; } 
    6565 
     
    7373 
    7474        /** Parse and execute a command string. */ 
    75         int execute(char* line, std::ostream& os, std::istream& is) const; 
     75        int execute(char* line, std::ostream& os) const; 
    7676 
    7777};