8#ifndef logger_types_telem_offloading_hpp
9#define logger_types_telem_offloading_hpp
51 static_cast<size_t>( len ) );
60 static_cast<void>( len );
64 std::string msg =
"[offloading] ";
67 msg += std::to_string( fbs->num_modes() ) +
" ";
70 msg += std::to_string( fbs->num_average() ) +
" ";
73 msg += std::to_string( fbs->fps() ) +
" ";
81 return fbs->num_modes();
87 return fbs->num_average();
90 static float fps(
void *msgBuffer )
103 if( member ==
"num_modes" )
107 reinterpret_cast<void *
>( &
num_modes ) } );
108 else if( member ==
"num_average" )
113 else if( member ==
"fps" )
118 std::cerr <<
"No member " << member <<
" in telem_offloading\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_OFFLOADING
const MagAOX::logger::Telem_offloading_fb * GetTelem_offloading_fb(const void *buf)
bool VerifyTelem_offloading_fbBuffer(::flatbuffers::Verifier &verifier)
inline ::flatbuffers::Offset< Telem_offloading_fb > CreateTelem_offloading_fb(::flatbuffers::FlatBufferBuilder &_fbb, uint32_t num_modes=0, uint32_t num_average=0, float fps=0.0f)
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 uint32_t &num_modes, const uint32_t &num_average, const float &fps)
Construct from components.
Log entry recording the build-time git state.
static const flatlogs::eventCodeT eventCode
The event code.
static float fps(void *msgBuffer)
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
static uint32_t num_modes(void *msgBuffer)
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 uint32_t num_average(void *msgBuffer)
static const flatlogs::logPrioT defaultLevel
The default level.
static std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
Get the message formatte for human consumption.