8#ifndef logger_types_telem_tcsi_offload_hpp
9#define logger_types_telem_tcsi_offload_hpp
36 static_cast<void>( len );
40 std::string msg =
"[";
45 msg += std::to_string( fbs->enabled() );
47 msg += std::to_string( fbs->avgInt() );
49 msg += std::to_string( fbs->gain() );
51 msg += std::to_string( fbs->thresh() );
77 static_cast<size_t>( len ) );
93 return fbs->enabled();
97 static float gain(
void *msgBuffer )
107 return fbs->avgInt();
114 return fbs->thresh();
124 if( member ==
"enabled" )
129 reinterpret_cast<void *
>( &
enabled ) } );
131 else if( member ==
"avgInt" )
136 reinterpret_cast<void *
>( &
avgInt ) } );
138 else if( member ==
"gain" )
143 else if( member ==
"thresh" )
148 reinterpret_cast<void *
>( &
thresh ) } );
152 std::cerr <<
"No member " << member <<
" in telem_tcsi_offload\n";
The MagAO-X logger flatbuffer log base type.
msgLen2T msgLenT
The type used to refer to the message length, regardless of length.
static void * messageBuffer(bufferPtrT &logBuffer)
Get the message buffer address.
std::shared_ptr< char > bufferPtrT
The log entry buffer smart pointer.
bool VerifyTelem_tcsi_offload_fbBuffer(::flatbuffers::Verifier &verifier)
inline ::flatbuffers::Offset< Telem_tcsi_offload_fb > CreateTelem_tcsi_offload_fb(::flatbuffers::FlatBufferBuilder &_fbb, bool enabled=false, float avgInt=0.0f, float gain=0.0f, float thresh=0.0f)
const MagAOX::logger::Telem_tcsi_offload_fb * GetTelem_tcsi_offload_fb(const void *buf)
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 bool &enabled, const float &avgInt, const float &gain, const float &thresh)
Construct from components.
Shared base class for tcsInterface offload-control telemetry.
static float gain(void *msgBuffer)
Access the offload gain.
static float thresh(void *msgBuffer)
Access the offload threshold.
static float avgInt(void *msgBuffer)
Access the offload averaging interval.
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
static std::string formatMsgString(const char *label, void *msgBuffer, flatlogs::msgLenT len)
Format a shared offload-control message body with a caller-supplied label.
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)
static bool enabled(void *msgBuffer)
Access the enabled state.
static std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
Format the message for human consumption.