Blame view

src/ConnectionConfig.h 679 Bytes
32017af3   Peter M. Groen   Setting up workin...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
  #pragma once
  
  #include <string>
  
  enum class ConnectionPort
  {
      CP_EXTERNAL,
      CP_IOBUS,
      CP_TCP
  };
  
  enum class Parity
  {
      P_ODD,
      P_EVEN,
      P_NONE
  };
  
  class ConnectionConfig
  {
  public:
      ConnectionConfig( ConnectionPort port, int baud = 115200, Parity parity = Parity::P_NONE, int dataBits = 8, int stopBits = 1 )
      {
  
      }
  
      ConnectionConfig( ConnectionPort port, const std::string &ip, int portnum, int timeOut = -1  )
      {
  
      }
  
  private:
  
      /// Serial connections
      ConnectionPort  m_serPort;
      int             m_baudRate;
      Parity          m_parity;
      int             m_dataBits;
      int             m_stopBits;
  
      /// TCP connections
  
  };