Index: sources/canbus/caninterface.h =================================================================== diff -u -r460df093c4475816fc25d6b4c3ebfc50424ccca3 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/canbus/caninterface.h (.../caninterface.h) (revision 460df093c4475816fc25d6b4c3ebfc50424ccca3) +++ sources/canbus/caninterface.h (.../caninterface.h) (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 @@ -30,11 +30,13 @@ namespace Can { /*! - * \brief CanBus interface - * \details This class contains the interface to CanBus\n - * And utilizes Qt QCanBus to interact with the CanBus\n - * On the OS side there is a driver installed to convert SPI to CAN\n - * Since the GUI Board by itself doesn't contain the CAN Bus. + * \brief CANBUS interface + * \details This class contains the interface to CANBUS \n + * And utilizes Qt QCanBus to interact with the CANBUS \n + * This class works only with the QCanBusFrame frames. \n + * On the OS side there is a driver installed to convert SPI to CAN \n + * Since the GUI Board by itself doesn't contain the CAN Bus. \n + * Application would know nothing about the SPI-TO-CAN \n */ class CanInterface : public QObject { @@ -53,6 +55,7 @@ qint64 _numberFramesWritten = 0; QString _canStatus = ""; bool _enableConsoleOut = false; + // Singleton SINGLETON_DECL(CanInterface) public: @@ -68,11 +71,27 @@ bool transmit (const QCanBusFrame &vFrame); void consoleOut (const QCanBusFrame &vFrame); - static QString frameFlags(const QCanBusFrame &frame); + static QString frameFlags(const QCanBusFrame &vFrame); signals: + /*! + * \brief didFrameReceive + * \details This signal will be emitted when a frame has been received + * \param vFrame - The Frame which has been received + */ void didFrameReceive (const QCanBusFrame &vFrame ); + /*! + * \brief didFrameError + * \details If and error occurs on CanDevice after the error is processed + * this signal can be used as a notifier. + * \param vStatus - CanDevice status with some extra information. + */ void didFrameError (const QString &vStatus); + /*! + * \brief didFrameTransmit + * \details After the frame has been transmitted this signal can be used as a notifier. + * \param ok - is true if the frame has been transmitted successfully + */ void didFrameTransmit(bool ok); public slots: