40 lines
695 B
C++
40 lines
695 B
C++
#include <sstream>
|
|
|
|
#include "temperature_reading.hpp"
|
|
|
|
namespace djm::device {
|
|
|
|
std::string TemperatureReading::fmtDebug() const {
|
|
std::stringstream stream;
|
|
bool needspace = false;
|
|
if (cpu) {
|
|
needspace = true;
|
|
stream << "cpu: " << *cpu;
|
|
}
|
|
if (mainboard) {
|
|
if (needspace) {
|
|
stream << " ";
|
|
}
|
|
needspace = true;
|
|
stream << "mainboard: " << *mainboard;
|
|
}
|
|
|
|
if (mics) {
|
|
if (needspace) {
|
|
stream << " ";
|
|
}
|
|
needspace = true;
|
|
stream << "mics: " << *mics;
|
|
}
|
|
|
|
if (opticalCamera) {
|
|
if (needspace) {
|
|
stream << " ";
|
|
}
|
|
stream << "opticalCamera: " << *opticalCamera;
|
|
}
|
|
return stream.str();
|
|
}
|
|
|
|
} // namespace djm::device
|