00001 // Copyright CERN 2012 - Developed in collaboration with GSI 00002 00003 #ifndef _TIMING_H_ 00004 #define _TIMING_H_ 00005 00006 #include <fesa-core/Core/FesaDefs.h> 00007 00008 #include <string> 00009 00010 namespace fesa 00011 { 00012 00013 class MultiplexingContext; 00014 00019 struct CycleSelector 00020 { 00021 00025 std::string domain_; 00026 00030 std::string criterion_; 00031 00035 std::string value_; 00036 00037 }; 00038 00042 int32_t getCycleTime(); 00043 00047 int64_t getActualTime(bool& isHwTime); 00048 00054 std::string getTimeString(int64_t time = 0, char* format = "%Y/%m/%d %T"); 00055 00061 void parseCycleSelector(const std::string& cycleSelector, fesa::CycleSelector& timingSelectorStructure); 00062 00068 void validateCycleSelector(fesa::CycleSelector& cycleSelector, fesa::RequestType requestType); 00069 00073 bool match(const std::string& cycleSelector, fesa::MultiplexingContext* context); 00074 00075 } // fesa 00076 00077 #endif // _TIMING_H_