Skip to content

Commit 74b922c

Browse files
author
Michael Foukarakis
committed
qdlt: Add some basic docs
Add some basic descriptions for the headers in qdlt/ so that some relationships are clear in generated graphs. This is not complete by far, most functions miss documentation and there are no statements of intent anywhere. Signed-off-by: Michael Foukarakis <michael.foukarakis@bmw.de>
1 parent 10d6a92 commit 74b922c

24 files changed

+172
-31
lines changed

qdlt/dltmessagematcher.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@
1111

1212
class QDltMsg;
1313

14+
/**
15+
* A class which can be used to set search parameters for matching on potential DLT messages.
16+
*
17+
* Offers functions to search different parts of a DLT message.
18+
* Offers the option to search either the header, the payload, or both.
19+
* Searches can be case-sensitive - default is case-insensitive.
20+
* The pattern to search a payload can be either a regular expression or plain text.
21+
*
22+
* Currently used by the UI search dialog.
23+
* @see SearchDialog
24+
*/
1425
class QDLT_EXPORT DltMessageMatcher
1526
{
1627
public:

qdlt/fieldnames.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
#include <QObject>
77
#include <QString>
88

9+
/**
10+
* Class to obtain human-readable names for DLT message parts,
11+
* and UI element properties.
12+
*
13+
* @see MainWindow::initView
14+
*/
915
class QDLT_EXPORT FieldNames : public QObject
1016
{
1117
Q_OBJECT
@@ -42,9 +48,9 @@ class QDLT_EXPORT FieldNames : public QObject
4248
static bool getColumnShown(Fields cn,QDltSettingsManager *settings = NULL);
4349

4450
signals:
45-
51+
4652
public slots:
47-
53+
4854
};
4955

5056
#endif // FIELDNAMES_H

qdlt/qdltargument.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
//! One argument of a DLT message.
3232
/*!
3333
This class contains one argument of a DLT message.
34-
A QDltMessage contains several Arguments.
34+
A QDltMessage contains several QDltArgument, like a DLT message contains
35+
multiple arguments.
3536
*/
3637
class QDLT_EXPORT QDltArgument
3738
{

qdlt/qdltbase.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@
2828

2929
constexpr const auto DLT_MAX_MESSAGE_LEN = 1024*64;
3030

31-
//! Base class for all DLT classes.
32-
/*!
33-
This class contains helper functions needed for all DLT operations and classes.
34-
*/
31+
/**
32+
* Base class for all DLT classes.
33+
*
34+
* This class contains helper functions needed for all DLT operations and classes.
35+
*/
3536
class QDLT_EXPORT QDlt
3637
{
3738
public:

qdlt/qdltconnection.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
#include "export_rules.h"
3333
#include "qdltmsg.h"
3434

35+
/**
36+
* Unused.
37+
*/
3538
class QDLT_EXPORT QDltDataView
3639
{
3740
public:

qdlt/qdltcontrol.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232

3333
#include "export_rules.h"
3434

35+
/**
36+
* This class contains various functions relevant to the UI,
37+
* corresponding to user commands.
38+
*/
3539
class QDLT_EXPORT QDltControl : public QObject
3640
{
3741
Q_OBJECT

qdlt/qdltctrlmsg.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313
namespace qdlt::msg::payload {
1414

15+
/**
16+
* A struct associated with the `GetLogInfo` DLT command,
17+
* to retrieve log levels for all registered contexts.
18+
*/
1519
struct GetLogInfo {
1620
struct App {
1721
struct Ctx {
@@ -30,31 +34,52 @@ struct GetLogInfo {
3034
std::vector<App> apps;
3135
};
3236

37+
/**
38+
* A struct associated with the `GetSoftwareVersion` DLT command,
39+
* to retrieve a string denoting the system's software version.
40+
*/
3341
struct GetSoftwareVersion {
3442
};
3543

44+
/**
45+
* A struct associated with the `GetDefaultLogLevel` DLT command,
46+
* to retrieve the currently set default log level.
47+
*/
3648
struct GetDefaultLogLevel
3749
{
3850
uint8_t logLevel;
3951
uint8_t status;
4052
};
4153

54+
/**
55+
* A struct associated with the `GetDefaultLogLevel` DLT command,
56+
* to set a log level.
57+
*/
4258
struct SetLogLevel {
4359
uint8_t status;
4460
};
4561

62+
/**
63+
* ???
64+
*/
4665
struct Timezone {
4766
uint8_t status;
4867
int32_t timezone;
4968
uint8_t isDst;
5069
};
5170

71+
/**
72+
* ???
73+
*/
5274
struct UnregisterContext {
5375
uint8_t status;
5476
QString appid;
5577
QString ctxid;
5678
};
5779

80+
/**
81+
* ???
82+
*/
5883
struct Uninteresting {
5984
uint32_t serviceId;
6085
};

qdlt/qdltdefaultfilter.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
#include "qdltfilterlist.h"
3737

3838

39+
/**
40+
* XXX
41+
* Unclear usage. Maybe intended to represent filters set in the UI but only used in indexer.
42+
* Unclear difference to `QDltFilter`.
43+
*/
3944
class QDLT_EXPORT QDltDefaultFilter
4045
{
4146
public:

qdlt/qdltexporter.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515
#define QDLT_DEFAULT_EXPORT_SIGNATURE "ITSOEACNYUMRP"
1616
#define QDLT_DEFAULT_EXPORT_DELIMITER ','
1717

18+
/**
19+
* Class used for UI export functions. Currently implemented as a thread that must be fed
20+
* messages to export.
21+
*
22+
* There is no interface toward a collection of DLT messages, but instead
23+
* functions are referencing single QDltMsg instances. This is suboptimal.
24+
*/
1825
class QDLT_EXPORT QDltExporter : public QThread
1926
{
2027
Q_OBJECT

qdlt/qdltfile.h

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
#include <time.h>
3636
#include <QCache>
3737

38+
/**
39+
* Object containing a single QFile and an index to offsets of DLT messages in it.
40+
*/
3841
class QDLT_EXPORT QDltFileItem
3942
{
4043
public:
@@ -49,11 +52,12 @@ class QDLT_EXPORT QDltFileItem
4952

5053
};
5154

52-
//! Access to a DLT log file.
53-
/*!
54-
This class provide access to DLT log file.
55-
This class is currently not thread safe.
56-
*/
55+
/**
56+
* Access to a DLT log file.
57+
*
58+
* This class provide access to DLT log file.
59+
* This class is currently not thread safe.
60+
*/
5761
class QDLT_EXPORT QDltFile : public QDlt
5862
{
5963
public:

0 commit comments

Comments
 (0)