8#ifndef logger_types_telem_modalgainopt_hpp
9#define logger_types_telem_modalgainopt_hpp
51 static_cast<size_t>( len ) );
57 static_cast<void>( len );
60 std::string msg =
"[modalgainopt] ";
62 msg +=
"updateAuto: ";
63 msg += ( fbs->update_auto() ?
"true" :
"false" );
64 msg +=
" opticalGainTracking: ";
65 msg += ( fbs->optical_gain_tracking() ?
"true" :
"false" );
66 msg +=
" opticalGain: ";
67 msg += std::to_string( fbs->optical_gain() );
69 msg += std::to_string( fbs->gain_gain() );
71 msg += std::to_string( fbs->gain_leak() );
103 if( member ==
"updateAuto" )
112 else if( member ==
"opticalGainTracking" )
121 else if( member ==
"opticalGain" )
130 else if( member ==
"gainGain" )
136 reinterpret_cast<void *
>( &
gainGain ),
139 else if( member ==
"gainLeak" )
145 reinterpret_cast<void *
>( &
gainLeak ),
150 std::cerr <<
"No member " << member <<
" in telem_modalgainopt\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_MODALGAINOPT
inline ::flatbuffers::Offset< Telem_modalgainopt_fb > CreateTelem_modalgainopt_fb(::flatbuffers::FlatBufferBuilder &_fbb, bool update_auto=false, bool optical_gain_tracking=false, float optical_gain=0.0f, float gain_gain=0.0f, float gain_leak=0.0f)
const MagAOX::logger::Telem_modalgainopt_fb * GetTelem_modalgainopt_fb(const void *buf)
bool VerifyTelem_modalgainopt_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.
messageT(const bool updateAuto, const bool opticalGainTracking, const float opticalGain, const float gainGain, const float gainLeak)
Log entry recording modalGainOpt control state.
static bool opticalGainTracking(void *msgBuffer)
static const flatlogs::eventCodeT eventCode
static logMetaDetail getAccessor(const std::string &member)
static const flatlogs::logPrioT defaultLevel
static float gainLeak(void *msgBuffer)
static std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)
static timespec lastRecord
The time of the last telemetry record.
static float gainGain(void *msgBuffer)
static float opticalGain(void *msgBuffer)
static bool updateAuto(void *msgBuffer)