10#ifndef logger_types_telem_sparkleclock_hpp
11#define logger_types_telem_sparkleclock_hpp
42 const float & interval,
72 static_cast<void>(len);
76 std::string msg =
"[sparkleclock] ";
78 if(!fbs->modulating())
80 msg +=
"not modulating";
87 msg +=
" by trigger ";
92 msg += std::to_string(fbs->frequency());
97 for(flatbuffers::Vector<float>::const_iterator it = fbs->separations()->begin(); it != fbs->separations()->end(); ++it)
99 msg+= std::to_string(*it);
102 msg +=
"angle offset: ";
103 msg += std::to_string(fbs->angleOffset());
105 msg += std::to_string(fbs->amplitude());
114 return fbs->modulating();
120 return fbs->trigger();
126 return fbs->frequency();
131 std::vector<float> v;
135 for(flatbuffers::Vector<float>::const_iterator it = fbs->separations()->begin(); it != fbs->separations()->end(); ++it)
146 return fbs->angleOffset();
151 return fbs->amplitude();
169 std::cerr <<
"No member " << member <<
" in telem_sparkleclock\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_DMSPECK
inline ::flatbuffers::Offset< Telem_sparkleclock_fb > CreateTelem_sparkleclock_fb(::flatbuffers::FlatBufferBuilder &_fbb, bool modulating=false, bool trigger=false, float frequency=0.0f, float interval=0.0f, ::flatbuffers::Offset<::flatbuffers::Vector< float > > separations=0, float angleOffset=0.0f, float amplitude=0.0f)
bool VerifyTelem_sparkleclock_fbBuffer(::flatbuffers::Verifier &verifier)
const MagAOX::logger::Telem_sparkleclock_fb * GetTelem_sparkleclock_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 bool &modulating, const bool &trigger, const float &frequency, const float &interval, const std::vector< float > &separations, const float &angleOffset, const float &litude)
Construct from components.
Log entry recording sparkle clock status.
static bool trigger(void *msgBuffer)
static bool modulating(void *msgBuffer)
static logMetaDetail getAccessor(const std::string &member)
Get the logMetaDetail for a member by name.
static std::vector< float > separations(void *msgBuffer)
static float frequency(void *msgBuffer)
static const flatlogs::eventCodeT eventCode
The event code.
static float amplitude(void *msgBuffer)
static std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
Get the message formatte for human consumption.
static timespec lastRecord
The timestamp of the last time this log was recorded. Used by the telemetry system.
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)
static float angleOffset(void *msgBuffer)
static const flatlogs::logPrioT defaultLevel
The default level.