Index: sources/canbus/MessageBuilder.cpp =================================================================== diff -u -r052c794d6a8db55a2fbfdad172275af073ee54c3 -rfc329c788fe9453983072bee937ccbc95b4ed6e4 --- sources/canbus/MessageBuilder.cpp (.../MessageBuilder.cpp) (revision 052c794d6a8db55a2fbfdad172275af073ee54c3) +++ sources/canbus/MessageBuilder.cpp (.../MessageBuilder.cpp) (revision fc329c788fe9453983072bee937ccbc95b4ed6e4) @@ -37,7 +37,7 @@ * \details This method builds list of frames out of the vActions of type GuiActionType * and vData of type QByteArray which has been requested to be sent by UI. * The message will be chopped into 8 bytes frames to be able to be send - * by fixed length CANBUS protocol. + * by fixed length CANBus protocol. * \param vAction - The ActionID of the requested message. * \param vData - The payload of the message. * \param vFrameList - The list of frames which has been created by vAction and vData to be sent. @@ -169,7 +169,7 @@ * \brief MessageBuilder::addPadding * \details This method is appending bytes containing 0x00 * to keep the length of the frame 8 bytes. - * \param vPayload - The payload of the CANBUS message + * \param vPayload - The payload of the CANBus message */ void MessageBuilder::addPadding(QByteArray &vPayload) { @@ -242,12 +242,12 @@ /*! * \brief MessageBuilder::buildMessage * \details Builds Message out of vPayload of type QByteArray - * by adding Sync byte, ActionID(MessageID), data length, data, CANBUS channel id for header + * by adding Sync byte, ActionID(MessageID), data length, data, CANBus channel id for header * and keeps collecting data from payload up until the specified length. - * \param vPayload - The payload of the CANBUS message + * \param vPayload - The payload of the CANBus message * \param vMessage - The Message variable which is going to be built - * \param vCan_Id - The CANBUS frame channel id - * \return false if the payload doesn't contain sync byte (Payload_Data::ePayload_Sync) + * \param vCan_Id - The CANBus frame channel id + * \return false if the payload does not contain sync byte (Payload_Data::ePayload_Sync) */ bool MessageBuilder::buildMessage(const QByteArray &vPayload, Message &vMessage, Can_Id vCan_Id) { @@ -256,7 +256,7 @@ if (hasSyncByte(mPayload)) { // Got header consoleOut(vPayload, true, vCan_Id); vMessage.can_id = vCan_Id; - vMessage.head = getHeader (mPayload); // keep header before taking it out of the payload. doesn't affect payload + vMessage.head = getHeader (mPayload); // keep header before taking it out of the payload. does not affect payload vMessage.sequence = getSequence (mPayload); vMessage.actionId = static_cast(getActionId(mPayload)); vMessage.length = getLength (mPayload); @@ -323,7 +323,7 @@ * \brief MessageBuilder::getSequence * \details Extract the 2 bytes of the sequence * out of the vPayload of type QByteArray - * \param vPayload - The payload of the CANBUS message + * \param vPayload - The payload of the CANBus message * \return Returns ActionId of type GuiActionType * \note Removes the 2 bytes of ActionID from vPayload * It starts from the first byte so those 2 bytes should be the first 2 bytes. @@ -342,10 +342,10 @@ * \details Collect the 3 bytes (Frame_Data::eLenHeaderInfo) * as header portion of the payload * which is the MessageID (2 bytes) , data length (1 byte) - * It doesn't contain sync byte (Payload_Data::ePayload_Sync) + * It does not contain sync byte (Payload_Data::ePayload_Sync) * as this value will be used for crc8 calculation - * and that doesn't include sync byte (Payload_Data::ePayload_Sync) - * \param vPayload - The payload of the CANBUS message + * and that does not include sync byte (Payload_Data::ePayload_Sync) + * \param vPayload - The payload of the CANBus message * \return Returns 3 byte of header data of type QByteArray * \note As it's obvious from the function parameter it's not changing the vPayload * Just has been mentioned to be consistent with the other methods of buildMessage. @@ -368,7 +368,7 @@ * \brief MessageBuilder::getActionId * \details Extracts the 2 bytes ActionID (Frame_Data::eLenActionId) * out of the vPayload of type QByteArray - * \param vPayload - The payload of the CANBUS message + * \param vPayload - The payload of the CANBus message * \return Returns ActionId of type GuiActionType * \note Removes the 2 bytes of ActionID from vPayload * It starts from the first byte so those 2 bytes should be the first 2 bytes. @@ -384,10 +384,10 @@ * \brief MessageBuilder::getLength * \details Extracts the 1 byte data length out of the vPayload * and removes the first 1 byte - * \param vPayload - The payload of the CANBUS message + * \param vPayload - The payload of the CANBus message * \return returns the length of the data which is added by 1 to include 1 byte crc * \note the length of the data should not be more than 255 which requires 1 byte only - * so technically it doesn't need to return a value of type more than 1 byte + * so technically it does not need to return a value of type more than 1 byte * But some room reserved for later huge buffer passing * And also as 1 byte crc8 is included as part of data * it make it 256 which is going to be more than a byte. @@ -408,7 +408,7 @@ * if vLen is less or equal to Frame_Data::eLenMaxHeaderData * it gets data of first byte up to the len of vLen * otherwise returns the whole vPayload as the data - * \param vPayload - The payload of the CANBUS message + * \param vPayload - The payload of the CANBus message * \param vLen - the length of the data * \return The data to be returned */ @@ -428,11 +428,11 @@ * \details Sends out formatted message to the console * for debugging purposes. * Since this method is only formatting the payload - * and doesn't extract the content of the payload + * and does not extract the content of the payload * it gets required information from outside through it's parameters. - * \param vPayload - The payload of the CANBUS message + * \param vPayload - The payload of the CANBus message * \param vIsHeader - Should be sent as true if this payload contains header data - * \param vCan_Id - CANBUS channel id + * \param vCan_Id - CANBus channel id * \param vUseColor - Use coloring or just space formatted output * if vUseColor passed true is uses different color for Sync byte, MessageID & data */