8#ifndef logger_types_telem_poltrack_hpp
9#define logger_types_telem_poltrack_hpp
55 static_cast<size_t>( len ) );
64 static_cast<void>( len );
68 std::string msg =
"[poltrack] ";
71 msg += std::to_string( fbs->set_angle() ) +
" ";
74 msg += std::to_string( fbs->actual_angle() ) +
" ";
77 if ( fbs->pos_name() )
79 msg += std::string(fbs->pos_name()->c_str()) +
" ";
85 msg +=
"SYNCHRO_ADI ";
98 return fbs->set_angle();
104 return fbs->actual_angle();
112 return std::string(fbs->pos_name()->c_str());
114 else return std::string();
120 return fbs->tracking();
131 if( member ==
"set_angle" )
136 reinterpret_cast<void *
>( &
set_angle ) } );
138 else if( member ==
"actual_angle" )
145 else if( member ==
"pos_name" )
150 reinterpret_cast<void *
>( &
pos_name ) } );
152 else if( member ==
"tracking" )
157 reinterpret_cast<void *
>( &
tracking ) } );
161 std::cerr <<
"No member " << member <<
" in telem_poltrack\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_POLTRACK
inline ::flatbuffers::Offset< Telem_poltrack_fb > CreateTelem_poltrack_fb(::flatbuffers::FlatBufferBuilder &_fbb, float set_angle=0.0f, float actual_angle=0.0f, ::flatbuffers::Offset<::flatbuffers::String > pos_name=0, bool tracking=false)
const MagAOX::logger::Telem_poltrack_fb * GetTelem_poltrack_fb(const void *buf)
bool VerifyTelem_poltrack_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.
The type of the input message.
messageT(const float &set_angle, const float &actual_angle, const std::string &pos_name, const bool &tracking)
Construct from components.
Log entry recording poltrack stage specific status.
static std::string pos_name(void *msgBuffer)
static float set_angle(void *msgBuffer)
static std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
Get the message formatte for human consumption.
static bool tracking(void *msgBuffer)
static const flatlogs::eventCodeT eventCode
The event code.
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
static timespec lastRecord
The timestamp of the last time this log was recorded. Used by the telemetry system.
static float actual_angle(void *msgBuffer)
static const flatlogs::logPrioT defaultLevel
The default level.