19 #include <system_error>
21 #include <sys/types.h>
29 #define TEST_TCP_PORT 17624
30 #define TEST_UNIX_SOCKET "/tmp/indi-test-server"
31 #define TEST_INDI_FIFO "/tmp/indi-test-fifo"
32 #define STRINGIFY_TOK(x) #x
33 #define TO_STRING(x) STRINGIFY_TOK(x)
56 #ifdef ENABLE_INDI_SHARED_MEMORY
64 throw std::system_error(
errno, std::generic_category(),
"mkfifo");
76 throw new std::runtime_error(
"Fifo is not enabled - cannot add driver");
81 throw std::system_error(
errno, std::generic_category(),
"opening fifo");
84 std::string
cmd =
"start " + driver +
"\n";
85 int wr = write(fifoFd,
cmd.data(),
cmd.length());
89 throw std::system_error(e, std::generic_category(),
"write to fifo");
void addDriver(const std::string &path)
void start(const std::vector< std::string > &args)
void setFifo(bool enable)
std::string getUnixSocketPath() const
void startDriver(const std::string &driver)
void start(const std::string &path, const std::vector< std::string > &args)