Index: sources/canbus/messageinterpreter.cpp =================================================================== diff -u -r0e528e5f706308c7b0e8f22a4d9dbb5b5715db7c -ree50b509107a743f6133a33371e18646ff9c10b2 --- sources/canbus/messageinterpreter.cpp (.../messageinterpreter.cpp) (revision 0e528e5f706308c7b0e8f22a4d9dbb5b5715db7c) +++ sources/canbus/messageinterpreter.cpp (.../messageinterpreter.cpp) (revision ee50b509107a743f6133a33371e18646ff9c10b2) @@ -36,9 +36,9 @@ /*! * \brief MessageInterpreter::notify - * \details Checks and Prepaires the model with the Message Data - * Regarding the type of message logs the message recived. - * Notofies observers by emiting the didActionReceive( < Data > ) signal + * \details Checks and prepares the model with the Message Data + * Regarding the type of message logs the message received. + * Notifies observers by emitting the didActionReceive( < Data > ) signal * \param vMessage - The Denali message * \param vID - The Message ID to be checked against * \param vModel - The appropriate model for the Message Data @@ -55,7 +55,7 @@ tModel.toVariantList(vData); // coco begin validated : Tested manually. This code will never go false // because the isValidMessage is catching errors. - // only is checking here for developer safty if logic has changed. + // only is checking here for developer safety if logic has changed. if ( ! ok ) return false; // coco end emit didActionReceive(tModel.data()); @@ -81,8 +81,8 @@ /*! * \brief MessageInterpreter::isPayloadLenValid - * \details Checks if the Data length has been defined for this type od messsage - * if not logs Undefind Data Length error + * \details Checks if the Data length has been defined for this type of message + * if not logs Undefined Data Length error * if defined checks if the correct length of data is provided for this type of message. * if not logs Incorrect Data Length error * otherwise returns true @@ -104,16 +104,21 @@ return true; } +/*! + * \brief MessageInterpreter::logInvalidLength + * \details Logs invalid data length for the message type vActionId + * \param vActionId - Message Type + */ void MessageInterpreter::logInvalidLength(const Gui::GuiActionType &vActionId) { QString mActionIdHexString = Format::toHexString(vActionId); - LOG_DEBUG(QString("Incorrect data length for trsansmit Message with ID '%1'") + LOG_DEBUG(QString("Incorrect data length for transmit message with ID '%1'") .arg(mActionIdHexString)); } /*! * \brief MessageInterpreter::validateMessage - * \details Validate the messgae by checking its type and data + * \details Validate the message by checking its type and data * \param vMessage - The message * \param vType - The type of the message to be checked against * \return true on valid massage @@ -138,15 +143,15 @@ QString mActionIdHexString = Format::toHexString(vMessage.actionId, false, eLenMessageIDDigits); QString logMessage = tr("Unhandled Message ID (HD)") + '\n' + QString("%1 # %2 %3") - .arg(int(vMessage.can_id), 3, 16, QChar('0')) - .arg(mActionIdHexString) - .arg(QString(vMessage.data.toHex('.'))); + .arg(int(vMessage.can_id), 3, 16, QChar('0')) + .arg(mActionIdHexString) + .arg(QString(vMessage.data.toHex('.'))); LOG_DEBUG(logMessage); } /*! * \brief MessageInterpreter::logReceived - * \details Regarding the type of message logs the message recived. + * \details Regarding the type of message logs the message received. * \param vModel - the MAbstract model type */ void MessageInterpreter::logReceivedMessage(const Model::MAbstract &vModel) @@ -282,7 +287,7 @@ case eChlid_DG_HD : case eChlid_DG_UI : - // case eChlid_DG_Alarm: // commented out for now. Currentlyh there is no message in this category. + // case eChlid_DG_Alarm: // commented out for now. Currently there is no message in this category. case eChlid_DG_Sync : ok = interpretMessage_DG(vMessage, vData); break; default: @@ -387,7 +392,7 @@ case Gui::GuiActionType::ID_DGTemperaturesData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGTemperaturesData ); break; case Gui::GuiActionType::ID_DGDebugText : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGDebugText ); break; - // unhandles messages: these will only be logged as received message + // unhandled messages: these will only be logged as received message // there has nothing been defined for these messages. default: printUnhandled (vMessage);