Index: sources/canbus/caninterface.cpp =================================================================== diff -u -rd6c7d6c382fe56e19d132f6ba0bcbbc1e6b2060f -r2085b749d1d0aafe823e840f5aa0bc88a340798a --- sources/canbus/caninterface.cpp (.../caninterface.cpp) (revision d6c7d6c382fe56e19d132f6ba0bcbbc1e6b2060f) +++ sources/canbus/caninterface.cpp (.../caninterface.cpp) (revision 2085b749d1d0aafe823e840f5aa0bc88a340798a) @@ -47,7 +47,7 @@ _numberFramesWritten = 0; - connection(); + initConnections(); if (!_canDevice->connectDevice()) { status(tr("Error: Connection")); @@ -74,18 +74,17 @@ * \details Initializes the required signal/slot connection between this class and other objects\n * to be able to communicate. */ -void CanInterface::connection() +void CanInterface::initConnections() { if (_canDevice) { - connect(_canDevice, SIGNAL(framesReceived()), - this , SLOT ( onRead())); - connect(_canDevice, SIGNAL(errorOccurred(QCanBusDevice::CanBusError)), - this , SLOT ( onError(QCanBusDevice::CanBusError))); + connect(_canDevice, SIGNAL( framesReceived()), + this , SLOT (onFrameReceive ())); + + connect(_canDevice, SIGNAL( errorOccurred(QCanBusDevice::CanBusError)), + this , SLOT (onError (QCanBusDevice::CanBusError))); } - connect(_MessageHandler, SIGNAL(didActionPerform(QCanBusFrame)), - this , SLOT( onActionPerform(QCanBusFrame))); - connect(_MessageHandler, SIGNAL(didActionRequest(QCanBusFrame)), - this , SLOT( onActionRequest(QCanBusFrame))); + connect(_MessageHandler, SIGNAL(didFrameTransmit(QCanBusFrame)), + this , SLOT( onFrameTransmit(QCanBusFrame))); } /*! @@ -116,7 +115,7 @@ * \details send a frame over the CAN Bus * \param vFrame CAN message frame */ -void CanInterface::send(const QCanBusFrame &vFrame) +void CanInterface::transmit(const QCanBusFrame &vFrame) { if( !_canDevice ) return; @@ -184,7 +183,7 @@ * \brief CanInterface onRead * \details CanBus read handler */ -void CanInterface::onRead() +void CanInterface::onFrameReceive () { if (!_canDevice) return; @@ -219,21 +218,8 @@ * This is a response from application UI to HD device * \param vFrame Can message frame */ -void CanInterface::onActionPerform(const QCanBusFrame &vFrame) +void CanInterface::onFrameTransmit(const QCanBusFrame &vFrame) { // TODO : Process Frame - send(vFrame); + transmit(vFrame); } - -/*! - * \brief CanInterface onActionRequest - * \details sends a Can message frame of the can message of the requested action - * This is a request for action from application UI to HD device - * \param vFrame Can message frame - */ -void CanInterface::onActionRequest(const QCanBusFrame &vFrame) -{ - // TODO : Process Frame - send(vFrame); -} -