From dcc83f12ca9bc565b3fae6f4e344093f9cba4586 Mon Sep 17 00:00:00 2001 From: Vladyslav Goncharuk Date: Wed, 15 Nov 2023 16:19:28 +0200 Subject: [PATCH] [ISSUE #186][PLOT_VIEW] Build for < Qt5.15 fails 1. [x] Have you followed the guidelines in our [Contributing document](../blob/master/CONTRIBUTING.md)? 2. [x] Have you checked to ensure there aren't other open [Pull Requests](../pulls) for the same update/change? 3. [x] Have you built the project, and performed manual testing of your functionality for all supported platforms - Linux and Windows? 4. [x] Is your change backward-compatible with the previous version of the plugin? Change description: - Fixed compilation error - Fixed typos in 'plot view' README.md ---- Verification criteria: - Tested on Ubuntu 20.04 LTS Signed-off-by: Vladyslav Goncharuk --- dltmessageanalyzerplugin/src/common/PlotDefinitions.cpp | 5 +++++ md/plot_view/plot_view.md | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dltmessageanalyzerplugin/src/common/PlotDefinitions.cpp b/dltmessageanalyzerplugin/src/common/PlotDefinitions.cpp index 151cd2fa..0e36396d 100644 --- a/dltmessageanalyzerplugin/src/common/PlotDefinitions.cpp +++ b/dltmessageanalyzerplugin/src/common/PlotDefinitions.cpp @@ -1000,7 +1000,12 @@ bool checkPlotViewParameter(QString& errorMsg, QStringList splitPlotViewParameters(const QString& parameters) { +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) + return parameters.split(s_PLOT_PARAMETER_DELIMITER, QString::SplitBehavior::SkipEmptyParts); +#else return parameters.split(s_PLOT_PARAMETER_DELIMITER, Qt::SkipEmptyParts); +#endif + } int32_t getPlotViewParameterIndex(ePlotViewID plotViewID, const QString& parameterName) diff --git a/md/plot_view/plot_view.md b/md/plot_view/plot_view.md index a8ed1c92..5a58dce7 100644 --- a/md/plot_view/plot_view.md +++ b/md/plot_view/plot_view.md @@ -74,7 +74,7 @@ Plot regex group identifiers, which are supported by the plugin: |#| Group name | Format | Example | Meaning | Type | | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | -|1| **PARType** | PARType + _ + \ + _ + \ | PARType_CPUC_LINEAR |**Plot axis rectangle type**. Type of the specific plot axis rectangle. Supported types are - GANNT, BAR, POINT, LINEAR.|**Optional**. If not specified, the LINEAR value is used. If multiple values appear - the 'last win' strategy is applied.| +|1| **PARType** | PARType + _ + \ + _ + \ | PARType_CPUC_LINEAR |**Plot axis rectangle type**. Type of the specific plot axis rectangle. Supported types are - GANNT, POINT, LINEAR.|**Optional**. If not specified, the LINEAR value is used. If multiple values appear - the 'last win' strategy is applied.| |2| **PXMx** | PXMx + _ + \ + _ + \ + _ + [real_part_value] + _ + [neg] | PXMx_CustomDiagram_10_00 | **Plot X Max**. Sets the maximum visible value on axis X of the specified axis rectangle. | **Optional**. Last win. If not set, then the maximum value will be derived from the provided data. You can omit 'real_part_value' if not needed. Use the 'neg' keyword as the last parameter to specify negative values. Not applicable to Gantt charts. | |3| **PXMn** | PXMn + _ + \ + _ + \ + _ + [real_part_value] + _ + [neg] | PXMn_CustomDiagram_10_00_neg | **Plot X Min**. Sets the minimum visible value on axis X of the specified axis rectangle. | **Optional**. Last win. If not set, then the minimum value will be derived from the provided data. You can omit 'real_part_value' if not needed. Use the 'neg' keyword as the last parameter to specify negative values. Not applicable to Gantt charts. | |4| **PYMx** | PYMx + _ + \ + _ + \ + _ + [real_part_value] + _ + [neg] | PYMx_CPUC_100_00 | **Plot Y Max**. Sets the maximum visible value on axis Y of the specified axis rectangle. | **Optional**. Last win. If not set, then the maximum value will be derived from the provided data. You can omit 'real_part_value' if not needed. Use the 'neg' keyword as the last parameter to specify negative values. Not applicable to Gantt charts. | @@ -83,9 +83,9 @@ Plot regex group identifiers, which are supported by the plugin: |7| **PYN** | PYN + _ + \ + _ + \ | PYN_CPUC_CPUConsumption |**Plot Y-axis name**. Sets plot Y-axis name for the specified plot axis rectangle. Use camelStyleNaming. E.g. 'camelStyleNaming' will be represented as 'Camel style naming' inside the diagram. | **Optional**. If not set - remains empty. | |8| **PXU** | PXU + _ + \ + _ + \ | PXU_CPUC_Milliseconds | **Plot X-axis unit**. Specifies the plot X-axis unit. Use camelStyleNaming. E.g. 'camelStyleNaming' will be represented as 'Camel style naming' inside the diagram. | **Optional**. If not set, then the 'seconds' default value is used, as the X-axis is usually used to represent the time, and in dlt, the timestamp is measured in seconds ( with real part, representing milliseconds, microseconds, etc. ) | |9| **PYU** | PYU + _ + \ + _ + \ | PYU_CPUC_Percents | **Plot Y-axis unit**. Specifies the plot Y-axis unit. Use camelStyleNaming. E.g. 'camelStyleNaming' will be represented as 'Camel style naming' inside the diagram. | **Optional**. If not set - remains empty. | -|10| **PXData** | PXData + _ + \ + _ + \ + _ + [value] | PXData_CPUC_1 |**Plot axis X data**. The content of this regex group contains the data, that will be placed at axis X of the specified graph id and axis rectangle. The data of EACH VALUE should be convertible from the string to the float or the date-time. For conversion to date-time see PXT parameter. The graphId parameter should be convertible to an integer. If an optional 'value' parameter was specified, the captured data would be ignored. The 'value' param will be NOT considered as the "time", even if the PXT data was provided. | **Optional**. If not set, the timestamp of each involved DLT message would be used. This parameter can be used for the Gantt chart to get the timestamp from the message's payload. | +|10| **PXData** | PXData + _ + \ + _ + \ + _ + [value] | PXData_CPUC_1 |**Plot X-axis data**. The content of this regex group contains the data, that will be placed at axis X of the specified graph id and axis rectangle. The data of EACH VALUE should be convertible from the string to the float or the date-time. For conversion to date-time see PXT parameter. The graphId parameter should be convertible to an integer. If an optional 'value' parameter was specified, the captured data would be ignored. The 'value' param will be NOT considered as the "time", even if the PXT data was provided. | **Optional**. If not set, the timestamp of each involved DLT message would be used. This parameter can be used for the Gantt chart to get the timestamp from the message's payload. | |11| **PXT** | PXT + _ + \ | PXT_4yw2Mv2dw2Hw2mw2sw6f | **Plot X-axis time format**. Specifies, how to decode the date and time from the string out of the PXData. E.g. the '05-24 18:25:01.439' time format can be decoded with PXT_2Mw2dw2Hw2mw2sw3f. y - year. M - month. d - day. H - hour. m - minute. s - second. w - any delimiter symbol. f - a real part of the second ( milliseconds, microseconds, etc. ). Useful for custom imported logs, like Android logcat traces, which do not have proper dlt timestamp. | **Optional**. If not specified - there would be no attempt to decode PXData as time. | -|12| **PYData** | PYData + _ + \ + _ + \ + _ + [value] | PYData_CPUC_1 |**Plot axis Y data**. The content of this regex group contains the data, that will be placed at axis Y of the specified graph id and axis rectangle. The data of EACH VALUE should be convertible from the string to the float or the date-time. For conversion to date-time see PYT parameter. The graphId parameter should be convertible to an integer. If an optional 'value' parameter was specified, the captured data would be ignored. The 'value' param will be NOT considered as the "time", even if the PYT data was provided. | **Mandatory** for plots in which 'PARType' is not equal to 'GANTT'. | +|12| **PYData** | PYData + _ + \ + _ + \ + _ + [value] | PYData_CPUC_1 |**Plot Y-axis data**. The content of this regex group contains the data, that will be placed at axis Y of the specified graph id and axis rectangle. The data of EACH VALUE should be convertible from the string to the float or the date-time. For conversion to date-time see PYT parameter. The graphId parameter should be convertible to an integer. If an optional 'value' parameter was specified, the captured data would be ignored. The 'value' param will be NOT considered as the "time", even if the PYT data was provided. | **Mandatory** for plots in which 'PARType' is not equal to 'GANTT'. | |13| **PYT** | PYT + _ + \ | PYT_4yw2Mv2dw2Hw2mw2sw6f | **Plot Y-axis time format**. Specifies, how to decode the date and time from the string out of the PYData. E.g. the '05-24 18:25:01.439' time format can be decoded with PYT_2Mw2dw2Hw2mw2sw3f. y - year. M - month. d - day. H - hour. m - minute. s - second. w - any delimiter symbol. f - a real part of the second ( milliseconds, microseconds, etc. ). Useful for custom imported logs, like Android logcat traces, which do not have proper dlt timestamp. | **Optional**. If not specified - there would be no attempt to decode PYData as time. | |14| **PGN** | PGN + _ + \ + _ + \ + _ + [name] | PGN_CPUC_1_NavApp, PGN_CPUC_1 | **Plot graph name**. Specifies the graph name for the specified graph id. If name parameter is not specified, then graph names would be derrived from the caprute content, and a separate graph on the plot would be created for each unique captured graph name. If name parameter is specified, then all names of the specified graphId would be the hard-coded ones, and only one graph would be produced on the plot for that graph id. | **Mandatory** for plots in which 'PARType' is not equal to 'GANTT'. | |15| **PGMD** | PGMD + _ + \ + _ + \ + _ + \ + _ + [value] | PGMD_SST_1_Domain | **Plot graph meta data**. Declares a metadata item, which ( if found for a specific plot point ) will be added to point's representation when it is selected by the user. | Optional. One or more. If 'value' parameter is not explicitly set, then captured data will be set as 'value'. If multiple 'value'-s are found in the analyzed string for the same 'key' - they will be concatenated. That includes both captured and explicitly set 'value'-s. |