otsdaq  v2_05_02_indev
SupervisorInfo.cc
1 #include "otsdaq/SupervisorInfo/SupervisorInfo.h"
2 
3 using namespace ots;
4 
5 const std::string SupervisorInfo::APP_STATUS_UNKNOWN = "Unknown";
6 
7 //=====================================================================================
8 void SupervisorInfo::setStatus(const std::string& status, const unsigned int progress, const std::string& detail)
9 {
10  status_ = status;
11  progress_ = progress;
12  detail_ = detail;
13  if(status != SupervisorInfo::APP_STATUS_UNKNOWN) // if unknown, then do not consider it a status update
14  lastStatusTime_ = time(0);
15 } // end setStatus()
16 
17 //=====================================================================================
18 void SupervisorInfo::clear(void)
19 {
20  descriptor_ = 0;
21  progress_ = 0;
22  contextDescriptor_ = 0;
23  name_ = "";
24  id_ = 0;
25  contextName_ = "";
26  status_ = SupervisorInfo::APP_STATUS_UNKNOWN;
27 } // end clear()