11#ifndef logger_types_telem_coreloads_hpp
12#define logger_types_telem_coreloads_hpp
38 messageT( std::vector<float> & cpu_core_loads )
41 auto _coreLoadsVec =
builder.CreateVector(cpu_core_loads);
65 static_cast<void>(len);
71 if (rgs->loads() !=
nullptr)
74 for(flatbuffers::Vector<float>::const_iterator it = rgs->loads()->begin(); it != rgs->loads()->end(); ++it)
76 msg+= std::to_string(*it);
93 static_cast<void>(member);
94 std::cerr <<
"Meta data accessor not implemented in telem_coreloads\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_CORELOADS
inline ::flatbuffers::Offset< Telem_coreloads_fb > CreateTelem_coreloads_fb(::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset<::flatbuffers::Vector< float > > loads=0)
const MagAOX::logger::Telem_coreloads_fb * GetTelem_coreloads_fb(const void *buf)
bool VerifyTelem_coreloads_fbBuffer(::flatbuffers::Verifier &verifier)
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(std::vector< float > &cpu_core_loads)
Construct from components.
Log entry recording CPU loads.
static const flatlogs::logPrioT defaultLevel
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 std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
Get the message formatte for human consumption.
static const flatlogs::eventCodeT eventCode
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)