10 #ifndef logger_types_ttmmod_params_hpp
11 #define logger_types_ttmmod_params_hpp
13 #include "generated/ttmmod_params_generated.h"
39 const double & modFreq,
40 const double & modRad,
41 const double & offset1,
42 const double & offset2
45 auto fp = CreateTtmmod_params_fb(
builder, modState, modFreq, modRad, offset1, offset2);
57 return VerifyTtmmod_params_fbBuffer(verifier);
65 static_cast<void>(len);
67 auto fbs = GetTtmmod_params_fb(msgBuffer);
70 std::string
msg =
"UNK";
72 if(fbs->modState() == 0)
msg =
"OFF";
73 if(fbs->modState() == 1)
msg =
"REST";
74 if(fbs->modState() == 2)
msg =
"INT";
75 if(fbs->modState() == 3)
msg =
"SET";
76 if(fbs->modState() == 4)
81 msg += std::to_string(fbs->modFreq()) +
" Hz";
84 msg += std::to_string(fbs->modRad()) +
" lam/D";
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.
constexpr static logPrioT LOG_INFO
Informational. The info log level is the lowest level recorded during normal operations.
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 &modState, const double &modFreq, const double &modRad, const double &offset1, const double &offset2)
Construct from components.
Log entry recording the build-time git state.
static const flatlogs::eventCodeT eventCode
The event code.
static const flatlogs::logPrioT defaultLevel
The default level.
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)
static std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
Get the message formatte for human consumption.