ChimeraTK-DeviceAccess-TangoBackend 00.01.02
Loading...
Searching...
No Matches
TangoServerLauncher.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Deutsches Elektronen-Synchrotron DESY, MSK, ChimeraTK Project <chimeratk-support@desy.de>
2// SPDX-License-Identifier: LGPL-3.0-or-later
3#pragma once
4
5#include <tango/tango.h>
6
7#include <boost/process.hpp>
8
9#include <string>
10#include <vector>
11
13 explicit TangoServerLauncher(std::string setTestName = "Unified", bool setVerbose = false);
15
16 /*std::string t the Tango server
17 *
18 * The code makes sure that the server should be started enough that a proxy can connect to it
19 * The fixture will then wait for the server to go into state "ON"
20 */
21 void start();
22
26 void stop();
27
32 static std::string port();
33
38 [[nodiscard]] std::string getClientUrl() const;
39
44 [[nodiscard]] const std::string& device() const;
45
51 TangoServerLauncher& setOfflineDatabase(const std::string& basePath);
52
54
56
57 TangoServerLauncher& overrideNames(const std::string& newNames);
58
59 std::string testName;
60 std::string offlineDatabase;
63 bool verbose{false};
64 std::vector<std::string> argv;
65
66 boost::process::child tangoServerProcess;
67
68 std::string deviceString;
69 Tango::Util* tg{nullptr};
71 static TangoServerLauncher& instance() { return *self; }
72 std::shared_ptr<Tango::DeviceProxy> remoteProxy;
73};
boost::process::child tangoServerProcess
std::vector< std::string > argv
std::string getClientUrl() const
An URL that can be used by the Tango::DeviceProxy to connect to this server.
const std::string & device() const
The Tango device name.
TangoServerLauncher & setCreateOfflineDatabase(bool create)
TangoServerLauncher & overrideNames(const std::string &newNames)
void stop()
Shut down the Tango server.
static TangoServerLauncher * self
TangoServerLauncher & setKeepOfflineDatabase(bool keep)
std::shared_ptr< Tango::DeviceProxy > remoteProxy
static TangoServerLauncher & instance()
static std::string port()
Get the port used for CORBA commuication.
TangoServerLauncher & setOfflineDatabase(const std::string &basePath)
Configure the Tango server to run against an offline database.