Changeset 12963
- Timestamp:
- 02/29/12 10:05:36 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/RemoteControl.h
r12903 r12963 61 61 { 62 62 private: 63 MessageImp *fImp; 64 65 int32_t fLabel; 66 67 int Write(const Time &time, const std::string &txt, int qos=kMessage) 68 { 69 return fImp ? fImp->Write(time, txt, qos) : MessageImp::Write(time, txt, qos); 70 } 71 63 72 static void append(std::string &str) 64 73 { … … 118 127 // Redirect asynchronous output to the output window 119 128 RemoteControl(const char *name) : T(name), 120 RemoteControlImp(T::GetStreamOut(), T::GetStreamIn()) 129 RemoteControlImp(T::GetStreamOut(), T::GetStreamIn()), fImp(0), fLabel(-1) 121 130 { 122 131 } … … 125 134 { 126 135 T::PrintGeneralHelp(); 127 lout << " " << kUnderline << "Specific commands: " << endl;128 lout << kBold << " h,help <arg> " << kReset << "List help text for given server or command. " << endl;136 lout << " " << kUnderline << "Specific commands:\n"; 137 lout << kBold << " h,help <arg> " << kReset << "List help text for given server or command.\n"; 129 138 // lout << kBold << " s,servers " << kReset << "List all servers which are connected." << endl; 130 lout << kBold << " svc,services " << kReset << "List all services in the network." << endl; 131 lout << kBold << " st,states " << kReset << "List all states in the network." << endl; 132 lout << kBold << " # <text> " << kReset << "Echo <text> to the output stream" << endl; 133 lout << kBold << " .s " << kReset << "Wait for the state-machine to change to the given state." << endl; 134 lout << " " " .s <server> [<state> [<timeout>]]" << endl; 135 lout << " " "<server> The server for which state to wait (e.g. FTM_CONTROL)" << endl; 136 lout << " " "<state> The state id (see 'states') for which to wait (e.g. 3)" << endl; 137 lout << " " "<imeout> A timeout in millisenconds how long to wait (e.g. 500)" << endl; 139 lout << kBold << " svc,services " << kReset << "List all services in the network.\n"; 140 lout << kBold << " st,states " << kReset << "List all states in the network.\n"; 141 lout << kBold << " # <text> " << kReset << "Echo <text> to the output stream\n"; 142 lout << kBold << " .s " << kReset << "Wait for the state-machine to change to the given state.\n"; 143 lout << " " " .s <server> [<state> [<timeout> [<label>]]]\n"; 144 lout << " " "<server> The server for which state to wait (e.g. FTM_CONTROL)\n"; 145 lout << " " "<state> The state id (see 'states') for which to wait (e.g. 3)\n"; 146 lout << " " "<imeout> A timeout in millisenconds how long to wait (e.g. 500)\n"; 147 lout << " " "<label> A label until which everything is skipped in case of timeout\n"; 138 148 lout << endl; 139 149 return true; … … 200 210 usleep(1); 201 211 212 if (l->second->GetState()!=state) 213 { 214 int label = -1; 215 in >> label; 216 T::SetLabel(label); 217 } 218 202 219 return true; 203 220 } … … 205 222 if (str[0]=='#') 206 223 { 207 lout << Tools::Trim(str.substr(1)) << endl; 224 //lout << Tools::Trim(str.substr(1)) << endl; 225 fImp->Info(Tools::Trim(str.substr(1))); 208 226 return true; 209 227 } … … 229 247 return ProcessCommand(str); 230 248 } 249 250 void SetReceiver(MessageImp &imp) { fImp = &imp; } 231 251 }; 232 252
Note:
See TracChangeset
for help on using the changeset viewer.