8#ifndef logger_types_telem_pokeloop_hpp
9#define logger_types_telem_pokeloop_hpp
47 auto fb = telem_pokeloop_builder.
Finish();
71 static_cast<void>(len);
76 if(fbs->measuring() == 0)
78 msg =
"[pokeloop] not measuring";
82 msg =
"[pokeloop] X: ";
84 msg += std::to_string(fbs->deltaX());
86 msg += std::to_string(fbs->deltaY());
89 msg += std::to_string(fbs->counter());
98 return fbs->measuring();
104 return fbs->deltaX();
109 return fbs->deltaY();
112 static unsigned long long counter(
void * msgBuffer )
115 return fbs->counter();
131 std::cerr <<
"No member " << member <<
" in telem_pokeloop\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_POKELOOP
bool VerifyTelem_pokeloop_fbBuffer(::flatbuffers::Verifier &verifier)
inline ::flatbuffers::Offset< Telem_pokeloop_fb > CreateTelem_pokeloop_fb(::flatbuffers::FlatBufferBuilder &_fbb, uint8_t measuring=0, float deltaX=0.0f, float deltaY=0.0f, uint64_t counter=0)
const MagAOX::logger::Telem_pokeloop_fb * GetTelem_pokeloop_fb(const void *buf)
static constexpr logPrioT LOG_TELEM
A telemetry recording.
::flatbuffers::Offset< Telem_pokeloop_fb > Finish()
void add_measuring(uint8_t measuring)
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 uint8_t &measuring, const float &deltaX, const float &deltaY, const uint64_t &counter)
Construct from components.
Log entry recording DM poke centering results.
static const flatlogs::logPrioT defaultLevel
The default level.
static std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
Get the message formatted for human consumption.
static float deltaX(void *msgBuffer)
static unsigned long long counter(void *msgBuffer)
static float deltaY(void *msgBuffer)
static const flatlogs::eventCodeT eventCode
The event code.
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)
static bool measuring(void *msgBuffer)
static timespec lastRecord
The time of the last time this log was recorded. Used by the telemetry system.