12 #ifndef COMMUNICATION_HH
13 #define COMMUNICATION_HH
16 #include <QSerialPort>
const FrameBuffer & getFrameBuffer() const
Get unmodifiable frame buffer.
void receiveData()
Receive line one by one in loop until end of communication.
std::string _deviceName
Serial device name.
FrameBuffer & useFrameBuffer()
Get modifiable frame buffer.
bool closeSerialPort()
Close serial port.
~Communication()
Destruct Communication object.
QSerialPort * _device
Serial device handle.
bool _continue
Identifier whether to continue communicating with the serial.
Communication()
Construct new Communication object.
void setDevice(QSerialPort *device)
Set serial device.
void setDeviceName(const std::string &name)
Set serial device name.
bool openSerialPort()
Wraper function for opening serial port.
void setStatus(QLabel *statusBar)
Set status of port openning on status bar.
void endCommunication()
End communicaiton with serial device.
bool isOpen()
Check wether serial poet is open.
bool toContinue() const
Check wether to continue communication with serial device.
FrameBuffer _frame
Frames buffer.
bool _opened
Identifier whether serial device is open.
Header file for FrameBuffer class.