10#ifndef logger_types_telem_loopgain_hpp
11#define logger_types_telem_loopgain_hpp
54 static_cast<size_t>( len ) );
63 static_cast<void>( len );
67 std::string msg =
"[loopgain] ";
70 msg += std::to_string( fbs->state() ) +
" ";
73 msg += std::to_string( fbs->gain() ) +
" ";
76 msg += std::to_string( fbs->multcoef() ) +
" ";
79 msg += std::to_string( fbs->limit() );
84 static uint8_t
state(
void *msgBuffer )
90 static float gain(
void *msgBuffer )
99 return fbs->multcoef();
102 static float limit(
void *msgBuffer )
115 if( member ==
"state" )
119 reinterpret_cast<void *
>( &
state ) } );
120 else if( member ==
"gain" )
124 reinterpret_cast<void *
>( &
gain ) } );
125 else if( member ==
"multcoef" )
129 reinterpret_cast<void *
>( &
multcoef ) } );
130 else if( member ==
"limit" )
134 reinterpret_cast<void *
>( &
limit ) } );
137 std::cerr <<
"No member " << member <<
" in telem_loopgain\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_LOOPGAIN
const MagAOX::logger::Telem_loopgain_fb * GetTelem_loopgain_fb(const void *buf)
bool VerifyTelem_loopgain_fbBuffer(::flatbuffers::Verifier &verifier)
inline ::flatbuffers::Offset< Telem_loopgain_fb > CreateTelem_loopgain_fb(::flatbuffers::FlatBufferBuilder &_fbb, uint8_t state=0, float gain=0.0f, float multcoef=0.0f, float limit=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 uint8_t &state, const float &gain, const float &multcoef, const float &limit)
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 float multcoef(void *msgBuffer)
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)
static const flatlogs::eventCodeT eventCode
The event code.
static float limit(void *msgBuffer)
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
static const flatlogs::logPrioT defaultLevel
The default level.
static uint8_t state(void *msgBuffer)
static timespec lastRecord
The time of the last time this log was recorded. Used by the telemetry system.
static float gain(void *msgBuffer)