Changeset 17934
- Timestamp:
- 07/27/14 11:45:39 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/smartfact.cc
r17884 r17934 28 28 #include "HeadersFSC.h" 29 29 #include "HeadersGPS.h" 30 #include "HeadersSQM.h" 30 31 #include "HeadersMCP.h" 31 32 #include "HeadersLid.h" … … 536 537 DimDescribedState fDimFscControl; 537 538 DimDescribedState fDimGpsControl; 539 DimDescribedState fDimSqmControl; 538 540 DimDescribedState fDimAgilentControl24; 539 541 DimDescribedState fDimAgilentControl50; … … 1834 1836 1835 1837 ofstream(fPath+"/gps.data") << out.str(); 1838 1839 return GetCurrentState(); 1840 } 1841 1842 int HandleSqmData(const EventImp &d) 1843 { 1844 if (!CheckDataSize(d, "SqmControl:Data", sizeof(SQM::Data))) 1845 return GetCurrentState(); 1846 1847 const SQM::Data &data = d.Ref<SQM::Data>(); 1848 1849 ostringstream out; 1850 1851 out << fixed; 1852 out << d.GetJavaDate() << '\n'; 1853 out << setprecision(4); 1854 out << HTML::kWhite << '\t' << data.mag << '\n'; 1855 out << HTML::kWhite << '\t' << data.freq << '\n'; 1856 out << HTML::kWhite << '\t' << data.counts << '\n'; 1857 out << HTML::kWhite << '\t' << data.period << '\n'; 1858 out << HTML::kWhite << '\t' << data.temp << "\n"; 1859 1860 ofstream(fPath+"/sqm.data") << out.str(); 1836 1861 1837 1862 return GetCurrentState(); … … 2951 2976 out << GetStateHtml(fDimFscControl, FSC::State::kConnected); 2952 2977 out << GetStateHtml(fDimGpsControl, GPS::State::kConnected); 2978 out << GetStateHtml(fDimSqmControl, SQM::State::kConnected); 2953 2979 out << GetStateHtml(fDimAgilentControl24, Agilent::State::kVoltageOff); 2954 2980 out << GetStateHtml(fDimAgilentControl50, Agilent::State::kVoltageOff); … … 3025 3051 fDimFscControl ("FSC_CONTROL"), 3026 3052 fDimGpsControl ("GPS_CONTROL"), 3053 fDimSqmControl ("SQM_CONTROL"), 3027 3054 fDimAgilentControl24("AGILENT_CONTROL_24V"), 3028 3055 fDimAgilentControl50("AGILENT_CONTROL_50V"), … … 3051 3078 fDimFscControl.Subscribe(*this); 3052 3079 fDimGpsControl.Subscribe(*this); 3080 fDimSqmControl.Subscribe(*this); 3053 3081 fDimAgilentControl24.Subscribe(*this); 3054 3082 fDimAgilentControl50.Subscribe(*this); … … 3089 3117 Subscribe("GPS_CONTROL/NEMA") 3090 3118 (bind(&StateMachineSmartFACT::HandleGpsNema, this, placeholders::_1)); 3119 3120 Subscribe("SQM_CONTROL/DATA") 3121 (bind(&StateMachineSmartFACT::HandleSqmData, this, placeholders::_1)); 3091 3122 3092 3123 Subscribe("TEMPERATURE/DATA")
Note:
See TracChangeset
for help on using the changeset viewer.