- Timestamp:
- 11/03/12 19:18:21 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/RemoteControl.h
r14546 r14554 23 23 { 24 24 protected: 25 std::ostream &lin; /// Output stream for local synchrounous output 25 26 std::ostream &lout; /// Output stream for local synchrounous output 26 27 … … 29 30 protected: 30 31 // Redirect asynchronous output to the output window 31 RemoteControlImp(std::ostream & , std::ostream &in) :lout(in)32 RemoteControlImp(std::ostream &out, std::ostream &in) : lin(out), lout(in) 32 33 { 33 34 } … … 165 166 virtual void JsEnd(const std::string &) { UnsubscribeAll(); SetSection(-3); } 166 167 virtual bool JsSend(const std::string &str) { return ProcessCommand(str); } 167 virtual void JsOut(const std::string &msg) { l out<< msg << endl; }168 virtual void JsOut(const std::string &msg) { lin << msg << endl; } 168 169 virtual void JsPrint(const std::string &msg) { if (fImp) fImp->Comment(msg.empty()?" ":msg); } 169 170 virtual void JsAlarm(const std::string &msg) { if (fImp) fImp->Alarm(msg.empty()?" ":msg); } … … 413 414 414 415 T::fScript = opt; 416 417 T::Lock(); 415 418 JsRun(opt, data); 419 T::Unlock(); 420 416 421 return true; 417 422 } … … 431 436 } 432 437 438 T::Lock(); 433 439 const int rc = JsWait(server, state, ms); 440 T::Unlock(); 434 441 435 442 if (rc<0 || rc==1) … … 476 483 } 477 484 478 void SetReceiver(StateMachineDimControl &imp) { fImp = &imp; } 485 void SetReceiver(StateMachineDimControl &imp) 486 { 487 fImp = &imp; 488 fImp->SetStateCallback(bind(&InterpreterV8::JsHandleState, this, placeholders::_1, placeholders::_2)); 489 } 479 490 }; 480 491
Note:
See TracChangeset
for help on using the changeset viewer.