Ok, I have a lot of different devices (with different protocols) connected to a single serial port. Thread class that works with serial port emits signals when data is received, and has a slot for sending data. All devices have signals for sending and slots for receiving data. Device paired with port "exchanges" send and receive signals and slots. Because of the number of devices there is allways some activity on port, i want to monitor comunication for specific device, that is idle most of the time. I have a simple widget, created on demand, with log window that shows communication lines like
timestamp <- "data recevied"
timestamp -> "data sent"
when i create this monitoring widget i connect it with serial port and show all communication
too much communication makes it hard to catch the lines of this, almost idle, device
i wanted to connect this widget with that specific device so that i can view only what is this device sending and receiving
and i wanted my widget to be universal for monitoring any kind of communication
As i said, i have a working solution, but i dont like that i have to edit classes for all devices, and to add a new "dataReceived" signal
If it would be possible to "duplicate" connections of one specific receive slot, to another receive slot (of widget), that would solve my problem easy.
Now i have to edit class files for all devices to implement this new behaviour, to reemit signal when data is received, for monitoring widget (if there is one attached).
I just had a feeling that i could do this without editing the device class, and with having only the pointer of the device before showing the widget.
I hope that this explanation didn't isnt unclear as previous ones.
summary: i need to filter comunication from specific serial port, and tho show data for and from a specific device connected to it.
Bookmarks