Hey waynew!
Could I possibly take a sneek peek at your code?
The problem is that I've derived my code from the examples. Unfortunately, there is no example that implements both the sending and receiving ability of the class and the sreader (creates a slot that is activated when data is received) is mostly implemented in a .h file.
I use the sreader.h (located in the examples folder) as is with the exception of the ReadOnly changed to ReadWrite.
What I then try to do is to reach the QSerialDevice that is defined in sreader.h from the mainwindow.cpp. This is a standard GUI application with a mainwindow with a button connected to the slot (sendButtonClickHandler). When this buttn is clicked I want to send The Character "A" on the bus. This code works in the example "writer" but in that file "MyDevice" is defined in the same file...
The code looks like this:
void MainWindow::sendButtonClickHandler()
{
qint64 bw = 0; //bytes really writed
//bw = 0;
bw = MyDevice->write(ba);
std::cout << bw;
}
void MainWindow::sendButtonClickHandler()
{
QByteArray ba("A"); //data to send
qint64 bw = 0; //bytes really writed
//bw = 0;
bw = MyDevice->write(ba);
std::cout << bw;
}
To copy to clipboard, switch view to plain text mode
As I said earlier when I try using Reader::MyDevice it says that Reader is not a class...
Cheers!
/Tottish
Bookmarks