Changeset 19381
- Timestamp:
- 11/11/18 19:23:40 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/evtserver.cc
r19231 r19381 33 33 class StateMachineEventServer : public StateMachineDim 34 34 { 35 public: 36 static bool fIsServer; 37 38 private: 39 35 40 DimDescribedState fDimFadControl; 36 41 … … 53 58 54 59 Time fTimer; 55 56 private:57 60 58 61 int Execute() … … 154 157 fMax[i] /= 1000; 155 158 156 for (int i=8; i<1440; i+=9)157 fMax[i] = fMax[i-2];159 //for (int i=8; i<1440; i+=9) 160 // fMax[i] = fMax[i-2]; 158 161 159 162 // construct output … … 240 243 } 241 244 245 int Print() const 246 { 247 Out() << fDimFadControl << endl; 248 return GetCurrentState(); 249 } 250 242 251 243 252 public: 244 StateMachineEventServer(ostream &out=cout) : StateMachineDim(out, "EVENT_SERVER"),253 StateMachineEventServer(ostream &out=cout) : StateMachineDim(out, fIsServer?"EVENT_SERVER":""), 245 254 fDimFadControl("FAD_CONTROL"), fStartDate(0), fNight(0), fIn(0), fMax(1440) 246 255 … … 269 278 (bind(&StateMachineEventServer::StopServer, this)) 270 279 ("Stop serving the smartfact camera file"); 280 281 AddEvent("PRINT") 282 (bind(&StateMachineEventServer::Print, this)) 283 ("Print current status"); 271 284 } 272 285 ~StateMachineEventServer() … … 285 298 }; 286 299 300 bool StateMachineEventServer::fIsServer = false; 301 287 302 // ------------------------------------------------------------------------ 288 303 … … 292 307 int RunShell(Configuration &conf) 293 308 { 309 StateMachineEventServer::fIsServer = !conf.Get<bool>("client"); 294 310 return Main::execute<T, StateMachineEventServer>(conf); 295 311 } … … 302 318 ("out-path", var<string>("www/smartfact/data"), "Path where the output camera file should be written.") 303 319 ("interval", var<uint32_t>(5000), "Interval of updates in milliseconds.") 320 ("client", po_bool(false), "For a standalone client choose this option.") 304 321 ; 305 322
Note:
See TracChangeset
for help on using the changeset viewer.