10 #ifndef logger_types_telem_drivetemps_hpp
11 #define logger_types_telem_drivetemps_hpp
13 #include "generated/telem_drivetemps_generated.h"
38 std::vector<float> & temps )
41 auto _namesVec =
builder.CreateVectorOfStrings(names);
42 auto _tempsVec =
builder.CreateVector(temps);
44 auto fp = CreateTelem_drivetemps_fb(
builder, _namesVec, _tempsVec );
57 return VerifyTelem_drivetemps_fbBuffer(verifier);
66 static_cast<void>(len);
68 auto rgs = GetTelem_drivetemps_fb(msgBuffer);
72 if(rgs->diskName() !=
nullptr && rgs->diskTemp() !=
nullptr)
77 for(flatbuffers::Vector<float>::const_iterator
it = rgs->diskTemp()->begin();
it != rgs->diskTemp()->end(); ++
it, ++i)
79 msg += rgs->diskName()->GetAsString(i)->c_str();
81 msg+= std::to_string(*
it);
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(std::vector< std::string > &names, std::vector< float > &temps)
Construct from components.
Log entry recording hdd temperatures.
static timespec lastRecord
The time of the last time this log was recorded. Used by the telemetry system.
static std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
Get the message formatted for human consumption.
static const flatlogs::eventCodeT eventCode
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)
static const flatlogs::logPrioT defaultLevel