SynchroTime
|
Interface The base class Interface provides for the communication between Bootloader Client and Host Device. More...
#include <interface.h>
Signals | |
void | infoMessage (const QVariant &message) const |
void | debugMessage (const QVariant &message) const |
void | errorMessage (const QVariant &message) const |
Public Member Functions | |
Interface (QObject *parent=0) | |
Interface::Interface Constructor of the class Interface for creating objects with default values. More... | |
virtual qint64 | writeTheData (const QByteArray &)=0 |
virtual bool | readTheData (const quint32, const quint32 bytes=0U)=0 |
virtual QIODevice * | getSocket (void)=0 |
virtual void | initSocket (void)=0 |
virtual bool | openSocket (void)=0 |
virtual void | closeSocket (void)=0 |
void | setBlockSize (const quint16 size) |
Interface::setBlockSize. More... | |
quint16 | getBlockSize (void) const |
Interface::getBlockSize. More... | |
quint32 | getReceivedBytes (void) const |
Interface::getReceivedBytes. More... | |
void | setTimer (QTimer *timer) |
Interface::setTimer. More... | |
QTimer * | getTimer (void) |
Interface::getTimer. More... | |
void | setTimeout (quint32 time) |
Interface::setTimeout. More... | |
quint32 | getTimeout (void) const |
Interface::getTimeout. More... | |
QByteArray & | getReceivedData (void) |
Interface::getReceivedData. More... | |
Public Member Functions inherited from Base | |
Base (QObject *parent=0) | |
Base::Base. More... | |
virtual QString | getClassName (void) |
Base::getClassName. More... | |
QTextStream & | stdOutput (void) |
Base::stdOutput. More... | |
Private Attributes | |
QTimer * | timer |
Timer for Time-out method. More... | |
quint32 | timeout |
The timeout interval in milliseconds. More... | |
quint16 | blockSize |
Size of the data block for the communication protocol. More... | |
QByteArray | receivedData |
The received data. More... | |
Interface The base class Interface provides for the communication between Bootloader Client and Host Device.
Base class interface provides two virtual methods for sending and receiving the instructions and the data. ( Interface::writeTheData Interface::readTheData ) These virtual methods are implemented in the other derived classes.
|
explicit |
Interface::Interface Constructor of the class Interface for creating objects with default values.
Create a instance of the class and call following init methods:
[in] | parent | Pointer to the parent object used for QObject |
|
pure virtual |
Implemented in InterfaceSP.
Referenced by handleAdjustmentRequest(), handleCalibrationRequest(), handleInformationRequest(), handleResetRequest(), and handleSetRegisterRequest().
|
signal |
|
signal |
quint16 Interface::getBlockSize | ( | void | ) | const |
Gets the size of the data block of the communication protocol.
References blockSize.
Referenced by InterfaceSP::writeTheData().
quint32 Interface::getReceivedBytes | ( | void | ) | const |
Gets the number of the received bytes.
References receivedData.
Referenced by InterfaceSP::readTheData().
QByteArray & Interface::getReceivedData | ( | void | ) |
Returns the received Data from the communication port.
References receivedData.
Referenced by Tests::Case16(), Tests::Case17(), handleAdjustmentRequest(), handleCalibrationRequest(), handleInformationRequest(), InterfaceSP::handleReadyRead(), handleResetRequest(), handleSetRegisterRequest(), InterfaceSP::readTheData(), and InterfaceSP::writeTheData().
|
pure virtual |
Implemented in InterfaceSP.
quint32 Interface::getTimeout | ( | void | ) | const |
Returns the Interval for a time-out in milliseconds.
References timeout.
Referenced by InterfaceSP::handleReadyRead(), InterfaceSP::handleTimeout(), InterfaceSP::init(), and InterfaceSP::writeTheData().
QTimer * Interface::getTimer | ( | void | ) |
Returns the Pointer of object Timer.
References timer.
Referenced by InterfaceSP::handleReadyRead(), InterfaceSP::init(), and InterfaceSP::writeTheData().
|
signal |
|
pure virtual |
Implemented in InterfaceSP.
|
pure virtual |
Implemented in InterfaceSP.
Referenced by handleAdjustmentRequest(), handleCalibrationRequest(), handleInformationRequest(), handleResetRequest(), and handleSetRegisterRequest().
|
pure virtual |
Implemented in InterfaceSP.
Referenced by handleAdjustmentRequest(), handleCalibrationRequest(), handleInformationRequest(), handleResetRequest(), and handleSetRegisterRequest().
void Interface::setBlockSize | ( | const quint16 | size | ) |
Sets the size of the data block for the communication protocol.
size | of typ const quint16 |
References blockSize.
void Interface::setTimeout | ( | quint32 | interval | ) |
Set the Interval for a time-out in milliseconds.
interval | of the type quint32. |
References timeout.
Referenced by InterfaceSP::init().
void Interface::setTimer | ( | QTimer * | timer | ) |
Set the Pointer of new object Timer.
timer | of the type QTimer*. |
References timer.
Referenced by InterfaceSP::init().
|
pure virtual |
Implemented in InterfaceSP.
Referenced by handleAdjustmentRequest(), handleCalibrationRequest(), handleInformationRequest(), handleResetRequest(), and handleSetRegisterRequest().
|
private |
Size of the data block for the communication protocol.
Referenced by getBlockSize(), and setBlockSize().
|
private |
The received data.
Referenced by getReceivedBytes(), and getReceivedData().
|
private |
The timeout interval in milliseconds.
Referenced by getTimeout(), and setTimeout().
|
private |
Timer for Time-out method.
Referenced by getTimer(), and setTimer().