10#ifndef logger_types_telem_chrony_status_hpp 
   11#define logger_types_telem_chrony_status_hpp 
   42                const std::string & ip,   
 
   43                const std::string & sync, 
 
   44                const std::string & 
leap   
   47         auto _mac = 
builder.CreateString(mac);
 
   48         auto _ip = 
builder.CreateString(ip);
 
   49         auto _sync = 
builder.CreateString(sync);
 
 
 
   71      static_cast<void>(len);
 
   75      std::string msg = 
"[chrony_status] ";
 
   80         msg += fbs->sourceMAC()->c_str();
 
   86         msg += fbs->sourceIP()->c_str();
 
   92         msg += fbs->synch()->c_str();
 
   98         msg += fbs->leap()->c_str();
 
 
  108      if(fbs->sourceMAC()) 
return std::string(fbs->sourceMAC()->c_str());
 
 
  115      if(fbs->sourceIP()) 
return std::string(fbs->sourceIP()->c_str());
 
 
  119   static std::string 
synch(
void * msgBuffer )
 
  122      if(fbs->synch()) 
return std::string(fbs->synch()->c_str());
 
 
  126   static std::string 
leap(
void * msgBuffer )
 
  129      if(fbs->leap()) 
return std::string(fbs->leap()->c_str());
 
 
  146         std::cerr << 
"No member " << member << 
" in telem_chrony_status\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_CHRONY_STATUS
bool VerifyTelem_chrony_status_fbBuffer(::flatbuffers::Verifier &verifier)
inline ::flatbuffers::Offset< Telem_chrony_status_fb > CreateTelem_chrony_status_fb(::flatbuffers::FlatBufferBuilder &_fbb, ::flatbuffers::Offset<::flatbuffers::String > sourceMAC=0, ::flatbuffers::Offset<::flatbuffers::String > sourceIP=0, ::flatbuffers::Offset<::flatbuffers::String > synch=0, ::flatbuffers::Offset<::flatbuffers::String > leap=0)
const MagAOX::logger::Telem_chrony_status_fb * GetTelem_chrony_status_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 std::string &mac, const std::string &ip, const std::string &sync, const std::string &leap)
Construct from components.
Log entry recording the status of chrony.
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)
static std::string leap(void *msgBuffer)
static timespec lastRecord
The time of the last time this log was recorded. Used by the telemetry system.
static const flatlogs::logPrioT defaultLevel
The default level.
static const flatlogs::eventCodeT eventCode
The event code.
static std::string sourceIP(void *msgBuffer)
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
static std::string synch(void *msgBuffer)
static std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
Get the message formatte for human consumption.
static std::string sourceMAC(void *msgBuffer)