Wiki » Historie » Version 7
Maximilian Seesslen, 15.08.2024 15:39
1 | 3 | Maximilian Seesslen | h1. CANServer |
---|---|---|---|
2 | |||
3 | h2. 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 | - CAN over ethernet |
||
13 | - Graphical user interface for home automatisation |
||
14 | An laptop/tablet can be connected to an server via WLAN |
||
15 | - Recording/Replay |
||
16 | An PC-Application could record CAN messages and replay them. |
||
17 | - Debugging |
||
18 | Show CAN traffic while interacting with the bus with other devices. |
||
19 | - WLAN CAN-Bridge |
||
20 | Two CAN segments can be connected via WLAN |
||
21 | |||
22 | ## Architecture |
||
23 | |||
24 | 7 | Maximilian Seesslen | |
25 | <pre> |
||
26 | 3 | Maximilian Seesslen | Server TCP Client |
27 | List< /-----> connectionTcp |
||
28 | connectionCan | |
||
29 | connectionTcp | |
||
30 | connectionTcp <-----/ |
||
31 | connectionTcp |
||
32 | > |
||
33 | 7 | Maximilian Seesslen | </pre> |
34 | |||
35 | 3 | Maximilian Seesslen | Each connection has an id which is an ongoing number handled by the server. |
36 | ## Terminal Output |
||
37 | The server prints a dynamic list with the connections and traffic statistics. |
||
38 | 1 | Maximilian Seesslen | - ID/Type |
39 | - Connection uptime |
||
40 | 3 | Maximilian Seesslen | * in/out messag count |
41 | * in msg/s |
||
42 | 7 | Maximilian Seesslen | |
43 | 3 | Maximilian Seesslen | Example: |
44 | 7 | Maximilian Seesslen | |
45 | <pre> |
||
46 | 3 | Maximilian Seesslen | Id Target Uptime In Out In/s |
47 | ----------------------------------------- |
||
48 | 0: CAN 0:10s 12 55 0 |
||
49 | 1: Server 0:10s 3 51 0 |
||
50 | 2: Client 0:05s 43 52 0 |
||
51 | 3: Client 0:01s 1 57 0 |
||
52 | 7 | Maximilian Seesslen | |
53 | </pre> |
||
54 | 3 | Maximilian Seesslen | |
55 | 4 | Maximilian Seesslen | h1. Ansi |
56 | |||
57 | box(x1,y1,x2,y2) |
||
58 | hLine(x1,y1,x2) |
||
59 | vLine(x1,y1,y2) |
||
60 | |||
61 | 6 | Maximilian Seesslen | <pre> |
62 | 5 | Maximilian Seesslen | ┬ |
63 | │ |
||
64 | ┴ |
||
65 | ├──┤ |
||
66 | ┌─┐ |
||
67 | │ │ |
||
68 | └─┘ |
||
69 | 6 | Maximilian Seesslen | </pre> |
70 | 5 | Maximilian Seesslen | |
71 | QLoggingCategory::setFilterRules("*.debug=false"); |
||
72 | qSetMessagePattern("[%{time process}] %{function}: %{message}"); |
||
73 | qDebug("Happy debugging"); |
||
74 | |||
75 | 3 | Maximilian Seesslen | h1. Links |
76 | 2 | Maximilian Seesslen | |
77 | https://www.sciencebuddies.org/science-fair-projects/references/ascii-table |