summaryrefslogtreecommitdiffstats
path: root/src/tools
Commit message (Collapse)AuthorAgeFilesLines
* Change license for tool filesLucie Gérard2024-04-047-7/+7
| | | | | | | | | | | | Assuming files in src/tools are tool files. According to QUIP-18 [1], all tool files should be LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 [1]: https://contribute.qt-project.org/quips/18 Task-number: QTBUG-121787 Change-Id: I90b00f4bdd79b20d7e525e6f49211d2ec33e6df5 Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-232-2/+2
| | | | | | | Task-number: QTBUG-105718 Change-Id: Ibfa4f2f7788f83b7032406de634ca4fb635d2131 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-072-0/+6
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I4702aec49e940c3a480b94cf8622155b9b688b9e Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-107-266/+14
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: Ie17b09db5a4aa7bb0d33906360f1125e9632425c Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Turn canbusutil into appSamuli Piippo2022-05-122-6/+9
| | | | | | | | | | | A tool is normally not cross-compiled, but canbusutil is meant to be used in the target env. Turn it into app so that it's always compiled, except for iOS, WASM and rtems, where it's not expected to work. Pick-to: 6.3 6.2 Change-Id: I4286ea524a05727c237ec68454e5406f96d7a7aa Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Use up-to date LGPL license headerKai Köhne2021-11-307-77/+98
| | | | | | | | | Remove usages of outdated LGPL3 header that references LICENSES.LGPLv3 instead of LICENSES.LGPL3. Change-Id: I2dd25a1a7d6ad3e3cbb06753bbc839e26f4a7b26 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Skip unnecessary commands when cross-building toolsJoerg Bornemann2021-10-051-0/+1
| | | | | | | | | | Call qt_internal_return_unless_building_tools() directly after qt_internal_add_tool() to avoid having to special-case code for when this function only creates imported targets in cross-builds. Task-number: QTBUG-85084 Change-Id: I61558279149ec5b4c2f2ecd44954fd2e768ad77f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Explicitly link against the built QtNetwork libraryAlexandru Croitor2021-07-231-1/+2
| | | | | | | | | | | | | This is to ensure that the pre-existing QtNetwork library from the b2qt SDK sysroot in the CI is not picked up. This is likely a consequence of CMake not adding an -rpath-link flag when linking. See QTBUG-86533 for details. Task-number: QTBUG-86533 Pick-to: 6.2 Change-Id: Id05d49812f957c8a6c12c03f5ff633015bd63103 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Introduce QCanBusFrame::FrameIdAndre Hartmann2021-03-272-2/+2
| | | | | | | | | | | | | | | | | Use a dedicated type instead of quint32 to mark a CAN bus frame identifier as such. For now it is just an alias to quint32, but can be changed to some other type for Qt 7. [ChangeLog][QCanBusFrame] Introduced a specific type QCanBusFrame::FrameId for the CAN bus frames identifier. The new type is a typedef to quint32 and therefore should be source compatible. Change-Id: Ie26aa69cd48eb9cee4c11a0c8f8ba74efae24b4f Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix QScopedPointer deprecation warningsKarsten Heimrich2021-03-113-7/+5
| | | | | | | | | | Port away from QScopedPointer and use std::unique_ptr instead. The warnings surfaced after QScopedPointer::take() deprecation in qtbase (commit 612a01be6513894ab1ec5a36b699a2142ba7f35c). Change-Id: I83307bf37878432f84be6c561bfaf5da70db6c3b Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Port to CMakeAndreas Buhr2021-01-274-17/+19
| | | | | | | Task-number: QTBUG-90399 Change-Id: I0521231e7d61809f38c44215b5cd923b292b9e02 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Qt6: Port QtSerialBus module to QStringViewKarsten Heimrich2020-06-101-3/+3
| | | | | | | Task-number: QTBUG-84319 Change-Id: I4194980e3d5be1b6009d320d9b47809bac412504 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Fix the last Clazy level 2 warningsAndre Hartmann2019-09-231-2/+2
| | | | | | | | | | | | ./qtserialbus/src/tools/canbusutil/readtask.cpp line 71: view = QString::fromLatin1("%1.%2 ") => QString::fromLatin1() being passed a literal line 77: QString flags = QLatin1String("- - "); => QString(QLatin1String) being called Change-Id: I69a655a2fe58652aa54fd706706400663a40e997 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* CanBusUtil: Fix crash on listening without argumentsAndre Hartmann2019-09-231-1/+3
| | | | | | | | | | | | | | The listening option expects two parameters: plugin and device. But it was possible to call the program without or with only one parameter, which lead to a crash in util.start(args.at(0), args.at(1), data). Fix that by always checking the argument size first. Change-Id: I7c49bfc875f99286e1f04d1d4ef23b7971577363 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* CanBusUtil: Add local echo to flags columnAndre Hartmann2019-07-165-17/+22
| | | | | | Change-Id: Id2a94cced2bf847e4ce0615e2b9e30523accec23 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix Qt6 buildSona Kurazyan2019-06-244-19/+19
| | | | | | | Added 'Qt::' prefixes where missing. Change-Id: I97d5d9fa78d7c1feaef4caae72b735ea0625a081 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add configuration options to canbusutilAndre Hartmann2018-04-173-0/+52
| | | | | | | | | | | [ChangeLog][canbusutil] Added configuration options to canbusutil, e.g. for bitrate setting or to enable CAN FD operation mode. Task-number: QTBUG-67164 Change-Id: I43690cfd3e0c24f3d5ad79d11b1a60e7fbec3dc1 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Rolf Eike Beer <eb@emlix.com>
* Canbusutil: General cleanup and simplificationAndre Hartmann2017-11-285-81/+84
| | | | | | | | | | | | | | * Order includes and use forward-declarations * Use member initialization and nullptr * Transfrom last connects to Qt5 style * Translate output messages * Name slots better * Discard frames with invalid frame ID or payload size * Simplified some error handling and error outputting Change-Id: Id4d4329afe909ba932e91ad1deeae411806fd77f Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Rolf Eike Beer <eb@emlix.com>
* canbusutil: Use QString::leftRef() instead left()Andre Hartmann2017-10-131-2/+2
| | | | | | | | | Found by clazy. Change-Id: Ie2bd860688437652cf46b860d2bade81df8bdb22 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Windows: Set proper description for canbusutilKai Koehne2017-09-201-0/+1
| | | | | | | Task-number: QTBUG-61970 Change-Id: Idf3aa1164de114f5434b6f2c7ebb87a95ade4adf Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Canbusutil: Fix Clang semantic warningsAndre Hartmann2017-08-302-5/+5
| | | | | | | | | | | Value Conversion Issue -Wsign-conversion 224:22: warning: implicit conversion changes signedness: 'qint32' (aka 'int') to 'quint32' (aka 'unsigned int') Change-Id: I174a07c44c39e5a7549dacf959ffe53bff59ee1d Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix build with -no-feature-commandlineparserStephan Binner2017-04-251-1/+1
| | | | | Change-Id: Ie939d23f1de0956fa34c74f52180775af8d38524 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* canbusutil: Remove unused declarationsAndre Hartmann2017-04-032-4/+0
| | | | | Change-Id: Ib3f7925f0f063c12bea487c73f8cb1c5817c2492 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9v5.9.0-beta1Liang Qi2017-03-317-7/+7
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/canbus/canbus.pro src/plugins/canbus/vectorcan/vectorcanbackend.cpp Change-Id: I3625693784e88204c93479806242ae70c7ec7ff3
| * Updated copyright headersAndre Hartmann2017-02-027-7/+7
| | | | | | | | | | Change-Id: I7d38491c7ee15a1de788375acf9144c59b507d2a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | canbusutil: Print available devices for given pluginAndre Hartmann2017-03-303-4/+26
| | | | | | | | | | | | Change-Id: I72d2dd90137c3be2e07311d1dc4f83dfa4c15a18 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | canbusutil: Better output formatting with timestamp and infoAndre Hartmann2017-03-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print two spaces after the info to separate the CAN ID, print no space before the info as the timestamp already ends with two spaces. Example output: 1490815444.0159 - - 12345678 [04] 00 11 22 33 1490815444.0171 B - 12345678 [04] 00 11 22 33 1490815444.0186 - E 12345678 [04] 00 11 22 33 1490815444.0200 B E 12345678 [04] 00 11 22 33 This example output was generated with the following small script: for i in 0 1 2 3 do cansend vcan0 12345678##${i}00112233 done Change-Id: I579f72383ebb92a979251bd41fe3a6fa58f33f04 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | canbusutil: Rename command line option for extra informationAndre Hartmann2017-03-301-2/+2
| | | | | | | | | | | | | | | | | | At the moment, only CAN FD flags are shown, but this is very likely to be extended to TX/RX printing soon. Change-Id: Ibdf6014645fdc5a4d3791ab12ce298f4e2a4b3c6 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | canbusutil: Add CAN FD flag handlingAndre Hartmann2017-03-275-8/+53
| | | | | | | | | | | | | | | | | | | | | | | | * For receiving, force the CAN plugin into CAN FD mode and show the CAN FD flags like the CAN Example * For sending, check if an odd number of data bytes is given and interpret the first data char as CAN FD flags Task-number: QTBUG-56464 Change-Id: I235827ea59d58744c34d5259e5637ad9c3326112 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | canbusutil: Unify CAN bus frame terminologyAndre Hartmann2017-03-271-2/+2
| | | | | | | | | | | | | | Change-Id: I23fefe9f8db3656fccb08c3968d6174a91d82412 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | CAN: Improve error handling codeAndre Hartmann2017-01-241-2/+2
|/ | | | | | | | | | | * Add Q_UNLIKELY to error handling branches * Prefers qWarning("%ls", qUtf16Printable(str)) over qWarning() << str; Task-number: QTBUG-55045 Change-Id: I3e49380bdec0edb2ea00e1b5e3421464b295aacc Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QCanBusFrame: add flag to identify CAN FD framesRolf Eike Beer2016-11-152-10/+6
| | | | | | | | Task-number: QTBUG-49675 Task-number: QTBUG-56720 Change-Id: Id24783c6ee1b81317d2e6d0965a9ed37987b47ec Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* canbusutil: directly pass QCanBusFrame to parsePayloadField()Rolf Eike Beer2016-11-112-14/+17
| | | | | | | | | | It makes no sense to return all information in different variables and assemble the frame in the caller, just let this method put everything into the frame. While at it, give the method a more sensible name. Change-Id: If7e7d467ac4c43d2b2cf245c95e8fe99551aa242 Reviewed-by: Andreas Wilhelm <aw@emlix.com> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* CAN-Examples: Fix reading only one frame on framesReceived()Andre Hartmann2016-11-111-12/+14
| | | | | | | | | | | | | | | The signal framesReceived() is emitted, when one or more CAN frames were received from CAN bus. Reading only the first frame may leave more CAN frames in the receive queue, seemingly leading to frame loss. Task-number: QTBUG-56886 Change-Id: I9cbb9451eb67e6058a779aba678beb215f1113e9 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Andreas Wilhelm <aw@emlix.com> Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* canbusutil: remove condition that can never be trueRolf Eike Beer2016-11-111-3/+1
| | | | | | | | | fdFrame has been set to false right at the start of this method and has not been touched since. Change-Id: Ibfd9b799a4298cfbc306c3ae6cbaffd1331aefb3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* CAN: One more space between timestamp and CAN frame in examplesAndre Hartmann2016-11-031-1/+1
| | | | | | | | This affects only the examples, not the QCanBus API. Change-Id: Iccfe0cb7713572eb95ae23aabab51e2f10dd3593 Reviewed-by: Andreas Wilhelm <aw@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* canbusutil: Don't show header when printing pluginsAndre Hartmann2016-11-011-1/+1
| | | | | | | | | | | | | | | Omit the header when the plugins are printed on explicit request by a command line parameter. Just showing the available plugins without extra information makes this output easier to parse e.g. by shell scripts. Keep the output for the error case. Change-Id: I88708f351e360bb5da64fe43f42e0cb5f5391849 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* canbusutil: Remove unneeded "using namesspace std;"Andre Hartmann2016-11-011-2/+0
| | | | | | | Change-Id: I92c52da60536fb0385976e00651c9e93ab134056 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Andreas Wilhelm <aw@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* canbusutil: Add optional timestamp displayAndre Hartmann2016-11-015-2/+27
| | | | | | Change-Id: I0e56f0a45bc9136827b30ce7aa927d6cad209ee4 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* canbusutil: Fix RTR frame handlingv5.8.0-beta1Andre Hartmann2016-10-051-5/+7
| | | | | | | | | | | | * Allow empty CAN RTR frames, they are as valid as empty CAN data frames * CAN FD defines data frames, but does not seem to define RTR frames. At least cansend forbids RTR frames with a length > 8. Change-Id: I4405fc450a4f683f6d4f34b237e48d37c6a3670b Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Andreas Wilhelm <aw@emlix.com>
* canbusutil: Simplify payload field parsingAndre Hartmann2016-10-041-37/+18
| | | | | | | | | | | | | Instead of parsing the payload byte-wise, check if the whole string given follows an allowed pattern. This patch would have been even simpler, if QByteArray::fromHex() had a means of indicating wrong inputs. Change-Id: If8fc82937e2ba52dce58c062c58f42e0c65a2b13 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Andreas Wilhelm <aw@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Don't build canbusutil on AndroidPaul Olav Tvete2016-10-031-1/+2
| | | | | | | | We don't support console applications on Android. Task-number: QTBUG-56331 Change-Id: Id9d2eff556e0619d4dcbc3486757eae77b11a939 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* canbusutil: Removed printDataUsage method and usagesAndreas Wilhelm2016-09-302-20/+7
| | | | | | | | | | This method just prints out part of the usage instructions and does not create added value for the application. Change-Id: I4615f5708ecdbbf05951d7a5d00c5c77a6239e54 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* canbusutil: Ported to QCommandLineParserAndreas Wilhelm2016-09-303-55/+66
| | | | | | Change-Id: I285bad6f9df2014f3cbcdf66485a3004a4f16b02 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* canbusutil: Simplify plugin resolvingAndre Hartmann2016-09-291-20/+13
| | | | | Change-Id: I970132266e0e066ee58527b19ebb046b14b68592 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* canbusutil: Updated class attributes to match Qt naming conventionsAndreas Wilhelm2016-09-292-52/+52
| | | | | | Change-Id: Idb19c1846da63216c00ef009c50cd3f5d2103356 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-301-7/+6
|\ | | | | | | Change-Id: Ibb05cec689a217ac93b3d5fa98a0820f52bd12b3
| * CanBusUtil: Interpret Send-ID as hexadecimalAndre Hartmann2016-06-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Appearently, CanBusUtil was inspired by SocketCANs cansend, and this does interpret all input as hexadecimal. Further, the data byte following the hash mark '#' were already used in hex, so let's be consequent. Change-Id: I21324eb540ae2792f747dbae49865973d182d2d9 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * CanBusUtil: Allow transmitting frames with empty payloadAndre Hartmann2016-06-021-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | That's totally valid, compatible to cansend, and also stated in the help: '{payload} has 0..8 (0..64 CAN FD) ASCII hex-value pairs'. Syntax: canbusutil <plugin> <device> 123# Change-Id: I4bd3aade2041cd7b4b1eae9779747b0a0f9dc379 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | QCanBusFrame: Add toString()Andre Hartmann2016-06-241-24/+4
| | | | | | | | | | | | | | | | | | | | | | This allows to display CAN frames to the user and reduces a lot of duplication. [ChangeLog][QtSerialBus][QCanBusFrame] Added toString() to QCanBusFrame. Task-number: QTBUG-53171 Change-Id: I56c4c8c41012f76e2db6e1c97307325b0c73b14a Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>