summaryrefslogtreecommitdiff
path: root/doc/dlt-receive.1.md
blob: 38eed53c5189a231f4c4d7f7e8e16841b3ff98a3 (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
% DLT-RECEIVE(1)

# NAME

**dlt-receive** - Console based client for DLT Logging

# SYNOPSIS

**dlt-receive** \[**-h**\] \[**-a**\] \[**-x**\] \[**-m**\] \[**-s**\] \[**-o** filename\] \[**-c** limit\] \[**-v**\] \[**-y**\] \[**-b** baudrate\] \[**-e** ecuid\] \[**-f** filterfile\] \[**-j** filterfile\] \[**-p** port\] hostname/serial_device_name

# DESCRIPTION

Receive DLT messages from DLT daemon and print or store the messages.

## OPTIONS

-h

: Display a short help text.

-a

: Print DLT file; payload as ASCII.

-x

:   Print DLT file; payload as hex.

-m

:   Print DLT file; payload as hex and ASCII.

-s

:   Print DLT file; only headers.

-o

:   Output messages in new DLT file.

-c

:   Set limit when storing messages in file. When limit is reached, a new file is opened. Use K,M,G as suffix to specify kilo-, mega-, giga-bytes respectively, e.g. 1M for one megabyte (Default: unlimited).

-v

:   Verbose mode.

-S

:   Send message with serial header (Default: Without serial header)

-R

:   Enable resync serial header

-y

:   Serial device mode.

-b

:   Serial device baudrate (Default: 115200).

-e

:   Set ECU ID (Default: RECV).

-f

:   Enable filtering of messages. Takes a space separated filter file (see [Space separated filter file](#Space-separated-filter-file)).

-j

:   Enable extended filtering of messages. Takes a json filter file ([Json filter file](#Json-filter-file)).

-p

:   Port for UDP and TCP communication (Default: 3490).
# EXAMPLES

Print received message headers received from a dlt-daemon running on localhost::
    **dlt-receive -s localhost**

Print received message headers received from a serila interface::
    **dlt-receive -s -y /dev/ttySO**

Store received message headers from a dlt-daemon to a log file called log.dlt and filter them for e.g. Application ID ABCD and Context ID EFGH (Write:ABCD EFGH as single line to a file called filter.txt)::
    **dlt-receive -s -o log.dlt -f filter.txt localhost**

Store incoming messages in file(s) and restrict file sizes to 1 megabyte. If limit is reached, log.dlt will be renamed into log.0.dlt, log.1.dlt, ... No files will be overwritten in this mode::
    **dlt-receive -o log.dlt -c 1M localhost**

## Space separated filter file
File that defines multiple filters. Can be used as argument for `-f` option. With this it's only possible to filter messages depending on their Application ID and/or Context ID. The syntax is: first AppID and optional a CtxID behind it, with a space in between. Each line defines a filter and the maximum number of filters is 30.

Example:
```
DLTD INTM
DLT INT
TEST
```

## Json filter file
Only available, when builded with cmake option `WITH_EXTENDED_FILTERING`.

File that defines multiple filters. Can be used as argument for `-j` option. With this it's also possible to filter messages depending on their Application ID, Context ID, log level and payload size. The following example shows the syntax. Names of the filters can be customized, but not more than 15 characters long. The maximum number of filters is also 30.

Example:
```
{
"filter1": {
    "AppId": "LOG",
    "ContextId": "TEST",
    "LogLevel": "3"
    },
"filter2": {
    "AppId": "app",
    "LogLevel": "4"
    },
"filter3": {
    "AppId": "app2",
    "ContextId": "con2",
    "PayloadMin": "20",
    "PayloadMax": "50"
    }
}
```
# EXIT STATUS

Non zero is returned in case of failure.

# NOTES

Be aware that dlt-receive will never delete any files. Instead, it creates a new file.

# AUTHOR

Alexander Wenzel (alexander.aw.wenzel (at) bmw (dot) de)

# COPYRIGHT

Copyright (C) 2015 BMW AG. License MPL-2.0: Mozilla Public License version 2.0 <http://mozilla.org/MPL/2.0/>.

# BUGS

See Github issue: <https://github.com/GENIVI/dlt-daemon/issues>

# SEE ALSO

**dlt-daemon(1)**