ChimeraTK-DeviceAccess
03.18.00
main.cpp
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
4
#include "
argumentParser.h
"
5
#include "
RebotDummyServer.h
"
6
7
#include <iostream>
8
9
int
main
(
int
,
char
** argv) {
10
unsigned
int
portNumber =
getPortNumber
(argv);
11
std::string mapFileLocation =
getMapFileLocation
(argv);
12
unsigned
int
protocolVersion =
getProtocolVersion
(argv);
13
14
ChimeraTK::RebotDummyServer
testServer(portNumber, mapFileLocation, protocolVersion);
15
boost::asio::signal_set signals(testServer.
service
(), SIGINT, SIGTERM);
16
signals.async_wait([&testServer](
const
boost::system::error_code& error,
int
/* signal */
) {
17
if
(not error) {
18
testServer.
stop
();
19
}
20
});
21
22
std::cout <<
"Rebot dummy server started"
<< std::endl;
23
std::cout <<
"PORT "
<< testServer.
port
() << std::endl;
24
testServer.
start
();
25
std::cout <<
"Rebot dummy server stopped"
<< std::endl;
26
27
return
0;
28
}
RebotDummyServer.h
main
int main(int, char **argv)
Definition:
main.cpp:9
ChimeraTK::RebotDummyServer::port
unsigned int port() const
Definition:
RebotDummyServer.h:89
ChimeraTK::getProtocolVersion
uint32_t getProtocolVersion(boost::shared_ptr< Rebot::Connection > &c)
Definition:
RebotBackend.cc:36
ChimeraTK::RebotDummyServer
Definition:
RebotDummyServer.h:82
argumentParser.h
getPortNumber
unsigned int getPortNumber(char **)
Definition:
argumentParser.cc:23
ChimeraTK::RebotDummyServer::service
boost::asio::io_service & service()
Definition:
RebotDummyServer.h:91
ChimeraTK::RebotDummyServer::stop
void stop()
Definition:
RebotDummyServer.cc:207
getMapFileLocation
std::string getMapFileLocation(char **)
Definition:
argumentParser.cc:34
ChimeraTK::RebotDummyServer::start
void start()
Definition:
RebotDummyServer.cc:202
sources
ChimeraTK-DeviceAccess
tests
RebotDummyServer
main.cpp
Generated by
1.8.17