10 #ifndef logger_types_telem_telenv_hpp
11 #define logger_types_telem_telenv_hpp
13 #include "generated/telem_telenv_generated.h"
40 const double & pressure,
41 const double & humidity,
43 const double & winddir,
44 const double & temptruss,
45 const double & tempcell,
46 const double & tempseccell,
47 const double & tempamb,
48 const double & dewpoint
51 auto fp = CreateTelem_telenv_fb(
builder, tempout, pressure, humidity, wind,winddir,temptruss,tempcell,tempseccell,tempamb, dewpoint);
62 return VerifyTelem_telenv_fbBuffer(verifier);
70 static_cast<void>(len);
72 auto fbs = GetTelem_telenv_fb(msgBuffer);
74 std::string
msg =
"[telenv] ";
77 msg += std::to_string(fbs->tempout()) +
" ";
80 msg += std::to_string(fbs->pressure()) +
" ";
83 msg += std::to_string(fbs->humidity()) +
" ";
86 msg += std::to_string(fbs->wind()) +
" ";
89 msg += std::to_string(fbs->winddir()) +
" ";
92 msg += std::to_string(fbs->temptruss()) +
" ";
95 msg += std::to_string(fbs->tempcell()) +
" ";
97 msg +=
"tempseccell: ";
98 msg += std::to_string(fbs->tempseccell()) +
" ";
101 msg += std::to_string(fbs->tempamb()) +
" ";
104 msg += std::to_string(fbs->dewpoint()) +
" ";
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.
constexpr static 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 double &tempout, const double &pressure, const double &humidity, const double &wind, const double &winddir, const double &temptruss, const double &tempcell, const double &tempseccell, const double &tempamb, const double &dewpoint)
Construct from components.
Log entry recording the build-time git state.
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 const flatlogs::eventCodeT eventCode
The event code.
static const flatlogs::logPrioT defaultLevel
The default level.