16#include <milkzmqServer.hpp>
20#include "../../libMagAOX/libMagAOX.hpp"
21#include "../../magaox_git_version.h"
129 const std::string & file,
156 config.add(
"server.imagePort",
"",
"server.imagePort", argType::Required,
"server",
"imagePort",
false,
"int",
"");
158 config.add(
"server.shmimNames",
"",
"server.shmimNames", argType::Required,
"server",
"shmimNames",
false,
"string",
"");
160 config.add(
"server.usecSleep",
"",
"server.usecSleep", argType::Required,
"server",
"usecSleep",
false,
"int",
"");
162 config.add(
"server.fpsTgt",
"",
"server.fpsTgt", argType::Required,
"server",
"fpsTgt",
false,
"float",
"");
164 config.add(
"server.fpsGain",
"",
"server.fpsGain", argType::Required,
"server",
"fpsGain",
false,
"float",
"");
166 config.add(
"server.compress",
"",
"server.compress", argType::Required,
"server",
"compress",
false,
"bool",
"Flag to turn on compression for INT16 and UINT16.");
191#include <sys/syscall.h>
301 std::string
logss =
"Setting handler for SIGSEGV failed. Errno says: ";
312 std::string
logss =
"Setting handler for SIGBUS failed. Errno says: ";
340 static_cast<void>(
signum);
341 static_cast<void>(
siginf);
342 static_cast<void>(
ucont);
344 milkzmqServer::m_restart =
true;
369 const std::string & file,
The base-class for MagAO-X applications.
std::string m_configName
The name of the configuration file (minus .conf).
static int log(const typename logT::messageT &msg, logPrioT level=logPrio::LOG_DEFAULT)
Make a log entry.
MagAO-X application to control writing ImageStreamIO streams to a zeroMQ channel.
virtual void setupConfig()
Setup the configuration system (called by MagAOXApp::setup())
int setSigSegvHandler()
Sets the handler for SIGSEGV and SIGBUS.
virtual void loadConfig()
load the configuration system results (called by MagAOXApp::setup())
virtual int appShutdown()
Do any needed shutdown tasks. Currently nothing in this app.
virtual int appStartup()
Startup functions.
static void _handlerSigSegv(int signum, siginfo_t *siginf, void *ucont)
The handler called when SIGSEGV or SIGBUS is received, which will be due to ImageStreamIO server rese...
virtual void reportError(const std::string &msg, const std::string &file, int line)
Log an error.
virtual int appLogic()
Implementation of the FSM for the Siglent SDG.
void handlerSigSegv(int signum, siginfo_t *siginf, void *ucont)
Handles SIGSEGV and SIGBUS. Sets m_restart to true.
virtual void reportNotice(const std::string &msg)
Log status (with LOG_NOTICE level of priority).
mzmqServer()
Default c'tor.
virtual void reportInfo(const std::string &msg)
Log status (with LOG_INFO level of priority).
static mzmqServer * m_selfWriter
Static pointer to this (set in constructor). Used for getting out of the static SIGSEGV handler.
std::vector< std::string > m_shMemImNames
~mzmqServer() noexcept
Destructor.
virtual void reportWarning(const std::string &msg)
Log a warning.
static constexpr logPrioT LOG_NOTICE
A normal but significant condition.
static constexpr logPrioT LOG_INFO
Informational. The info log level is the lowest level recorded during normal operations.
static constexpr logPrioT LOG_WARNING
A condition has occurred which may become an error, but the process continues.
static constexpr logPrioT LOG_DEBUG
Used for debugging.