Index: sources/canbus/caninterface.cpp =================================================================== diff -u -r460df093c4475816fc25d6b4c3ebfc50424ccca3 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/canbus/caninterface.cpp (.../caninterface.cpp) (revision 460df093c4475816fc25d6b4c3ebfc50424ccca3) +++ sources/canbus/caninterface.cpp (.../caninterface.cpp) (revision fee7fabf49befb065c89248c19e15efc9ca194e4) @@ -1,6 +1,6 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * Copyright (c) 2019-2019 Diality Inc. - All Rights Reserved. * \copyright \n * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, \n * IN PART OR IN WHOLE, \n @@ -32,9 +32,9 @@ CanInterface::CanInterface(QObject *parent) : QObject(parent) { } /*! - * \brief CanInterface Initialization - * \details Initializes the CANBUS and check if can be connected - * \return true if connected false otherwise + * \brief CanInterface Initialization + * \details Initializes the CANBUS and checks if can be connected + * \return true if connected, false otherwise */ bool CanInterface::init() { @@ -60,19 +60,19 @@ } /*! - * \brief CanInterface status + * \brief CanInterface status * \details CanInterface status description - * \return + * \return The current stores status */ QString CanInterface::status() const { return _canStatus; } /*! - * \brief CanInterface connection + * \brief CanInterface connections definition * \details Initializes the required signal/slot connection between this class and other objects\n - * to be able to communicate. + * to be able to communicate. */ void CanInterface::initConnections() { @@ -92,10 +92,10 @@ } /*! - * \brief CanInterface status + * \brief CanInterface status * \details Sets the Can interface status description - * \param vDescription Description about the Can Interface error - * \param vError Qt Can Interface Error + * \param vDescription - Description about the CANBUS Interface errors + * \param vError - Qt CANBUS Interface Error */ void CanInterface::status(const QString &vDescription, QString vError) { @@ -116,16 +116,23 @@ } /*! - * \brief CanInterface send - * \details send a frame over the CAN Bus - * \param vFrame CAN message frame + * \brief CanInterface send + * \details send a frame over the CANBUS + * \param vFrame - CANBUS message frame */ bool CanInterface::transmit(const QCanBusFrame &vFrame) { if( !_canDevice ) return false; - return _canDevice->writeFrame(vFrame);} + return _canDevice->writeFrame(vFrame); +} +/*! + * \brief CanInterface console Output messaging \n + * \details Sends out formatted CANBUS message to the console \n + * for debugging purposes. \n + * \param vFrame - The CANBUS frame to be sent out \n + */ void CanInterface::consoleOut(const QCanBusFrame &vFrame) { if ( ! _enableConsoleOut ) return; @@ -145,8 +152,8 @@ } /*! - * \brief CanInterface quit - * \details Quit the Can Interface by disconnecting the bus and device. + * \brief CanInterface quit + * \details Quit the CANBUS Interface by disconnecting the bus and device. */ void CanInterface::quit() { @@ -161,29 +168,29 @@ } /*! - * \brief frameFlags - * \details Can message frame type as flags - * \param frame Can message frame - * \return Frame flag + * \brief frameFlags + * \details CANBUS message frame type as flags + * \param vFrame - CANBUS message frame + * \return Frame flag as QString */ -QString CanInterface::frameFlags(const QCanBusFrame &frame) +QString CanInterface::frameFlags(const QCanBusFrame &vFrame) { QString result = QLatin1String(" --- "); - if (frame.hasBitrateSwitch()) + if (vFrame.hasBitrateSwitch()) result[1] = QLatin1Char('B'); - if (frame.hasErrorStateIndicator()) + if (vFrame.hasErrorStateIndicator()) result[2] = QLatin1Char('E'); - if (frame.hasLocalEcho()) + if (vFrame.hasLocalEcho()) result[3] = QLatin1Char('L'); return result; } /*! - * \brief CanInterface onError + * \brief CanInterface onError * \details Can Bus error handler which sets the can status description - * \param vError CanBus error + * \param vError - CANBUS error */ void CanInterface::onFrameError(QCanBusDevice::CanBusError vError) { @@ -202,12 +209,12 @@ } /*! - * \brief CanInterface::onFrameWrittern - * \details This is the slot connected to the signal - * which is emitted every time a payload of frames - * has been written to the CAN bus. - * \param vFramesCount The framesCount argument is set to the number of frames - * that were written in this payload. + * \brief CanInterface::onFrameWrittern \n + * \details This is the slot connected to the signal \n + * which is emitted every time a payload of frames \n + * has been written to the CANBUS bus. \n + * \param vFramesCount - The framesCount argument is set to the number of frames \n + * that were written in this payload. \n */ void CanInterface::onFrameWrittern(qint64 /*vFramesCount*/) { @@ -216,8 +223,8 @@ } /*! - * \brief CanInterface onRead - * \details CanBus read handler + * \brief CanInterface onFrameReceived + * \details CANBUS message read handler */ void CanInterface::onFrameReceive () { @@ -232,10 +239,10 @@ } /*! - * \brief CanInterface onActionPerform - * \details sends a Can message frame of the can message of the performed action - * This is a response from application UI to HD device - * \param vFrame Can message frame + * \brief CanInterface onActionPerform + * \details sends a CANBUS message frame of the CANBUS message of the performed action + * This is a response from application UI to HD device + * \param vFrame - CANBUS message frame */ void CanInterface::onFrameTransmit(const QCanBusFrame &vFrame) {