Changeset 2188 in Sophya for trunk/SophyaPI/PIext
- Timestamp:
- Sep 9, 2002, 6:48:34 PM (23 years ago)
- Location:
- trunk/SophyaPI/PIext
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/basexecut.cc
r2180 r2188 50 50 { 51 51 Services2NObjMgr* srvo = mObjMgr->GetServiceObj(); 52 // ----> Sortie d'application 53 if (kw == "exitpiapp") { 54 mImgApp->Stop(); 55 return(0); 56 } 52 57 // >>>>> Chargement de modules 53 if (kw == "loadmodule") {58 else if (kw == "loadmodule") { 54 59 if (tokens.size() < 2) { cout << "Usage: loadmodule fnameso modulename" << endl; return(0); } 55 60 mpiac->LoadModule(tokens[0], tokens[1]); … … 742 747 { 743 748 string kw, usage; 749 kw = "exitpiapp"; 750 usage = "To end the piapp session"; 751 mpiac->RegisterCommand(kw, usage, this, "Commands"); 744 752 kw = "loadmodule"; 745 753 usage = "To load and initialize modules \n Usage: loadmodule fnameso modulename"; -
trunk/SophyaPI/PIext/pistdimgapp.cc
r2165 r2188 47 47 /* Classe SIA_RU__Periodic : mise a jour periodique de */ 48 48 /* la fenetre Stat/Ressource info */ 49 /* + execution de commande soumis de l'exterieur */ 49 50 /* ........................................................... */ 50 51 … … 71 72 void SIA_RU__Periodic::DoPeriodic() 72 73 { 73 if (_app) _app->UpdateStatResourceInfo(); 74 if (_app) { 75 _app->ExecuteExtCommand(); 76 _app->UpdateStatResourceInfo(); 77 } 74 78 } 75 79 … … 210 214 therm_cpu->SetThreshold(0.75, 0.90); 211 215 216 fg_exc_cmd = false; 212 217 UpdateStatResourceInfo(); 213 218 resupd_periodic = new SIA_RU__Periodic(this); … … 775 780 776 781 /* --Methode-- */ 782 int PIStdImgApp::ExecuteExtCommand() 783 { 784 if (!fg_exc_cmd) return(0); 785 else { 786 fg_exc_cmd = false; 787 return CmdInterpreter()->Interpret(exc_command); 788 } 789 } 790 791 /* --Methode-- */ 777 792 void PIStdImgApp::AddText(string const & txt, double xp, double yp, string const& sop) 778 793 { -
trunk/SophyaPI/PIext/pistdimgapp.h
r2165 r2188 59 59 string title="", int oid=0); 60 60 61 // Specification (de l'exterieur) de commande a executer 62 inline void SubmitCommand(string const& cmd) 63 { exc_command = cmd; fg_exc_cmd = true; } 64 // Execution de commande soumis de l'exterieur 65 int ExecuteExtCommand(); 66 61 67 // Fonction d'ajout de texte (provisoire - Aout 99) 62 68 void AddText(string const & txt, double xp, double yp, string const& opt); … … 202 208 ResourceUsage resusg; 203 209 PIPeriodic* resupd_periodic; 210 211 // Commande specifie de l'exterieur a executer 212 // Pris en charge par resupd_periodic 213 string exc_command; 214 bool fg_exc_cmd; 204 215 }; 205 216
Note:
See TracChangeset
for help on using the changeset viewer.