logging von mehreren seriellen Schnittstellen

OP (Firma: Torrox.de) #4614407
Lesenswert?
• ▲
▼
Moin,
ich brauchte gerade mal die Möglichkeit, binäre-Daten von mehreren 
Seriellen Schnittstelle zu loggen. Da es in C++ und Boost alles dafür 
nötige gibt, um das Plattform-Neutral zu implementieren, habe ich das 
mal gemacht und als open source auf Github gestellt: 
https://github.com/TorstenRobitzki/multi_serial_dump

Usage:
1
multi_serial_dump [options]
2
options:
3
  -h [ --help ]          produce help message
4
  -I [ --interface ] arg definition of interface
5
  -v [ --verbose ]       verbose output
6

7
interface-defintion:
8
  <name>[:(<baudrate>,<bits><parity><stop-bits>|<baudrare>|<bits><parity><stop-bits>]
9
  <name> : <device-name>[(<alias>)]
10

11
examples:
12
  multi_serial_dump --interface com1:14404,8n1
13
  multi_serial_dump -I /dev/cu.1233(com2):14404,7o1.5
14
  multi_serial_dump -I com1 -I com2


build:
1
mkdir build
2
cd build
3
cmake ..
4
make multi_serial_dump

Example Output:
1
$ multi_serial_dump -I "/dev/tty.usbserial-FTXKC7C3(L4 ):115200" -I "/dev/tty.usbserial-FTXO2T47(BCM):115200"
2
L4 : 51 2c d2 3a 00 00 00 00 00 00 00 00 a8 51 ab d2 Q,.:.........Q..
3
L4 : 3a 00 00 00 00 00 00 00 00 14 51 2a d3 3a 00 00 :.........Q*.:..
4
L4 : 00 00 00 00 00 00 10 51 a4 d3 3a 00 00 00 00 00 .......Q..:.....
5
L4 : 00 00 00 d0 51 23 d4 3a 00 00 00 00 00 00       ....Q#.:......
6
BCM: 00 51 00 60 00 51 00 60 00 51 00 60 00 51 00 60 .Q.`.Q.`.Q.`.Q.`
7
BCM: 00 51 00 60 00 51 00 60 00 51 00 60 00 51 00 60 .Q.`.Q.`.Q.`.Q.`
8
BCM: 00 51 00 60 00 51 00 60 00 51 00 60 00 51 00 60 .Q.`.Q.`.Q.`.Q.`
9
BCM: 00 51 00 60 00 51 00 60 00 51 00 60 00 51 00 60 .Q.`.Q.`.Q.`.Q.`
10
BCM: 00 51 00 60 00 51 00 60 00 51 00 60 00 51 00 60 .Q.`.Q.`.Q.`.Q.`
11
BCM: 00 51 00 60 00 51 00 60 00 51 00 60 00 51 00 60 .Q.`.Q.`.Q.`.Q.`
12
BCM: 00 51 00 60 00 51 00 60 00 51 00 60 00 51 00 60 .Q.`.Q.`.Q.`.Q.`
13
BCM: 00 51 00 60 00 51 00 60 00 51 00 60             .Q.`.Q.`.Q.`
14
L4 : 51 be 5f 45 00 00 00 00 00 00 00 00 c0          Q._E.........
15
BCM: 00 51 00 60                                     .Q.`
16
L4 : 51 39 60 45 00 00 00 00 00 00 00 00 38          Q9`E........8
17
^C

vielleicht kann jemand von euch es auch gebrauchen.

mfg Torsten

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren