SynchroTime
Signals | Public Member Functions | Private Attributes | List of all members
Interface Class Referenceabstract

Interface The base class Interface provides for the communication between Bootloader Client and Host Device. More...

#include <interface.h>

Inheritance diagram for Interface:
Inheritance graph
Collaboration diagram for Interface:
Collaboration graph

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

QT_USE_NAMESPACE Interface::Interface ( QObject *  parent = 0)
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:

  1. Interface::init()
Parameters
[in]parentPointer to the parent object used for QObject

Member Function Documentation

virtual void Interface::closeSocket ( void  )
pure virtual

Implemented in InterfaceSP.

Referenced by handleAdjustmentRequest(), handleCalibrationRequest(), handleInformationRequest(), handleResetRequest(), and handleSetRegisterRequest().

Here is the caller graph for this function:

void Interface::debugMessage ( const QVariant &  message) const
signal
void Interface::errorMessage ( const QVariant &  message) const
signal

Referenced by InterfaceSP::handleTimeout().

Here is the caller graph for this function:

quint16 Interface::getBlockSize ( void  ) const

Interface::getBlockSize.

Gets the size of the data block of the communication protocol.

Returns
blockSize of the type quint16.

References blockSize.

Referenced by InterfaceSP::writeTheData().

Here is the caller graph for this function:

quint32 Interface::getReceivedBytes ( void  ) const

Interface::getReceivedBytes.

Gets the number of the received bytes.

Returns
receivedBytes of the type quint32.

References receivedData.

Referenced by InterfaceSP::readTheData().

Here is the caller graph for this function:

QByteArray & Interface::getReceivedData ( void  )

Interface::getReceivedData.

Returns the received Data from the communication port.

Returns
receivedData of the type QByteArray&.

References receivedData.

Referenced by Tests::Case16(), Tests::Case17(), handleAdjustmentRequest(), handleCalibrationRequest(), handleInformationRequest(), InterfaceSP::handleReadyRead(), handleResetRequest(), handleSetRegisterRequest(), InterfaceSP::readTheData(), and InterfaceSP::writeTheData().

Here is the caller graph for this function:

virtual QIODevice* Interface::getSocket ( void  )
pure virtual

Implemented in InterfaceSP.

quint32 Interface::getTimeout ( void  ) const

Interface::getTimeout.

Returns the Interval for a time-out in milliseconds.

Returns
timeout of the type quint32.

References timeout.

Referenced by InterfaceSP::handleReadyRead(), InterfaceSP::handleTimeout(), InterfaceSP::init(), and InterfaceSP::writeTheData().

Here is the caller graph for this function:

QTimer * Interface::getTimer ( void  )

Interface::getTimer.

Returns the Pointer of object Timer.

Returns
*timer of the type QTimer.

References timer.

Referenced by InterfaceSP::handleReadyRead(), InterfaceSP::init(), and InterfaceSP::writeTheData().

Here is the caller graph for this function:

void Interface::infoMessage ( const QVariant &  message) const
signal
virtual void Interface::initSocket ( void  )
pure virtual

Implemented in InterfaceSP.

virtual bool Interface::openSocket ( void  )
pure virtual

Implemented in InterfaceSP.

Referenced by handleAdjustmentRequest(), handleCalibrationRequest(), handleInformationRequest(), handleResetRequest(), and handleSetRegisterRequest().

Here is the caller graph for this function:

virtual bool Interface::readTheData ( const quint32  ,
const quint32  bytes = 0U 
)
pure virtual

Implemented in InterfaceSP.

Referenced by handleAdjustmentRequest(), handleCalibrationRequest(), handleInformationRequest(), handleResetRequest(), and handleSetRegisterRequest().

Here is the caller graph for this function:

void Interface::setBlockSize ( const quint16  size)

Interface::setBlockSize.

Sets the size of the data block for the communication protocol.

Parameters
sizeof typ const quint16

References blockSize.

void Interface::setTimeout ( quint32  interval)

Interface::setTimeout.

Set the Interval for a time-out in milliseconds.

Parameters
intervalof the type quint32.

References timeout.

Referenced by InterfaceSP::init().

Here is the caller graph for this function:

void Interface::setTimer ( QTimer *  timer)

Interface::setTimer.

Set the Pointer of new object Timer.

Parameters
timerof the type QTimer*.

References timer.

Referenced by InterfaceSP::init().

Here is the caller graph for this function:

virtual qint64 Interface::writeTheData ( const QByteArray &  )
pure virtual

Implemented in InterfaceSP.

Referenced by handleAdjustmentRequest(), handleCalibrationRequest(), handleInformationRequest(), handleResetRequest(), and handleSetRegisterRequest().

Here is the caller graph for this function:

Member Data Documentation

quint16 Interface::blockSize
private

Size of the data block for the communication protocol.

Referenced by getBlockSize(), and setBlockSize().

QByteArray Interface::receivedData
private

The received data.

Referenced by getReceivedBytes(), and getReceivedData().

quint32 Interface::timeout
private

The timeout interval in milliseconds.

Referenced by getTimeout(), and setTimeout().

QTimer* Interface::timer
private

Timer for Time-out method.

Referenced by getTimer(), and setTimer().


The documentation for this class was generated from the following files: