Changeset 11051 for trunk/FACT++/src


Ignore:
Timestamp:
06/17/11 09:54:38 (13 years ago)
Author:
tbretz
Message:
Added the comment command (#)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/RemoteControl.h

    r11047 r11051  
    130130        lout << kBold << "   svc,services " << kReset << "List all services in the network." << endl;
    131131        lout << kBold << "   st,states    " << kReset << "List all states in the network." << endl;
     132        lout << kBold << "   # <text>     " << kReset << "Echo <text> to the output stream" << endl;
    132133        lout << kBold << "   .s           " << kReset << "Wait for the state-machine to change to the given state." << endl;
    133         lout <<          "                "              "     .s <server> <state> [<timeout>]" << endl;
     134        lout <<          "                "              "     .s <server> [<state> [<timeout>]]" << endl;
    134135        lout <<          "                "              "<server>  The server for which state to wait (e.g. FTM_CONTROL)" << endl;
    135136        lout <<          "                "              "<state>   The state id (see 'states') for which to wait (e.g. 3)" << endl;
     
    194195            }
    195196
    196             const Time timeout = Time()+boost::posix_time::millisec(ms);
     197            const Time timeout = ms<=0 ? Time(Time::none) : Time()+boost::posix_time::millisec(ms);
    197198
    198199            while (l->second->GetState()!=state && timeout>Time())
    199200                usleep(1);
    200201
     202            return true;
     203        }
     204
     205        if (str[0]=='#')
     206        {
     207            lout << Tools::Trim(str.substr(1)) << endl;
    201208            return true;
    202209        }
Note: See TracChangeset for help on using the changeset viewer.