Index: sources/canbus/messagedispatcher.cpp =================================================================== diff -u -rc5389647e2259e67f8e6d923f3481d7d3f4eab68 -rb5c381df9625b215d27649976825c64a4c4ca4f0 --- sources/canbus/messagedispatcher.cpp (.../messagedispatcher.cpp) (revision c5389647e2259e67f8e6d923f3481d7d3f4eab68) +++ sources/canbus/messagedispatcher.cpp (.../messagedispatcher.cpp) (revision b5c381df9625b215d27649976825c64a4c4ca4f0) @@ -41,8 +41,8 @@ /*! * \brief Message Handler connections definition - * \details Initializes the required signal/slot connection between this class and other objects\n - * to be able to communicate. + * \details Initializes the required signal/slot connection between this class and other objects + * to be able to communicate. */ void MessageDispatcher::initConnections() { @@ -59,6 +59,11 @@ this , SLOT(onMainTimerTimeout())); } +/*! + * \brief MessageDispatcher::keepAlive + * \details This is the message which has to be send over the CANBUS + * as an monitor for other nodes on the bus to notify UI is alive + */ void MessageDispatcher::keepAlive() { #ifndef DISABLE_KEEP_ALIVE @@ -68,6 +73,16 @@ #endif } +/*! + * \brief MessageDispatcher::onFrameReceive + * \details Upon message has been received over CANBUS this slot will be called + * by MessageHandler::didFrameReceive signal to process the frame + * Upon completion of collected all the required frames + * on successful interpretation of the message, emits didActionReceived signal. + * The message will be removed from list of the channel vCan_Id messages. + * \param vCanId - CANBUS channel of the frame + * \param vPayload - Payload of the frame + */ void MessageDispatcher::onFrameReceive(Can_Id vCanId, const QByteArray &vPayload) { // Append a message to the list @@ -93,11 +108,26 @@ } } +/*! + * \brief MessageDispatcher::onActionTransmit + * \details This slot will be called by ApplicationController::didActionTransmit + * upon UI message transmit request and calls MessageDispatcher::actionTransmit method. + * \param vActionId - The ActionID of the message + * \param vData - The data of the Message + */ void MessageDispatcher::onActionTransmit(GuiActionType vActionId, const QVariantList &vData) { actionTransmit(vActionId, vData); } +/*! + * \brief MessageDispatcher::actionTransmit + * \details This method is called by slot MessageDispatcher::onActionTransmit + * which emits didFrameTransmit on successful interpretation of the requested message + * and successfully creating of frame(s). + * \param vActionId - The ActionID of the message + * \param vData - The data of the Message + */ void MessageDispatcher::actionTransmit(GuiActionType vActionId, const QVariantList &vData) { QByteArray mData; @@ -116,6 +146,11 @@ } } +/*! + * \brief MessageDispatcher::onMainTimerTimeout + * \details This slot is called by MainTimer::didTimeout each second + * to call required methods like keepAlive + */ void MessageDispatcher::onMainTimerTimeout() { //QMetaObject::invokeMethod(this, "checked_in");