MotionLib  1.0.0
SamBuCa motion library
Server.hpp
1 /*
2 ** Copyright (C) 2022 CERN
3 **
4 ** This software is provided 'as-is', without any express or implied
5 ** warranty. In no event will the authors be held liable for any damages
6 ** arising from the use of this software.
7 **
8 ** Permission is granted to anyone to use this software for any purpose,
9 ** including commercial applications, and to alter it and redistribute it
10 ** freely, subject to the following restrictions:
11 **
12 ** 1. The origin of this software must not be misrepresented; you must not
13 ** claim that you wrote the original software. If you use this software
14 ** in a product, an acknowledgment in the product documentation would be
15 ** appreciated but is not required.
16 ** 2. Altered source versions must be plainly marked as such, and must not be
17 ** misrepresented as being the original software.
18 ** 3. This notice may not be removed or altered from any source distribution.
19 **
20 ** Created on: 2022-07-08T14:13:17
21 ** Author: Sylvain Fargier <sylvain.fargier@cern.ch>
22 */
23 
24 #ifndef SERVER_HPP__
25 #define SERVER_HPP__
26 
27 #include <memory>
28 
29 namespace smc {
30 
31 class MotionController;
32 
33 namespace debug {
34 
35 class ServerData;
36 class Environment;
37 
38 class Server
39 {
40 public:
41  Server();
42  ~Server();
43 
49  void connect(const MotionController &controller);
50 
54  void disconnect();
55 
56  void start();
57  void stop();
58  void run();
59 
60 protected:
61  void init();
62 
63  std::unique_ptr<ServerData> m_data;
64  std::shared_ptr<Environment> m_env;
65 };
66 
67 } // namespace debug
68 } // namespace smc
69 
70 #endif
void connect(const MotionController &controller)
(re)connect the debug server
Definition: Server.cpp:325
void disconnect()
disconnect the debug server
main motion-lib namespace
Definition: Client.cpp:30