summaryrefslogtreecommitdiffstats
path: root/examples/serialbus/modbus/slave
Commit message (Collapse)AuthorAgeFilesLines
* Remove usages of deprecated QLatin1LiteralSona Kurazyan2019-06-251-1/+1
| | | | | | Task-number: QTBUG-76491 Change-Id: I8e16068e04b5f04ab7873697075e19a5ec760d54 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Cleanup and modernize the Modbus examplesAndre Hartmann2019-02-134-34/+41
| | | | | | | | | | | | | | * Replace static_cast with QOverload * Fix some Clang warnings * Mark user-visible strings with tr() * Disable verbose log output * Replace auto-connect with explicit functor-style connect * Initialize members at declaration * Small style cleanup Change-Id: Idcb6c24a8733e7fd659ad4750ce0798a72c84af6 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove hard QtSerialPort dependency from QtSerialBusAlex Blasche2018-11-074-2/+23
| | | | | | Task-number: QTBUG-70360 Change-Id: I511e368e227a46f9eba178612c8b106f5930ee49 Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Migrate the modbus example to use QRegularExpressionSamuel Gaist2018-06-201-2/+3
| | | | | | | | | This patch updates the modbus example MainWindow class to use QRegularExpression in place of QRegExp which is to be considered deprecated. Change-Id: Ie030b695a1885c5e1ffc2511da2381c5df6b958a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* qtlite: Skip building examples when configured with no-feature-itemviewsRainer Keller2018-01-121-0/+1
| | | | | | Task-number: QTBUG-53141 Change-Id: I04c3627ca94de9277d7c09365b4de6a382187c62 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix outdated BSD license headerKai Koehne2017-10-205-10/+60
| | | | | | Change-Id: Ifdd8f08e12f471aee37f749b4ad911ab7b6adb2a Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fix outdated FDL license headerKai Koehne2017-10-201-5/+5
| | | | | | Change-Id: Ib7a43e822a32f7e0c77055baeef4f0fba33092a5 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9v5.9.0-beta1Liang Qi2017-03-315-5/+5
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/canbus/canbus.pro src/plugins/canbus/vectorcan/vectorcanbackend.cpp Change-Id: I3625693784e88204c93479806242ae70c7ec7ff3
| * Updated copyright headersAndre Hartmann2017-02-025-5/+5
| | | | | | | | | | Change-Id: I7d38491c7ee15a1de788375acf9144c59b507d2a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Eradicate Q_FOREACH loops and mark the module as Q_FOREACH-freeAndre Hartmann2017-01-111-4/+4
|/ | | | | Change-Id: I4ec52799514b750c158e3cb8e6c38d1f1063c6c5 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* add example installsOswald Buddenhagen2016-04-281-0/+3
| | | | | Change-Id: I9a42406c973a0933125106d610fb0547b4cc5bb0 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Adjust Pointer and Reference to Qt Coding StyleAndre Hartmann2016-04-222-5/+5
| | | | | Change-Id: Ifa233b324a82209cb597b5cf555b4e290b890e10 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Use 'nullptr' where it is possibleDenis Shienkov2016-04-213-4/+4
| | | | | Change-Id: I729e6b53cbc0b9a16c72c2351cc95d6bd7a2a0aa Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* don't over-expose private dependenciesOswald Buddenhagen2016-03-091-1/+1
| | | | | | | ... and fix examples which erroneously depended on this over-exposure. Change-Id: I1af4db11cf5119f5d5064597533d6b4c675236fd Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Add documention for Modbus slave and master examplesAlex Blasche2016-02-192-0/+45
| | | | | | Task-number: QTBUG-51053 Change-Id: I62e6a88e93eb0a35465d540d8eeaeb812ea7a108 Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* Make it possible to set data on a disconnected Modbus device.Karsten Heimrich2016-01-281-3/+3
| | | | | Change-Id: I8eaaec17f541128e4e59c098c95cd607e87871e2 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Implement support for server listen only and busy state.Karsten Heimrich2016-01-222-219/+271
| | | | | Change-Id: I7497e0ee58b3188a187c78d19d5876c9f2a6e469 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Make examples compile on LinuxAlex Blasche2016-01-081-2/+2
| | | | | Change-Id: I62f1027724f74da2e77235d5a07f159c8ca4593e Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Adjust header includes according to our coding conventions.Karsten Heimrich2016-01-082-7/+7
| | | | | Change-Id: Id2c01e09e5d24bf2ecce57211cb13299478544e3 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Improve example applications.Karsten Heimrich2016-01-061-0/+46
| | | | | | | | | | | | * Master: Small coding style change. * Slave|Master: Have a defined tab order. * Master: Have a single server address field only. * Master: Show either coils or holding registers, not both. * Master: Limit number of possible write values on start address. * Master: Enable/disable possible items depending on start address. Change-Id: I2892efe3c4cd1a6f29e26b6b6b2e6b3a3f24ea99 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove Modbus and ModbusDevice prefix.Karsten Heimrich2016-01-042-2/+2
| | | | | | | | The naming is already obvious, no need to duplicate the protocol or base class name. Change-Id: I855c65379992c93c3abaf5c2be57cd192a23fb11 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Update examples to share the same settings behavior.Karsten Heimrich2015-12-1812-6/+477
| | | | | Change-Id: I69f41ce4204bdcb3ab3c4f0a37ee84f4285e9124 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Implement Modbus device connection parameters.Karsten Heimrich2015-12-181-1/+9
| | | | | Change-Id: I6ca93f853f8b56cb97d2f724f32a4f3ea08d805e Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix wrong Modbus addresses.Karsten Heimrich2015-11-231-1/+1
| | | | | | | | | | | | | | | Serial slave devices are assigned addresses in the range of 1 – 247. See Modbus Serial Line Protocol and Implementation Guide V1.02, page 8, 2.2 MODBUS Addressing rules. On TCP/IP, the MODBUS server is addressed using its IP address; therefore, the MODBUS Unit Identifier is useless. The value 0xFF has to be used. See Modbus Messaging on TCP/IP Implementation Guide V1.0b, page 23, paragraph * Unit Identifier. Change-Id: Id6b304f0f37ae24280729c8f3f0c375898bad4f9 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Ralf Nolden <nolden@kde.org>
* Finally rename all remaining slave* occurrences to server*.Karsten Heimrich2015-11-202-4/+4
| | | | | Change-Id: Ia71200686660f25f624e83d7bb3f8b3a8cb1b774 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Put error messages into the statusbar of master/slave examplesKarsten Heimrich2015-11-112-51/+45
| | | | | | | | | | And while we are adding new includes related to the statusbar we may as well convert existing includes to the proper qt style. This avoids inconsistencies. Change-Id: I77d26fcd707fcb018b2c27ee92a8d36c1c82f96c Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* fix spurious dependenciesOswald Buddenhagen2015-11-111-1/+1
| | | | | | | | | most importantly, eliminate gui everywhere where it is not needed, and don't redundantly list it where it is. Change-Id: I8567e8473d976d9087a7da6d8f9f81b43148c8b2 Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Remove QModbusDevice::ModbusConnection from the APIAlex Blasche2015-11-051-4/+9
| | | | | | | | The examples still use it. We continue to use it as part of the private example implementation. Change-Id: Ia52e7eb48866f254b9238882dc6086e07ab26d42 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Fix wrong connect.Karsten Heimrich2015-10-281-1/+1
| | | | | Change-Id: Id48d5494c03371c36452f859358a690436e33371 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove 3rdparty libmodbus and cleanup depending code usage.Karsten Heimrich2015-10-281-1/+0
| | | | | Change-Id: I3177a315c43d71bde35b8291aed9332c72d1d8d9 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Rename slaveId to slaveAddressRalf Nolden2015-10-262-2/+2
| | | | | | | | | Rename all occurrences of slaveId and according read write functions to slaveAddress to avoid confusion with the slave ID code for function code 17 Change-Id: Ia05096105d739317f6a4ac62ed589dc262828d43 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Performance improvement in slave exampleAlex Blasche2015-10-251-19/+13
| | | | | | | | | | There is no need to connect the signals each time we reconnect. The server map is only set once when a new QModbusServer instance is created and not during each reconnect. Change-Id: I0784b98b93f625012abcf688535c6c2660366a33 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Display Modbus server errors in slave exampleAlex Blasche2015-10-252-0/+12
| | | | | Change-Id: I08d37d98b916f54986233e1a197b289464afbd32 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Basic working Mobus TCP server implementation.Karsten Heimrich2015-10-211-1/+4
| | | | | Change-Id: I930b0fdc9afc99938d02824379a84bd09f7cdc62 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Fix find children of discreteButtons groupAlex Blasche2015-10-201-1/+1
| | | | | | | | | The regular expression didn't match the discrete input checkboxes. The signal connection never happened and subsequently the requested information was never send to the modbus client. Change-Id: I6b5c70a6fe77b691d4a223e34450262f4443b926 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Introduce QModbus logging categoryAlex Blasche2015-10-141-0/+4
| | | | | Change-Id: I96c66f3cdbb673576f0102f88b0b6adc3b4149c4 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Rename last occurrences ModBus -> ModbusKarsten Heimrich2015-10-141-1/+1
| | | | | Change-Id: I2c697dbeeba61d28cbe57603008e2c221183908b Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Merge QModbusRegister and QModbusDataUnit + some enhancement.Karsten Heimrich2015-10-142-21/+21
| | | | | Change-Id: I7d79834ca6feec235cae8110341fc637aa1c2f7c Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Define interface for request/response proccessing.Karsten Heimrich2015-10-131-0/+1
| | | | | | Change-Id: Ib972142f8933b4caa67d9201e9790dbe216f5bd3 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Rename classes to match Mobus RTU serial communication.Karsten Heimrich2015-09-301-1/+1
| | | | | | Change-Id: I09bcfedd981595140a87171dfff063d83f41ffd9 Reviewed-by: Ralf Nolden <nolden@kde.org> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Rename files to indicate RTU implementation.Karsten Heimrich2015-09-301-1/+1
| | | | | | Change-Id: Ief85be8a6207f00284a4d1fe36a1e957f1437dcd Reviewed-by: Ralf Nolden <nolden@kde.org> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Rename code|docs, master -> client, slave -> server.Karsten Heimrich2015-09-281-3/+6
| | | | | | Change-Id: Ic317d9ffbd2f6197558c1f92fe37660b1de5fe76 Reviewed-by: Ralf Nolden <nolden@kde.org> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Rename classes, master -> client, slave -> serverKarsten Heimrich2015-09-282-5/+5
| | | | | | Change-Id: I87011ffd423842cf9dbe5babc0801c95b47c9a86 Reviewed-by: Ralf Nolden <nolden@kde.org> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Adjust variables to match QModbus rename patch.Karsten Heimrich2015-09-282-37/+37
| | | | | | Change-Id: I8f14cc7d95a3c107988af216ac596b6b6a9df614 Reviewed-by: Ralf Nolden <nolden@kde.org> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Rename QModBus into QModbus.Karsten Heimrich2015-09-282-37/+37
| | | | | | Change-Id: I6b045288eeb6840a166bdb505c114dd61996f59c Reviewed-by: Ralf Nolden <nolden@kde.org> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Make use of the new QMobBusSerialSlave class in the slave example appAlex Blasche2015-09-251-3/+8
| | | | | Change-Id: I10b049e4b9a6ae3e4fa9ef18c695da6445a21d7d Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Update examples to able to choose Serial or TCP.Karsten Heimrich2015-09-253-55/+99
| | | | | | | | | Also, pushButton was renamed to connectButton to improve readability. Change-Id: If7c20b8095b27c14bcb31672788a8a57d9ad1940 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* The examples don't link against serialport module anymore.Alex Blasche2015-09-171-1/+1
| | | | | Change-Id: I97dc1b232e281e08c2064a8412c110abe718a5df Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Remove QModBusSlave::setMap(QModBusRegister::RegisterType, quint16)Alex Blasche2015-09-161-4/+7
| | | | | | | At the same time we implement the new setMap(..) interface Change-Id: I2d3956a0fa4afb6fc7f0b347b6ad850f2e436137 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
* Move QModBusDevice::ModbusTable -> QModBusRegister::RegisterTypeAlex Blasche2015-09-162-20/+20
| | | | | Change-Id: I9a3d77d75bf25b8bd12c10bdf2c3f2c8ebaa389f Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>