16#include <milkzmqClient.hpp>
18#include "../../libMagAOX/libMagAOX.hpp"
19#include "../../magaox_git_version.h"
129 const std::string & file,
155 config.add(
"server.address",
"",
"server.address", argType::Required,
"server",
"address",
false,
"string",
"The server's remote address. Usually localhost if using a tunnel.");
156 config.add(
"server.imagePort",
"",
"server.imagePort", argType::Required,
"server",
"imagePort",
false,
"int",
"The server's port. Usually the port on localhost forwarded to the host.");
158 config.add(
"server.shmimNames",
"",
"server.shmimNames", argType::Required,
"server",
"shmimNames",
false,
"string",
"List of names of the remote shmim streams to get.");
171 config(m_address,
"server.address");
176 std::cerr <<
"m_imagePort = " <<
m_imagePort <<
"\n";
181#include <sys/syscall.h>
267 std::string
logss =
"Setting handler for SIGSEGV failed. Errno says: ";
278 std::string
logss =
"Setting handler for SIGBUS failed. Errno says: ";
306 static_cast<void>(
signum);
307 static_cast<void>(
siginf);
308 static_cast<void>(
ucont);
335 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 reading ImageStreamIO streams from a zeroMQ channel.
virtual int appLogic()
Implementation of the FSM for the Siglent SDG.
static mzmqClient * m_selfClient
Static pointer to this (set in constructor). Used for getting out of the static SIGSEGV handler.
virtual void reportNotice(const std::string &msg)
Log status (with LOG_NOTICE level of priority).
virtual int appShutdown()
Do any needed shutdown tasks. Currently nothing in this app.
mzmqClient()
Default c'tor.
virtual void reportWarning(const std::string &msg)
Log a warning.
void handlerSigSegv(int signum, siginfo_t *siginf, void *ucont)
Handles SIGSEGV and SIGBUS. Sets m_restart to true.
virtual void reportInfo(const std::string &msg)
Log status (with LOG_INFO level of priority).
int setSigSegvHandler()
Sets the handler for SIGSEGV and SIGBUS.
~mzmqClient() noexcept
Destructor.
virtual void setupConfig()
Setup the configuration system (called by MagAOXApp::setup())
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 int appStartup()
Startup functions.
virtual void loadConfig()
load the configuration system results (called by MagAOXApp::setup())
std::vector< std::string > m_shMemImNames
virtual void reportError(const std::string &msg, const std::string &file, int line)
Log an error.
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.