Changeset 19556
- Timestamp:
- 07/06/19 18:11:06 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/smartfact.cc
r19386 r19556 1064 1064 1065 1065 ofstream(fPath+"/tngdust.data") << out.str(); 1066 1067 return GetCurrentState(); 1068 } 1069 1070 int HandleTngWeatherData(const EventImp &d) 1071 { 1072 if (!CheckDataSize(d, "TngWeather:Data", sizeof(TNGWeather::DimWeather))) 1073 return GetCurrentState(); 1074 1075 const auto &data = d.Ref<TNGWeather::DimWeather>(); 1076 1077 ostringstream out; 1078 out << d.GetJavaDate() << '\n'; 1079 out << HTML::kWhite << '\t' << data.fTemperature << '\n'; 1080 out << HTML::kWhite << '\t' << data.fTempTrend << '\n'; 1081 out << HTML::kWhite << '\t' << data.fDewPoint << '\n'; 1082 out << HTML::kWhite << '\t' << data.fHumidity << '\n'; 1083 out << HTML::kWhite << '\t' << data.fAirPressure << '\n'; 1084 out << HTML::kWhite << '\t' << data.fWindSpeed << '\n'; 1085 out << HTML::kWhite << '\t' << data.fWindDirection << '\n'; 1086 out << HTML::kWhite << '\t' << data.fDustTotal << '\n'; 1087 out << HTML::kWhite << '\t' << data.fSolarimeter << '\n'; 1088 1089 ofstream(fPath+"/tngdata.data") << out.str(); 1066 1090 1067 1091 return GetCurrentState(); … … 3415 3439 Subscribe("TNG_WEATHER/DUST") 3416 3440 (bind(&StateMachineSmartFACT::HandleTngWeatherDust, this, placeholders::_1)); 3441 Subscribe("TNG_WEATHER/DATA") 3442 (bind(&StateMachineSmartFACT::HandleTngWeatherData, this, placeholders::_1)); 3417 3443 Subscribe("RAIN_SENSOR/DATA") 3418 3444 (bind(&StateMachineSmartFACT::HandleRainSensorData, this, placeholders::_1));
Note:
See TracChangeset
for help on using the changeset viewer.