10#ifndef logger_types_telem_stage_hpp 
   11#define logger_types_telem_stage_hpp 
   65      static_cast<void>(len);
 
   69      std::string msg = 
"[stage] ";
 
   72      if(fbs->moving() == -2) msg += 
" OFF ";
 
   73      else if(fbs->moving() == -1) msg += 
" NOTHOMED ";
 
   74      else if(fbs->moving() == 0) msg += 
" STOPPED ";
 
   75      else if(fbs->moving() == 1) msg += 
" MOVING ";
 
   76      else if(fbs->moving() == 2) msg += 
" HOMING ";
 
   79      msg += std::to_string(fbs->preset()) + 
" ";
 
   84         msg += fbs->presetName()->c_str();
 
 
   91   static int moving( 
void * msgBuffer )
 
 
   97   static float preset( 
void * msgBuffer )
 
  100      return fbs->preset();
 
 
  106      if(fbs->presetName())
 
  108         return std::string(fbs->presetName()->c_str());
 
  110      else return std::string();
 
 
  125         std::cerr << 
"No member " << member << 
" in telem_stage\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_STAGE
 
bool VerifyTelem_stage_fbBuffer(::flatbuffers::Verifier &verifier)
 
inline ::flatbuffers::Offset< Telem_stage_fb > CreateTelem_stage_fb(::flatbuffers::FlatBufferBuilder &_fbb, int8_t moving=0, float preset=0.0f, ::flatbuffers::Offset<::flatbuffers::String > presetName=0)
 
const MagAOX::logger::Telem_stage_fb * GetTelem_stage_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 int8_t &moving, const float &preset, const std::string &presetName)
Construct from components.
 
Log entry recording stdMotionStage status.
 
static const flatlogs::logPrioT defaultLevel
The default level.
 
static float preset(void *msgBuffer)
 
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
 
static std::string presetName(void *msgBuffer)
 
static timespec lastRecord
The timestamp of the last time this log was recorded. Used by the telemetry system.
 
static const flatlogs::eventCodeT eventCode
The event code.
 
static std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
Get the message formatte for human consumption.
 
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)
 
static int moving(void *msgBuffer)