summaryrefslogtreecommitdiffstats
path: root/src/plugins/canbus/virtualcan/virtualcanbackend.cpp
Commit message (Collapse)AuthorAgeFilesLines
* VirtualCAN: Fix disconnecting from busAndre Hartmann2019-11-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | While the client sent a disconnect command to the server, this was not handled on server side. Thus, the client was never really Unconnected and in turn it was not possible to connect again. Fix that by closing the socket, that leads to VirtualCanBackend::clientDisconnected() being called and that sets the plugin to Unconnected. In any case, the server keeps running until the plugin is unloaded, even after the last client is disconnected. [ChangeLog][VirtualCAN] Fixed that the plugin stayed forever in closing state and subsequent connect calls always failed. Change-Id: I7a490c55a3cb6bd193ba4783b48d1385aa85bcde Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Rolf Eike Beer <eb@emlix.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit f47b712057676de6115d7320cbbc2eb9b20c9817)
* VirtualCAN: Slightly adopt debug outputAndre Hartmann2019-03-251-4/+4
| | | | | | | | | | | | | | | | | | | Remove the colons from a few places to make their output similar to the debug output in other lines. Example (omitting qt.canbus.plugins.virtualcan prefix): Server [0x7f19684903c0] constructed. Server [0x7f19684903c0] could not be started, port 35468 is already in use. Client [0x5586262ecaa0] socket created. Client [0x5586262ecaa0] socket connected. Client [0x5586262ecaa0] received: '0##f9ffad71e96cb5ee'. Client [0x5586262ecaa0] socket disconnected. Client [0x5586262ecaa0] socket destructed. Server [0x7f19684903c0] destructed. Change-Id: I6d91282a262c58e2c983ee6db5c030698197c9f6 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add a virtual CAN bus pluginAndre Hartmann2018-08-011-0/+362
Based on a TCP/IP server/client infrastructure, to allow testing programs against a second program without CAN hardware connected. [ChangeLog][QCanBus] Added a generic virtual CAN bus plugin. Task-number: QTBUG-61837 Change-Id: I7acf04bd476b65b4d1d04254463d61a4dc9042d5 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>