Motorcortex Core  version: 2.7.6
cm_conndata.h
1 /*
2  * Developer : Alexey Zakharov (alexey.zakharov@vectioneer.com)
3  * All rights reserved. Copyright (c) 2017 VECTIONEER.
4  */
5 
6 #ifndef CM_CONNDATA_H
7 #define CM_CONNDATA_H
8 
9 #include <string>
10 
11 namespace mcx::comm {
12 
13 enum class ConnectionDir {
14  BIND_TO_LOCAL,
15  CONNECT_TO_REMOTE
16 };
17 
19  ConnectionDir direction;
20  std::string transport;
21  std::string address;
22  std::string req_port;
23  std::string pub_port;
24  std::string user_login;
25  std::string certificate;
26  unsigned int number_of_users;
27  unsigned int number_of_threads;
28 };
29 
30 inline std::string generate_url(const ConnectionData& data, const std::string& port) {
31  return data.transport + "://" + data.address + ":" + port;
32 }
33 
34 } // namespace mcx::comm
35 
36 #endif /* CM_CONNDATA_H */
37 
mcx::comm::ConnectionData
Definition: cm_conndata.h:18