7#ifndef logger_types_telem_psfacq_hpp
8#define logger_types_telem_psfacq_hpp
53 static_cast<size_t>( len ) );
61 static_cast<void>( len );
65 std::string msg =
"[psfAcq] ";
66 msg +=
"star_no: " + std::to_string( fbs->star_no() ) +
"/" + std::to_string( fbs->num_stars() ) +
" ";
67 msg +=
"x_pos: " + std::to_string( fbs->x_pos() ) +
" ";
68 msg +=
"y_pos: " + std::to_string( fbs->y_pos() ) +
" ";
69 msg +=
"m_pix: " + std::to_string( fbs->m_pix() ) +
" ";
70 msg +=
"fwhm: " + std::to_string( fbs->fwhm() ) +
" ";
71 msg +=
"seeing: " + std::to_string( fbs->seeing() ) +
" ";
80 return fbs->star_no();
87 return fbs->num_stars();
90 static float x_pos(
void *msgBuffer )
96 static float y_pos(
void *msgBuffer )
102 static float m_pix(
void *msgBuffer )
108 static float fwhm(
void *msgBuffer )
117 return fbs->seeing();
127 if( member ==
"star_no" )
131 else if( member ==
"num_stars" )
135 else if( member ==
"x_pos" )
139 else if( member ==
"y_pos" )
143 else if( member ==
"m_pix" )
147 else if( member ==
"fwhm" )
151 else if( member ==
"seeing" )
157 std::cerr <<
"No member " << member <<
" in telem_psfacq\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_PSFACQ
bool VerifyTelem_psfacq_fbBuffer(::flatbuffers::Verifier &verifier)
inline ::flatbuffers::Offset< Telem_psfacq_fb > CreateTelem_psfacq_fb(::flatbuffers::FlatBufferBuilder &_fbb, float x_pos=0.0f, float y_pos=0.0f, float m_pix=0.0f, float fwhm=0.0f, float seeing=0.0f, int32_t star_no=0, int32_t num_stars=0)
const MagAOX::logger::Telem_psfacq_fb * GetTelem_psfacq_fb(const void *buf)
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 int &star_no, const int &num_stars, const float &x_pos, const float &y_pos, const float &m_pix, const float &fwhm, const float &seeing)
Construct from components.
Log entry recording psf acquisition per-star properties.
static float m_pix(void *msgBuffer)
static float x_pos(void *msgBuffer)
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
static int star_no(void *msgBuffer)
Get the one-based star index.
static int num_stars(void *msgBuffer)
Get the total number of stars emitted this cycle.
static const flatlogs::eventCodeT eventCode
The event code.
static float seeing(void *msgBuffer)
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)
static const flatlogs::logPrioT defaultLevel
The default level.
static float y_pos(void *msgBuffer)
static timespec lastRecord
The timestamp of the last time this log was recorded. Used by telemetry.
static std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
Get the message format for human consumption.
static float fwhm(void *msgBuffer)