10#ifndef logger_types_telem_cooler_hpp
11#define logger_types_telem_cooler_hpp
44 const float & flowRate,
45 const uint8_t & pumpLvl,
46 const uint16_t & pumpSpd,
47 const uint8_t & fanLvl,
48 const uint16_t & fanSpd
71 static_cast<void>(len);
75 std::string msg =
"[cooler] ";
78 msg += std::to_string(fbs->liquidTemp()) +
" C ";
81 msg += std::to_string(fbs->flowRate()) +
" L/min ";
84 msg += std::to_string(fbs->pumpLevel()) +
" ";
87 msg += std::to_string(fbs->pumpSpeed()) +
" RPM ";
90 msg += std::to_string(fbs->fanLevel()) +
" ";
93 msg += std::to_string(fbs->fanSpeed()) +
" RPM ";
129 static_cast<void>(
member);
130 std::cerr <<
"Meta data accessor not implemented in telem_usage\n";
The MagAO-X logger flatbuffer log base type.
uint16_t eventCodeT
The type of an event code (16-bit unsigned int).
msgLen2T msgLenT
The type used to refer to the message length, regardless of length.
int8_t logPrioT
The type of the log priority code.
static void * messageBuffer(bufferPtrT &logBuffer)
Get the message buffer address.
std::shared_ptr< char > bufferPtrT
The log entry buffer smart pointer.
static constexpr flatlogs::eventCodeT TELEM_COOLER
inline ::flatbuffers::Offset< Telem_cooler_fb > CreateTelem_cooler_fb(::flatbuffers::FlatBufferBuilder &_fbb, float liquidTemp=0.0f, float flowRate=0.0f, uint8_t pumpLevel=0, uint16_t pumpSpeed=0, uint8_t fanLevel=0, uint16_t fanSpeed=0)
bool VerifyTelem_cooler_fbBuffer(::flatbuffers::Verifier &verifier)
const MagAOX::logger::Telem_cooler_fb * GetTelem_cooler_fb(const void *buf)
static constexpr logPrioT LOG_TELEM
A telemetry recording.
Message type for resolving log messages with a f.b. builder.
flatbuffers::FlatBufferBuilder builder
Base class for logs consisting of a flatbuffer message.
The type of the input message.
messageT(const float &liqTemp, const float &flowRate, const uint8_t &pumpLvl, const uint16_t &pumpSpd, const uint8_t &fanLvl, const uint16_t &fanSpd)
Construct from components.
Log entry recording the build-time git state.
static const flatlogs::eventCodeT eventCode
The event code.
static double getDouble(flatlogs::bufferPtrT &buffer, member m)
static std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
Get the message formatte for human consumption.
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)
static timespec lastRecord
The time of the last time this log was recorded. Used by the telemetry system.
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
static const flatlogs::logPrioT defaultLevel
The default level.