Projekt

Allgemein

Profil

Wiki » README.md

Maximilian Seesslen, 02.08.2024 18:20

 
1
# CANServer
2

    
3
## Intro
4

    
5
CANServer is an Server-Client library that provides multiple applications access to an CAN-Bus via TCP/IP.
6
Every message received via CAN gets send to all clients. When an client sends an message, it is send 
7
via CAN-Bus and also to the other clients.
8
The physical CAN-Bus is optional.
9

    
10
## Usecases
11

    
12
- Graphical user interface for home automatisation
13

    
14
    An laptop/tablet can be connected to an server via WLAN
15

    
16
- Recording/Replay
17

    
18
    An PC-Application could record CAN messages and replay them.
19

    
20
- Debugging
21

    
22
    Show CAN traffic while interacting with the bus with other devices.
23

    
24
- WLAN CAN-Bridge
25

    
26
    Two CAN segments can be connected via WLAN
27

    
28
## Architecture
29

    
30
<div style="border: 2px solid #00A4BD; padding: 10px; box-shadow: 6px 4px 8px;">
31
```
32
        Server                 TCP       Client
33

    
34
        List<                   /-----> connectionTcp
35
            connectionCan       |
36
            connectionTcp       |
37
            connectionTcp <-----/
38
            connectionTcp
39
        >
40
```
41
</div>
42

    
43
Each connection has an id which is an ongoing number handled by the server.
44

    
45
## Terminal Output
46

    
47
The server prints a dynamic list with the connections and traffic statistics.
48

    
49
- ID/Type
50
- Connection uptime
51
* in/out messag count
52
* in msg/s
53

    
54
Example:
55
<div style="border: 2px solid #00A4BD; padding: 10px; box-shadow: 6px 4px 8px;">
56
```
57
Id Target        Uptime   In   Out   In/s
58
-----------------------------------------
59
0: CAN           0:10s    12   55    0
60
1: Server        0:10s    3    51    0
61
2: Client        0:05s    43   52    0
62
3: Client        0:01s    1    57    0
63
```
64
</div>
(2-2/3)