10 #ifndef logger_types_outlet_channel_state_hpp
11 #define logger_types_outlet_channel_state_hpp
13 #include "generated/outlet_channel_state_generated.h"
40 auto _channel =
builder.CreateString(channel);
42 auto gs = CreateOutlet_channel_state_fb(
builder, _channel, state);
53 return VerifyOutlet_channel_state_fbBuffer(verifier);
62 static_cast<void>(len);
64 auto rgs = GetOutlet_channel_state_fb(msgBuffer);
69 if(rgs->channel() !=
nullptr) s << rgs->channel()->c_str() <<
" ";
70 else s <<
"????" <<
" ";
76 else if(rgs->state()==1)
80 else if(rgs->state()==0)
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_NOTICE
A normal but significant condition.
Message type for resolving log messages with a f.b. builder.
flatbuffers::FlatBufferBuilder builder
Base class for logs consisting of a flatbuffer message.
messageT(const std::string &channel, uint8_t state)
Application State Change.
static std::string msgString(void *msgBuffer, flatlogs::msgLenT len)
Format the message for text output, including translation of state codes to text form.
static const flatlogs::eventCodeT eventCode
static const flatlogs::logPrioT defaultLevel
static bool verify(flatlogs::bufferPtrT &logBuff, flatlogs::msgLenT len)