8 #ifndef logger_types_telem_pi335_hpp
9 #define logger_types_telem_pi335_hpp
11 #include "generated/telem_pi335_generated.h"
57 return VerifyTelem_pi335_fbBuffer(verifier);
65 static_cast<void>(len);
67 auto fbs = GetTelem_pi335_fb(msgBuffer);
69 std::string
msg =
"[pi335] ";
72 msg += std::to_string(fbs->pos1Set()) +
" ";
75 msg += std::to_string(fbs->pos1()) +
" ";
78 msg += std::to_string(fbs->sva1()) +
" ";
81 msg += std::to_string(fbs->pos2Set()) +
" ";
84 msg += std::to_string(fbs->pos2()) +
" ";
87 msg += std::to_string(fbs->sva2()) +
" ";
90 msg += std::to_string(fbs->pos3Set()) +
" ";
93 msg += std::to_string(fbs->pos3()) +
" ";
96 msg += std::to_string(fbs->sva3());
103 auto fbs = GetTelem_pi335_fb(msgBuffer);
104 return fbs->pos1Set();
107 static float pos1(
void *msgBuffer)
109 auto fbs = GetTelem_pi335_fb(msgBuffer);
113 static float sva1(
void *msgBuffer)
115 auto fbs = GetTelem_pi335_fb(msgBuffer);
121 auto fbs = GetTelem_pi335_fb(msgBuffer);
122 return fbs->pos2Set();
125 static float pos2(
void *msgBuffer)
127 auto fbs = GetTelem_pi335_fb(msgBuffer);
131 static float sva2(
void *msgBuffer)
133 auto fbs = GetTelem_pi335_fb(msgBuffer);
139 auto fbs = GetTelem_pi335_fb(msgBuffer);
140 return fbs->pos3Set();
143 static float pos3(
void *msgBuffer)
145 auto fbs = GetTelem_pi335_fb(msgBuffer);
149 static float sva3(
void *msgBuffer)
151 auto fbs = GetTelem_pi335_fb(msgBuffer);
162 if (member ==
"pos1Set")
163 return logMetaDetail({
"POS1 SETPT", logMeta::valTypes::Float, logMeta::metaTypes::Continuous,
reinterpret_cast<void *
>(&
pos1Set)});
164 else if (member ==
"pos1")
165 return logMetaDetail({
"POS1", logMeta::valTypes::Float, logMeta::metaTypes::Continuous,
reinterpret_cast<void *
>(&
pos1)});
166 else if (member ==
"sva1")
167 return logMetaDetail({
"SVA1", logMeta::valTypes::Float, logMeta::metaTypes::Continuous,
reinterpret_cast<void *
>(&
sva1)});
168 else if (member ==
"pos2Set")
169 return logMetaDetail({
"POS2 SETPT", logMeta::valTypes::Float, logMeta::metaTypes::Continuous,
reinterpret_cast<void *
>(&
pos2Set)});
170 else if (member ==
"pos2")
171 return logMetaDetail({
"POS2", logMeta::valTypes::Float, logMeta::metaTypes::Continuous,
reinterpret_cast<void *
>(&
pos2)});
172 else if (member ==
"sva2")
173 return logMetaDetail({
"SVA2", logMeta::valTypes::Float, logMeta::metaTypes::Continuous,
reinterpret_cast<void *
>(&
sva2)});
174 else if (member ==
"pos3Set")
175 return logMetaDetail({
"POS3 SETPT", logMeta::valTypes::Float, logMeta::metaTypes::Continuous,
reinterpret_cast<void *
>(&
pos3Set)});
176 else if (member ==
"pos3")
177 return logMetaDetail({
"POS3", logMeta::valTypes::Float, logMeta::metaTypes::Continuous,
reinterpret_cast<void *
>(&
pos3)});
178 else if (member ==
"sva3")
179 return logMetaDetail({
"SVA3", logMeta::valTypes::Float, logMeta::metaTypes::Continuous,
reinterpret_cast<void *
>(&
sva3)});
182 std::cerr <<
"No string member " << member <<
" in telem_pi335\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.
constexpr static 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 &pos1Set, const float &pos1, const float &sva1, const float &pos2Set, const float &pos2, const float &sva2, const float &pos3Set, const float &pos3, const float &sva3)
Construct from components.
Log entry recording the build-time git state.
static float pos3Set(void *msgBuffer)
static float sva3(void *msgBuffer)
static const flatlogs::eventCodeT eventCode
The event code.
static float pos2(void *msgBuffer)
static float pos3(void *msgBuffer)
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)
static float pos1(void *msgBuffer)
static std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
Get the message formatte for human consumption.
static timespec lastRecord
The time of the last time this log was recorded. Used by the telemetry system.
static float pos1Set(void *msgBuffer)
static float pos2Set(void *msgBuffer)
static const flatlogs::logPrioT defaultLevel
The default level.
static logMetaDetail getAccessor(const std::string &member)
Get pointer to the accessor for a member by name.
static float sva1(void *msgBuffer)
static float sva2(void *msgBuffer)