- Timestamp:
- 05/13/12 15:38:46 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Readline.cc
r13682 r13702 71 71 72 72 Readline *Readline::This = 0; 73 int Readline::fLabel = - 2;73 int Readline::fLabel = -3; 74 74 75 75 // -------------------------------------------------------------------------- … … 1248 1248 return 0; 1249 1249 1250 SetSection(- 1);1250 SetSection(-2); 1251 1251 fLabel = -1; 1252 1252 … … 1263 1263 if (!fin) 1264 1264 { 1265 SetSection(- 2);1265 SetSection(-3); 1266 1266 return -1; 1267 1267 } … … 1272 1272 fCommandLog << ")" << endl; 1273 1273 1274 SetSection( 0);1274 SetSection(-1); 1275 1275 1276 1276 int rc = 0; 1277 1277 1278 1278 string buffer; 1279 while (getline(fin, buffer, '\n') )1279 while (getline(fin, buffer, '\n') && fLabel>-2) 1280 1280 { 1281 1281 buffer = Tools::Trim(buffer); … … 1304 1304 1305 1305 fLabel = -1; 1306 SetSection(- 2);1306 SetSection(-3); 1307 1307 1308 1308 fCommandLog << "# " << Time() << " - " << name << " (FINISHED)" << endl; -
trunk/FACT++/src/Readline.h
r13668 r13702 100 100 void ProcessLine(const std::string &str); 101 101 static void SetLabel(int l) { fLabel = l; } 102 static int GetLabel() { return fLabel; } 102 103 103 104 int GetLine() const { return fLine; } -
trunk/FACT++/src/RemoteControl.h
r13672 r13702 68 68 int Write(const Time &time, const std::string &txt, int qos=kMessage) 69 69 { 70 if (!fImp) 71 return 0; 70 72 return fImp ? fImp->Write(time, txt, qos) : MessageImp::Write(time, txt, qos); 71 73 } … … 213 215 T::GetStreamOut().SetBacklog(false); 214 216 T::GetStreamOut().SetNullOutput(false); 215 while (l->second->GetState()!=state && timeout>Time() )217 while (l->second->GetState()!=state && timeout>Time() && T::GetLabel()!=-2) 216 218 usleep(1); 217 219 T::GetStreamOut().SetNullOutput(true); 218 220 T::GetStreamOut().SetBacklog(true); 219 221 220 if ( l->second->GetState()!=state)222 if (T::GetLabel()!=0 && l->second->GetState()!=state) 221 223 { 222 224 int label = -1; -
trunk/FACT++/src/dimctrl.cc
r13681 r13702 95 95 { 96 96 Debug("Stop received"); 97 Readline::SetLabel( 0);97 Readline::SetLabel(-2); 98 98 } 99 99 … … 165 165 { 166 166 string msg; 167 if (fLabel<0)167 switch (fLabel) 168 168 { 169 if (fLabel==-1) 170 msg = Line("Begin ["+fScript+"]", '='); 171 else 172 msg = Line("End ["+fScript+"]", '='); 173 } 174 else 175 { 176 ostringstream out; 177 out << "Label " << fLabel << " [" << fScript << "]"; 178 msg = Line(out.str(), '-'); 169 case -3: msg = Line("End ["+fScript+"]", '='); break; 170 case -2: msg = Line("Load ["+fScript+"]", '='); break; 171 case -1: msg = Line("Begin ["+fScript+"]", '-'); break; 172 default: 173 { 174 ostringstream out; 175 out << "Label " << fLabel << " [" << fScript << "]"; 176 msg = Line(out.str(), '-'); 177 } 179 178 } 180 179 … … 185 184 switch (fLabel) 186 185 { 187 case - 2: return fSrvState.Update(fScript+" [end]");188 case - 1: return fSrvState.Update(fScript+" [load]");189 case 0: return fSrvState.Update(fScript+" [start]");186 case -3: return fSrvState.Update(fScript+" [end]"); 187 case -2: return fSrvState.Update(fScript+" [load]"); 188 case -1: return fSrvState.Update(fScript+" [start]"); 190 189 } 191 190
Note:
See TracChangeset
for help on using the changeset viewer.