Changeset 14370 for trunk/FACT++/src
- Timestamp:
- 08/14/12 12:28:37 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/StateMachineDimControl.cc
r14212 r14370 31 31 int StateMachineDimControl::ChangeState(int qos, const Time &time, int scriptdepth, string scriptfile, string user) 32 32 { 33 ostringstream pid;34 pid << getpid();35 36 33 string msg; 34 /* 37 35 switch (qos) 38 36 { … … 47 45 } 48 46 } 49 50 if (qos<0) 51 msg += "-"+to_string(scriptdepth); 52 53 msg += ": "+scriptfile+" ["+user+":"+pid.str()+"]"; 54 55 if (fDebug) 56 Write(time, Line(msg, qos<-1 ? '=' :'-'), 90); 47 */ 48 49 //if (qos<0) 50 msg += to_string(scriptdepth); 51 52 msg += ":"+scriptfile+"["+user+":"+to_string(getpid())+"]"; 53 54 //if (fDebug) 55 //Write(time, Line(msg, qos<-1 ? '=' :'-'), MessageImp::kInternal); 57 56 58 57 if (qos==-3) 59 58 fScriptUser = fUser; 60 59 61 return qos+3; 60 SetCurrentState(qos+3, msg.c_str()); 61 //SetCurrentState(qos+3, Line(msg, qos<-1 ? '=' :'-').c_str()); 62 return GetCurrentState(); 63 64 //return qos+3; 62 65 } 63 66 … … 66 69 if (txt=="") 67 70 { 71 return ChangeState(qos, time, Readline::GetScriptDepth(), Readline::GetScript(), fScriptUser); 72 /* 73 === This might be necessary for thread safety, 74 === but it break that the signal for the start of a new 75 === script arrives synchronously before the first output 76 === from the script 77 68 78 // Post an anonymous event to the event loop 69 79 Event evt(""); … … 72 82 Readline::GetScript(), fScriptUser)); 73 83 return PostEvent(evt); 84 */ 74 85 } 75 86 … … 426 437 } 427 438 428 StateMachineDimControl::StateMachineDimControl(ostream &out) : StateMachineDim(out, fIsServer?"DIM_CONTROL 2":"")439 StateMachineDimControl::StateMachineDimControl(ostream &out) : StateMachineDim(out, fIsServer?"DIM_CONTROL":"") 429 440 { 430 441 fDim.Subscribe(*this);
Note:
See TracChangeset
for help on using the changeset viewer.