Index: main.cpp =================================================================== diff -u -r4c1551d45b40987c2d59c11e95760e9b6c55fc68 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- main.cpp (.../main.cpp) (revision 4c1551d45b40987c2d59c11e95760e9b6c55fc68) +++ main.cpp (.../main.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 @@ -98,8 +98,12 @@ //! - Initializing Application Controller _ApplicationController->init(); + QObject::connect(&app, &QApplication::aboutToQuit, []() { + emit _ApplicationController->quit(); + }); QObject::connect(_ApplicationController, &ApplicationController::quit, &app, [](int retcode) { - //qDebug() << "Application Terminated:" << retcode; + qDebug() << "Application Terminated:" << retcode; + _CanInterface->quit(); QCoreApplication::exit(retcode); }, Qt::QueuedConnection); Index: sources/applicationcontroller.cpp =================================================================== diff -u -r1732e83d2a0308b9c706f37d6d7724a364bbff2a -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/applicationcontroller.cpp (.../applicationcontroller.cpp) (revision 1732e83d2a0308b9c706f37d6d7724a364bbff2a) +++ sources/applicationcontroller.cpp (.../applicationcontroller.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 Index: sources/applicationcontroller.h =================================================================== diff -u -r272bb81655222b2bf0c3c7099523c0b658eb9cb8 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/applicationcontroller.h (.../applicationcontroller.h) (revision 272bb81655222b2bf0c3c7099523c0b658eb9cb8) +++ sources/applicationcontroller.h (.../applicationcontroller.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 Index: sources/applicationpost.cpp =================================================================== diff -u -r5194f3afffb28dac90a7ca4153b6a0ca2f239387 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/applicationpost.cpp (.../applicationpost.cpp) (revision 5194f3afffb28dac90a7ca4153b6a0ca2f239387) +++ sources/applicationpost.cpp (.../applicationpost.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 Index: sources/applicationpost.h =================================================================== diff -u -r5194f3afffb28dac90a7ca4153b6a0ca2f239387 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/applicationpost.h (.../applicationpost.h) (revision 5194f3afffb28dac90a7ca4153b6a0ca2f239387) +++ sources/applicationpost.h (.../applicationpost.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 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) { 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: Index: sources/canbus/messagebuilder.cpp =================================================================== diff -u -r4c1551d45b40987c2d59c11e95760e9b6c55fc68 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/canbus/messagebuilder.cpp (.../messagebuilder.cpp) (revision 4c1551d45b40987c2d59c11e95760e9b6c55fc68) +++ sources/canbus/messagebuilder.cpp (.../messagebuilder.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 * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, * IN PART OR IN WHOLE, Index: sources/canbus/messagebuilder.h =================================================================== diff -u -r460df093c4475816fc25d6b4c3ebfc50424ccca3 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/canbus/messagebuilder.h (.../messagebuilder.h) (revision 460df093c4475816fc25d6b4c3ebfc50424ccca3) +++ sources/canbus/messagebuilder.h (.../messagebuilder.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 * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, * IN PART OR IN WHOLE, Index: sources/canbus/messagedispatcher.cpp =================================================================== diff -u -r460df093c4475816fc25d6b4c3ebfc50424ccca3 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/canbus/messagedispatcher.cpp (.../messagedispatcher.cpp) (revision 460df093c4475816fc25d6b4c3ebfc50424ccca3) +++ sources/canbus/messagedispatcher.cpp (.../messagedispatcher.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 * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, * IN PART OR IN WHOLE, Index: sources/canbus/messagedispatcher.h =================================================================== diff -u -r460df093c4475816fc25d6b4c3ebfc50424ccca3 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/canbus/messagedispatcher.h (.../messagedispatcher.h) (revision 460df093c4475816fc25d6b4c3ebfc50424ccca3) +++ sources/canbus/messagedispatcher.h (.../messagedispatcher.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 * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, * IN PART OR IN WHOLE, Index: sources/canbus/messageglobals.h =================================================================== diff -u -r460df093c4475816fc25d6b4c3ebfc50424ccca3 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/canbus/messageglobals.h (.../messageglobals.h) (revision 460df093c4475816fc25d6b4c3ebfc50424ccca3) +++ sources/canbus/messageglobals.h (.../messageglobals.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 * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, * IN PART OR IN WHOLE, Index: sources/canbus/messagehandler.cpp =================================================================== diff -u -r4c1551d45b40987c2d59c11e95760e9b6c55fc68 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/canbus/messagehandler.cpp (.../messagehandler.cpp) (revision 4c1551d45b40987c2d59c11e95760e9b6c55fc68) +++ sources/canbus/messagehandler.cpp (.../messagehandler.cpp) (revision fee7fabf49befb065c89248c19e15efc9ca194e4) @@ -1,14 +1,10 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * Copyright (c) 2019-2019 Diality Inc. - All Rights Reserved. * copyright - * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, - * IN PART OR IN WHOLE, - * WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. - * * file messagehandler.cpp * date 10/26/2019 @@ -48,9 +44,9 @@ } /*! - * \brief Message Handler connections definition + * \brief MessageHandler 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 MessageHandler::initConnections() { @@ -63,6 +59,16 @@ this , SLOT( onFrameReceive( const QCanBusFrame &))); } +/*! + * \brief MessageHandler::transmitFrame \n + * \details Prepares a frame to be transmitted \n + * and emit signal didFrameTransmit with the frame as its argument \n + * \param vFrameId - Channel id of the CANBUS frame \n + * \param vData - The Data this frame is going to carry \n + * \note This frame is created by MessageBuilder \n + * and it can be one of the frames of a message \n + * which has been chopped into frames. \n + */ void MessageHandler::transmitFrame(Can_Id vFrameId, const QByteArray &vData) { QCanBusFrame mFrame; @@ -75,6 +81,16 @@ emit didFrameTransmit(mFrame); } +/*! + * \brief MessageHandler::checkChannel \n + * \details Checks for the channel id of the received frame \n + * which needs to be handled or ignored. \n + * \param vFrameId - Channel id of the frame \n + * \param vOK - will be set to true if the channel \n + * is valid and a variable has been passed to \n + * \return The Category if the channels from the UI \n + * perspective \ref MessageHandler::ChannelGroup \n + */ MessageHandler::ChannelGroup MessageHandler::checkChannel(quint32 vFrameId, bool *vOK) { bool ok = true; @@ -110,14 +126,26 @@ return channelGroup; } +/*! + * \brief MessageHandler::onFrameTransmit \n + * \details This the slot connected to the MessageDispatcher didFrameTransmit signal. \n + * When a frame needs to be send to CANBUS, \n + * this slot will call transmitFrame method to do the job. \n + * \param vCan_ID - CANBUS Can Id target of the frame. \n + * \param vData - The data which this frame will carry. \n + */ void MessageHandler::onFrameTransmit(Can_Id vCan_ID, const QByteArray &vData) { transmitFrame(vCan_ID, vData); } /*! - * \brief MessageHandler::onRead - * \param vFrame + * \brief MessageHandler::onFrameReceive + * \details This the slot connected to the CanInterface didFrameReceive signal. \n + * When a frame received over the CANBUS, \n + * this slot will be called to check the channel if should be listened to. \n + * and will emit didFrameReceive if should be handled and ignored otherwise. \n + * \param vFrame - The frame has to be sent */ void MessageHandler::onFrameReceive(const QCanBusFrame &vFrame) { Index: sources/canbus/messagehandler.h =================================================================== diff -u -r1732e83d2a0308b9c706f37d6d7724a364bbff2a -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/canbus/messagehandler.h (.../messagehandler.h) (revision 1732e83d2a0308b9c706f37d6d7724a364bbff2a) +++ sources/canbus/messagehandler.h (.../messagehandler.h) (revision fee7fabf49befb065c89248c19e15efc9ca194e4) @@ -1,14 +1,10 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * Copyright (c) 2019-2019 Diality Inc. - All Rights Reserved. * copyright - * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, - * IN PART OR IN WHOLE, - * WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. - * * file messagehandler.h * date 10/26/2019 @@ -38,18 +34,28 @@ using namespace Gui; namespace Can { +/*! + * \brief The MessageHandler class \n + * \details This class is an adapter or translator from QByteArray and QCanBusFrame \n + * So this class gets the data for the frame as QByteArray and creates a frame \n + * and send it to the CanInterface to deal with the CANBUS. \n + */ class MessageHandler : public QObject { Q_OBJECT // friends friend class ::unittests; + /*! + * \brief The ChannelGroup enum + * \details The enum which represent the categories of the CANBUS channel + */ enum class ChannelGroup { - eChannel_Unknown, - eChannel_Ignores, - eChannel_Listens, - eChannel_Outputs, + eChannel_Unknown, ///< An Unknown channels category + eChannel_Ignores, ///< The Channels which will be ignored by UI + eChannel_Listens, ///< The Channels that UI is listening to + eChannel_Outputs, ///< The Channels that are related to UI frames out. }; // Singleton @@ -59,17 +65,37 @@ private: void initConnections(); - void transmitFrame(Can_Id vCan_Id, const QByteArray &vData = 0); - ChannelGroup checkChannel(quint32 vFrameId, bool *vOK = nullptr); private slots: // Should be private for thread safety and is connected internally. void onFrameTransmit(Can_Id vCan_ID, const QByteArray &vData ); // GUI => CAN void onFrameReceive ( const QCanBusFrame &vFrame ); // GUI <= CAN signals: - void didFrameReceive (Can_Id vCan_ID, const QByteArray &vPayload); // GUI <= CAN + /*! + * \brief didFrameReceive + * \details After CanInterface receives a frame notifies MessageHandler + * by emitting CanInterface::didFrameReceive signal, + * then Message Handler calls its slot MessageHandler::onFrameReceive to handle the message, + * And when the message has been processed vCan_Id of type Can_Id which is the Channel ID of the frame + * and vPayload of the frame of type QByteArray has been extracted, + * This signal will be emitted to notify MessageDispatcher to start collecting data + * for this message over this channel. + * \param vCan_ID - Channel Id of the frame. + * \param vPayload - Payload of the frame. + */ + void didFrameReceive (Can_Id vCan_Id, const QByteArray &vPayload); // GUI <= CAN + + /*! + * \brief didFrameTransmit + * \details After MessageDispatcher requests MessageHandler to transmit a message, + * And MessageHandler calls its slot MessageHandler::onFrameTransmit to handle the message, + * And when the message has been processed and a Frame has been created, + * this signal will be emitted to notify CanInterface to send the frame. + * \ref CanInterface::onFrameTransmit + * \param vFrame - The frame which has been created to be transmitted. + */ void didFrameTransmit( const QCanBusFrame &vFrame ); // GUI => CAN }; } Index: sources/canbus/messageinterpreter.cpp =================================================================== diff -u -r4c1551d45b40987c2d59c11e95760e9b6c55fc68 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/canbus/messageinterpreter.cpp (.../messageinterpreter.cpp) (revision 4c1551d45b40987c2d59c11e95760e9b6c55fc68) +++ sources/canbus/messageinterpreter.cpp (.../messageinterpreter.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 * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, * IN PART OR IN WHOLE, @@ -21,23 +21,24 @@ using namespace Can; +/*! + * \brief MessageInterpreter::MessageInterpreter + * \param parent + */ MessageInterpreter::MessageInterpreter(QObject *parent) : QObject(parent) { } -bool MessageInterpreter::interpretMessage(const Can_Id vCan_Id, const Message &vMessage, GuiActionType &vActionId, QVariantList &vData) -{ - bool ok = false; - switch (vCan_Id) { - case eChlid_HD: - case eChlid_HD_Alarm: - case eChlid_HD_Sync: - ok = interpretMessage_HD(vMessage, vActionId, vData); - default: - - break; - } - return ok; -} - +/*! + * \brief MessageInterpreter::interpretMessage \n + * \details This method will be called \n + * to interpret messages from UI regarding vActionId. \n + * \param vActionId - The Action Id of type GuiActionType \n + * to be interpreted to hex representation of Message ID. \n + * \param vData - The data which has to be sent over the CANBUS. \n + * \param vPayload - The Payload of the frame of Type QByteArray of hex values \n + * Which has been interpreted from vData of Type QVariantList \n + * \return true if the vActionId is valid. \n + * This return value will be used later for error handling. \n + */ bool MessageInterpreter::interpretMessage(const GuiActionType &vActionId, const QVariantList &vData, QByteArray &vPayload) { bool ok = true; @@ -63,7 +64,7 @@ break; case GuiActionType::String: - vPayload = fromVariant(vData[0]); + vPayload = Format::fromVariant(vData[0]); break; default: @@ -75,17 +76,46 @@ return ok; } -QByteArray MessageInterpreter::fromVariant(const QVariant &vData) +/*! + * \brief MessageInterpreter::interpretMessage \n + * \details This method will call appropriate message interpreter \n + * for received messages from HD or DG regarding the Can_Id. \n + * \param vCan_Id - The Channel Id of the CANBUS frame. \n + * \param vMessage - The complete message of type Message which needs to be interpreted. \n + * \param vActionId - The ActionId of GuiActionType which will be extracted from vMessage. \n + * \param vData - The values of QVariantList which is understandable for UI \n + * and has been extracted from hex values of the CANBUS Message Payload \n + * regarding each Message Id definition. \n + * \return true if the message channel is in the range which can be interpreted, false otherwise. \n + * This return value will be used later to emit MessageDispatcher::didActionReceive signal or not \n + */ +bool MessageInterpreter::interpretMessage(const Can_Id vCan_Id, const Message &vMessage, GuiActionType &vActionId, QVariantList &vData) { - QByteArray mData; - if(vData.type() == QVariant::String) { - mData += vData.toByteArray(); - } else { - mData += vData.toUInt(); + bool ok = false; + switch (vCan_Id) { + case eChlid_HD: + case eChlid_HD_Alarm: + case eChlid_HD_Sync: + ok = interpretMessage_HD(vMessage, vActionId, vData); + default: + break; } - return mData; + return ok; } +/*! + * \brief MessageInterpreter::interpretMessage_HD \n + * \details This method will be called \n + * for received messages from HD to interpret the vMessage of type Message \n + * to vData of type QVariantList which UI understands regarding the Can_Id. \n + * \param vMessage - The complete message of type Message which needs to be interpreted. \n + * \param vActionId - The ActionId of GuiActionType which will be extracted from vMessage. \n + * \param vData - The values of QVariantList which is understandable for UI \n + * and has been extracted from hex values of the CANBUS Message Payload \n + * in vMessage of type Message regarding each Message Id definition. \n + * \return true if the message CANBUS channel is in the range which can be interpreted, false otherwise. \n + * This return value will be used later to emit MessageDispatcher::didActionReceive signal or not \n + */ bool MessageInterpreter::interpretMessage_HD(const Message &vMessage, GuiActionType &vActionId, QVariantList &vData) { bool ok = true; @@ -102,21 +132,21 @@ break; } - case GuiActionType::BloodFlow: { - types::I32 i32 ; - types::F32 f32_1; - types::F32 f32_2; - types::F32 f32_3; - types::F32 f32_4; - types::F32 f32_5; - ok = getBloodFlowData(vMessage, i32, f32_1, f32_2, f32_3, f32_4, f32_5); + case GuiActionType::BloodFlow: { + types::U32 mFlowSetPoint ; + types::F32 mMeasuredFlow ; + types::F32 mRotorSpeed ; + types::F32 mMotorSpeed ; + types::F32 mMotorCtlSpeed ; + types::F32 mMotorCtlCurrent ; + ok = getBloodFlowData(vMessage, mFlowSetPoint, mMeasuredFlow, mRotorSpeed, mMotorSpeed, mMotorCtlSpeed, mMotorCtlCurrent); if (ok) { - vData += i32 .value; - vData += f32_1.value; - vData += f32_2.value; - vData += f32_3.value; - vData += f32_4.value; - vData += f32_5.value; + vData += mFlowSetPoint .value; + vData += mMeasuredFlow .value; + vData += mRotorSpeed .value; + vData += mMotorSpeed .value; + vData += mMotorCtlSpeed .value; + vData += mMotorCtlCurrent.value; } break; } @@ -140,6 +170,19 @@ return ok; } +/*! + * \brief MessageInterpreter::interpretMessage_DG \n + * \details This method will be called \n + * for received messages from DG to interpret the vMessage of type Message \n + * to vData of type QVariantList which UI understands regarding the Can_Id. \n + * \param vMessage - The complete message of type Message which needs to be interpreted. \n + * \param vActionId - The ActionId of GuiActionType which will be extracted from vMessage. \n + * \param vData - The values of QVariantList which is understandable for UI \n + * and has been extracted from hex values of the CANBUS Message Payload \n + * in vMessage of type Message regarding each Message Id definition. \n + * \return true if the message CANBUS channel is in the range which can be interpreted, false otherwise. \n + * This return value will be used later to emit MessageDispatcher::didActionReceive signal or not \n + */ bool MessageInterpreter::interpretMessage_DG(const Message &vMessage, GuiActionType &vActionId, QVariantList &vData) { Q_UNUSED(vMessage ); @@ -149,7 +192,20 @@ return false; } -bool MessageInterpreter::getBloodFlowData(const Message &vMessage, types::I32 &vI32, types::F32 &vF32_1, types::F32 &vF32_2, types::F32 &vF32_3, types::F32 &vF32_4, types::F32 &vF32_5) +/*! + * \brief MessageInterpreter::getBloodFlowData + * \details This is the method which interprets the Blood Flow message data in vMessage of type Message + * to its elements of data. + * \param vMessage - The vMessage of type Message which contains all the data, require to be interpreted. + * \param vFlowSetPoint - Flow Set Point value of type unsigned int extracted out. + * \param vMeasuredFlow - Measured Flow value of type float extracted out + * \param vRotorSpeed - Rotor Speed value of type float extracted out + * \param vMotorSpeed - Motor Speed value of type float extracted out + * \param vMotorCtlSpeed - Motor Controller Speed value of type float extracted out + * \param vMotorCtlCurrent - Motor Controller Current value of type float extracted out + * \return true if the message can be successfully converted to the Blood Flow data elements. + */ +bool MessageInterpreter::getBloodFlowData(const Message &vMessage, types::U32 &vFlowSetPoint, types::F32 &vMeasuredFlow, types::F32 &vRotorSpeed, types::F32 &vMotorSpeed, types::F32 &vMotorCtlSpeed, types::F32 &vMotorCtlCurrent) { if ( vMessage.actionId != GuiActionType::BloodFlow ) { return false; @@ -166,54 +222,64 @@ p += 4; j = 0; while (i < p) { - vI32.bytes[j] = vMessage.data[i]; + vFlowSetPoint.bytes[j] = vMessage.data[i]; j++; i++; } p += 4; j = 0; while (i < p) { - vF32_1.bytes[j] = vMessage.data[i]; + vMeasuredFlow.bytes[j] = vMessage.data[i]; j++; i++; } p += 4; j = 0; while (i < p) { - vF32_2.bytes[j] = vMessage.data[i]; + vRotorSpeed.bytes[j] = vMessage.data[i]; j++; i++; } p += 4; j = 0; while (i < p) { - vF32_3.bytes[j] = vMessage.data[i]; + vMotorSpeed.bytes[j] = vMessage.data[i]; j++; i++; } p += 4; j = 0; while (i < p) { - vF32_4.bytes[j] = vMessage.data[i]; + vMotorCtlSpeed.bytes[j] = vMessage.data[i]; j++; i++; } p += 4; j = 0; while (i < p) { - vF32_5.bytes[j] = vMessage.data[i]; + vMotorCtlCurrent.bytes[j] = vMessage.data[i]; j++; i++; } return true; } +/*! + * \brief MessageInterpreter::getPowerOffData \n + * \details This is the method which interprets the PowerOff message data \n + * in vMessage of type Message. \n + * to its elements of data. \n + * \param vMessage - The vMessage of type Message which contains all the data, \n + * require to be interpreted. \n + * \param vShowHide - The return value of extracted fro \n + * \return true if the data can be extracted as defined for PowerOff Message ID \n + */ bool MessageInterpreter::getPowerOffData(const Message &vMessage, quint8 &vShowHide) { bool ok = true; @@ -230,6 +296,13 @@ return ok; } +/*! + * \brief MessageInterpreter::printUnhandled \n + * \details Prints out the formatted string of the vMessage of type Message \n + * In case the Message ID of received CANBUS message \n + * is known to the interpreter but has not been handled/implemented. \n + * \param vMessage - The message contains Unhandled Message ID \n + */ void MessageInterpreter::printUnhandled(const Message &vMessage) { QString mActionIdHexString = Format::toHexString(vMessage.actionId, false, 3); Index: sources/canbus/messageinterpreter.h =================================================================== diff -u -r4c1551d45b40987c2d59c11e95760e9b6c55fc68 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/canbus/messageinterpreter.h (.../messageinterpreter.h) (revision 4c1551d45b40987c2d59c11e95760e9b6c55fc68) +++ sources/canbus/messageinterpreter.h (.../messageinterpreter.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 * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, * IN PART OR IN WHOLE, @@ -24,21 +24,26 @@ using namespace Gui; namespace Can { +/*! + * \brief The MessageInterpreter class + * \details This the class that interprets the messages to/from frames. + * UI only understands GuiActionType and QVariantList data types + * And CANBUS only understands QCanBusFrame with Hex values in QByteArrays + * This is the class which interpret this data to/from. + */ class MessageInterpreter : public QObject { Q_OBJECT - QByteArray fromVariant(const QVariant &vData); - bool interpretMessage_HD(const Message &vMessage, GuiActionType &vActionId, QVariantList &vData); bool interpretMessage_DG(const Message &vMessage, GuiActionType &vActionId, QVariantList &vData); bool getBloodFlowData (const Message &vMessage, - types::I32 &vI32 , - types::F32 &vF32_1, types::F32 &vF32_2, types::F32 &vF32_3, types::F32 &vF32_4, types::F32 &vF32_5 ); - bool getPowerOffData (const Message &vMessage, quint8 &vShowHide); + types::U32 &vFlowSetPoint, + types::F32 &vMeasuredFlow, types::F32 &vRotorSpeed, types::F32 &vMotorSpeed, types::F32 &vMotorCtlSpeed, types::F32 &vMotorCtlCurrent ); + bool getPowerOffData (const Message &vMessage, quint8 &vShowHide); - void printUnhandled (const Message &vMessage); + void printUnhandled (const Message &vMessage); public: explicit MessageInterpreter(QObject *parent = nullptr); Index: sources/configuration/display.cpp =================================================================== diff -u -r5194f3afffb28dac90a7ca4153b6a0ca2f239387 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/configuration/display.cpp (.../display.cpp) (revision 5194f3afffb28dac90a7ca4153b6a0ca2f239387) +++ sources/configuration/display.cpp (.../display.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 Index: sources/configuration/display.h =================================================================== diff -u -rc7b359e8bd94eeb2d57cc71897511382520d1f0e -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/configuration/display.h (.../display.h) (revision c7b359e8bd94eeb2d57cc71897511382520d1f0e) +++ sources/configuration/display.h (.../display.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 Index: sources/configuration/sound.cpp =================================================================== diff -u -r5194f3afffb28dac90a7ca4153b6a0ca2f239387 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/configuration/sound.cpp (.../sound.cpp) (revision 5194f3afffb28dac90a7ca4153b6a0ca2f239387) +++ sources/configuration/sound.cpp (.../sound.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 Index: sources/configuration/sound.h =================================================================== diff -u -rc7b359e8bd94eeb2d57cc71897511382520d1f0e -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/configuration/sound.h (.../sound.h) (revision c7b359e8bd94eeb2d57cc71897511382520d1f0e) +++ sources/configuration/sound.h (.../sound.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 Index: sources/gui/guicontroller.cpp =================================================================== diff -u -r272bb81655222b2bf0c3c7099523c0b658eb9cb8 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/guicontroller.cpp (.../guicontroller.cpp) (revision 272bb81655222b2bf0c3c7099523c0b658eb9cb8) +++ sources/gui/guicontroller.cpp (.../guicontroller.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 Index: sources/gui/guicontroller.h =================================================================== diff -u -r272bb81655222b2bf0c3c7099523c0b658eb9cb8 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/guicontroller.h (.../guicontroller.h) (revision 272bb81655222b2bf0c3c7099523c0b658eb9cb8) +++ sources/gui/guicontroller.h (.../guicontroller.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 Index: sources/gui/guiglobals.cpp =================================================================== diff -u -r4c1551d45b40987c2d59c11e95760e9b6c55fc68 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/guiglobals.cpp (.../guiglobals.cpp) (revision 4c1551d45b40987c2d59c11e95760e9b6c55fc68) +++ sources/gui/guiglobals.cpp (.../guiglobals.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 * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, * IN PART OR IN WHOLE, Index: sources/gui/guiglobals.h =================================================================== diff -u -r4c1551d45b40987c2d59c11e95760e9b6c55fc68 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/guiglobals.h (.../guiglobals.h) (revision 4c1551d45b40987c2d59c11e95760e9b6c55fc68) +++ sources/gui/guiglobals.h (.../guiglobals.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 * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, Index: sources/gui/guiview.cpp =================================================================== diff -u -r272bb81655222b2bf0c3c7099523c0b658eb9cb8 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/guiview.cpp (.../guiview.cpp) (revision 272bb81655222b2bf0c3c7099523c0b658eb9cb8) +++ sources/gui/guiview.cpp (.../guiview.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 Index: sources/gui/guiview.h =================================================================== diff -u -r272bb81655222b2bf0c3c7099523c0b658eb9cb8 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/guiview.h (.../guiview.h) (revision 272bb81655222b2bf0c3c7099523c0b658eb9cb8) +++ sources/gui/guiview.h (.../guiview.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 Index: sources/gui/qml/components/BackButton.qml =================================================================== diff -u -rde2f87e15fa05b1c45581cfedd8f1af0c47c2b48 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/components/BackButton.qml (.../BackButton.qml) (revision de2f87e15fa05b1c45581cfedd8f1af0c47c2b48) +++ sources/gui/qml/components/BackButton.qml (.../BackButton.qml) (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 Index: sources/gui/qml/components/LogoD.qml =================================================================== diff -u -rde2f87e15fa05b1c45581cfedd8f1af0c47c2b48 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/components/LogoD.qml (.../LogoD.qml) (revision de2f87e15fa05b1c45581cfedd8f1af0c47c2b48) +++ sources/gui/qml/components/LogoD.qml (.../LogoD.qml) (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 Index: sources/gui/qml/components/MainMenu.qml =================================================================== diff -u -rf623529d6ec25b555f3ac2248d71fc2b5e7063d6 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision f623529d6ec25b555f3ac2248d71fc2b5e7063d6) +++ sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (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 Index: sources/gui/qml/components/ModalDialog.qml =================================================================== diff -u -r4b713d1a13a4461fd46d869d4bf7e52de4c609b4 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision 4b713d1a13a4461fd46d869d4bf7e52de4c609b4) +++ sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (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 Index: sources/gui/qml/components/ScreenItem.qml =================================================================== diff -u -r174d5078531f9dfbe9cdc45274b852984bb72647 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/components/ScreenItem.qml (.../ScreenItem.qml) (revision 174d5078531f9dfbe9cdc45274b852984bb72647) +++ sources/gui/qml/components/ScreenItem.qml (.../ScreenItem.qml) (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 Index: sources/gui/qml/components/StackItem.qml =================================================================== diff -u -r174d5078531f9dfbe9cdc45274b852984bb72647 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/components/StackItem.qml (.../StackItem.qml) (revision 174d5078531f9dfbe9cdc45274b852984bb72647) +++ sources/gui/qml/components/StackItem.qml (.../StackItem.qml) (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 Index: sources/gui/qml/components/TitleText.qml =================================================================== diff -u -r5194f3afffb28dac90a7ca4153b6a0ca2f239387 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/components/TitleText.qml (.../TitleText.qml) (revision 5194f3afffb28dac90a7ca4153b6a0ca2f239387) +++ sources/gui/qml/components/TitleText.qml (.../TitleText.qml) (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 Index: sources/gui/qml/components/TouchRect.qml =================================================================== diff -u -r460df093c4475816fc25d6b4c3ebfc50424ccca3 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 460df093c4475816fc25d6b4c3ebfc50424ccca3) +++ sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (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 Index: sources/gui/qml/dialogs/PowerOff.qml =================================================================== diff -u -r4b713d1a13a4461fd46d869d4bf7e52de4c609b4 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/dialogs/PowerOff.qml (.../PowerOff.qml) (revision 4b713d1a13a4461fd46d869d4bf7e52de4c609b4) +++ sources/gui/qml/dialogs/PowerOff.qml (.../PowerOff.qml) (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 Index: sources/gui/qml/globals/Colors.qml =================================================================== diff -u -r6a813369c2f302b1f525c8bae97b8b29e0311cd6 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 6a813369c2f302b1f525c8bae97b8b29e0311cd6) +++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (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 Index: sources/gui/qml/globals/Fonts.qml =================================================================== diff -u -r5194f3afffb28dac90a7ca4153b6a0ca2f239387 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision 5194f3afffb28dac90a7ca4153b6a0ca2f239387) +++ sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (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 Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r6a813369c2f302b1f525c8bae97b8b29e0311cd6 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 6a813369c2f302b1f525c8bae97b8b29e0311cd6) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (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 Index: sources/gui/qml/main.qml =================================================================== diff -u -r1732e83d2a0308b9c706f37d6d7724a364bbff2a -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/main.qml (.../main.qml) (revision 1732e83d2a0308b9c706f37d6d7724a364bbff2a) +++ sources/gui/qml/main.qml (.../main.qml) (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 Index: sources/gui/qml/pages/ManagerHome.qml =================================================================== diff -u -r5194f3afffb28dac90a7ca4153b6a0ca2f239387 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/pages/ManagerHome.qml (.../ManagerHome.qml) (revision 5194f3afffb28dac90a7ca4153b6a0ca2f239387) +++ sources/gui/qml/pages/ManagerHome.qml (.../ManagerHome.qml) (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 Index: sources/gui/qml/pages/ManagerStack.qml =================================================================== diff -u -r5194f3afffb28dac90a7ca4153b6a0ca2f239387 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/pages/ManagerStack.qml (.../ManagerStack.qml) (revision 5194f3afffb28dac90a7ca4153b6a0ca2f239387) +++ sources/gui/qml/pages/ManagerStack.qml (.../ManagerStack.qml) (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 Index: sources/gui/qml/pages/SettingsHome.qml =================================================================== diff -u -r460df093c4475816fc25d6b4c3ebfc50424ccca3 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (revision 460df093c4475816fc25d6b4c3ebfc50424ccca3) +++ sources/gui/qml/pages/SettingsHome.qml (.../SettingsHome.qml) (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 Index: sources/gui/qml/pages/SettingsStack.qml =================================================================== diff -u -r5194f3afffb28dac90a7ca4153b6a0ca2f239387 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/pages/SettingsStack.qml (.../SettingsStack.qml) (revision 5194f3afffb28dac90a7ca4153b6a0ca2f239387) +++ sources/gui/qml/pages/SettingsStack.qml (.../SettingsStack.qml) (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 Index: sources/gui/qml/pages/TreatmentCreate.qml =================================================================== diff -u -r174d5078531f9dfbe9cdc45274b852984bb72647 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/pages/TreatmentCreate.qml (.../TreatmentCreate.qml) (revision 174d5078531f9dfbe9cdc45274b852984bb72647) +++ sources/gui/qml/pages/TreatmentCreate.qml (.../TreatmentCreate.qml) (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 Index: sources/gui/qml/pages/TreatmentHome.qml =================================================================== diff -u -rf623529d6ec25b555f3ac2248d71fc2b5e7063d6 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/pages/TreatmentHome.qml (.../TreatmentHome.qml) (revision f623529d6ec25b555f3ac2248d71fc2b5e7063d6) +++ sources/gui/qml/pages/TreatmentHome.qml (.../TreatmentHome.qml) (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 Index: sources/gui/qml/pages/TreatmentStack.qml =================================================================== diff -u -r5194f3afffb28dac90a7ca4153b6a0ca2f239387 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/pages/TreatmentStack.qml (.../TreatmentStack.qml) (revision 5194f3afffb28dac90a7ca4153b6a0ca2f239387) +++ sources/gui/qml/pages/TreatmentStack.qml (.../TreatmentStack.qml) (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 Index: sources/gui/qml/pages/TreatmentStart.qml =================================================================== diff -u -r460df093c4475816fc25d6b4c3ebfc50424ccca3 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/gui/qml/pages/TreatmentStart.qml (.../TreatmentStart.qml) (revision 460df093c4475816fc25d6b4c3ebfc50424ccca3) +++ sources/gui/qml/pages/TreatmentStart.qml (.../TreatmentStart.qml) (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 Index: sources/main.h =================================================================== diff -u -r9a3ee027dbc33f39ee7df2a9dc5a7897c6b1854d -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/main.h (.../main.h) (revision 9a3ee027dbc33f39ee7df2a9dc5a7897c6b1854d) +++ sources/main.h (.../main.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 * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, Index: sources/maintimer.cpp =================================================================== diff -u -rf36dd9c29f633b54bf7f0232093ecaefa5452ca8 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/maintimer.cpp (.../maintimer.cpp) (revision f36dd9c29f633b54bf7f0232093ecaefa5452ca8) +++ sources/maintimer.cpp (.../maintimer.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 Index: sources/maintimer.h =================================================================== diff -u -rf36dd9c29f633b54bf7f0232093ecaefa5452ca8 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/maintimer.h (.../maintimer.h) (revision f36dd9c29f633b54bf7f0232093ecaefa5452ca8) +++ sources/maintimer.h (.../maintimer.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 Index: sources/storage/filehandler.cpp =================================================================== diff -u -rf623529d6ec25b555f3ac2248d71fc2b5e7063d6 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/storage/filehandler.cpp (.../filehandler.cpp) (revision f623529d6ec25b555f3ac2248d71fc2b5e7063d6) +++ sources/storage/filehandler.cpp (.../filehandler.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 Index: sources/storage/filehandler.h =================================================================== diff -u -r9a3ee027dbc33f39ee7df2a9dc5a7897c6b1854d -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/storage/filehandler.h (.../filehandler.h) (revision 9a3ee027dbc33f39ee7df2a9dc5a7897c6b1854d) +++ sources/storage/filehandler.h (.../filehandler.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 Index: sources/storage/logger.cpp =================================================================== diff -u -r5194f3afffb28dac90a7ca4153b6a0ca2f239387 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/storage/logger.cpp (.../logger.cpp) (revision 5194f3afffb28dac90a7ca4153b6a0ca2f239387) +++ sources/storage/logger.cpp (.../logger.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 Index: sources/storage/logger.h =================================================================== diff -u -r5194f3afffb28dac90a7ca4153b6a0ca2f239387 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/storage/logger.h (.../logger.h) (revision 5194f3afffb28dac90a7ca4153b6a0ca2f239387) +++ sources/storage/logger.h (.../logger.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 Index: sources/storage/settings.cpp =================================================================== diff -u -r5194f3afffb28dac90a7ca4153b6a0ca2f239387 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/storage/settings.cpp (.../settings.cpp) (revision 5194f3afffb28dac90a7ca4153b6a0ca2f239387) +++ sources/storage/settings.cpp (.../settings.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 Index: sources/storage/settings.h =================================================================== diff -u -r5194f3afffb28dac90a7ca4153b6a0ca2f239387 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/storage/settings.h (.../settings.h) (revision 5194f3afffb28dac90a7ca4153b6a0ca2f239387) +++ sources/storage/settings.h (.../settings.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 Index: sources/utility/crc.cpp =================================================================== diff -u -r460df093c4475816fc25d6b4c3ebfc50424ccca3 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/utility/crc.cpp (.../crc.cpp) (revision 460df093c4475816fc25d6b4c3ebfc50424ccca3) +++ sources/utility/crc.cpp (.../crc.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 Index: sources/utility/format.cpp =================================================================== diff -u -r4c1551d45b40987c2d59c11e95760e9b6c55fc68 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/utility/format.cpp (.../format.cpp) (revision 4c1551d45b40987c2d59c11e95760e9b6c55fc68) +++ sources/utility/format.cpp (.../format.cpp) (revision fee7fabf49befb065c89248c19e15efc9ca194e4) @@ -25,3 +25,14 @@ return QString("%1").arg(vValue,0,16).rightJustified(vLen, '0'); } } + +QByteArray Format::fromVariant(const QVariant &vData) +{ + QByteArray mData; + if(vData.type() == QVariant::String) { + mData += vData.toByteArray(); + } else { + mData += vData.toUInt(); + } + return mData; +} Index: sources/utility/format.h =================================================================== diff -u -r4c1551d45b40987c2d59c11e95760e9b6c55fc68 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/utility/format.h (.../format.h) (revision 4c1551d45b40987c2d59c11e95760e9b6c55fc68) +++ sources/utility/format.h (.../format.h) (revision fee7fabf49befb065c89248c19e15efc9ca194e4) @@ -15,14 +15,16 @@ // Qt #include +#include // Project class Format { Format(); public: - static QString toHexString(quint16 vValue, bool vWith0x = true, quint8 vLen = 4); + static QString toHexString(quint16 vValue, bool vWith0x = true, quint8 vLen = 4); + static QByteArray fromVariant(const QVariant &vData); }; Index: sources/utility/types.h =================================================================== diff -u -r460df093c4475816fc25d6b4c3ebfc50424ccca3 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- sources/utility/types.h (.../types.h) (revision 460df093c4475816fc25d6b4c3ebfc50424ccca3) +++ sources/utility/types.h (.../types.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 * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, * IN PART OR IN WHOLE, @@ -15,14 +15,24 @@ namespace types { +/*! + * \brief The F32 union + * \details This is the union which will be used to extract the bytes of a float type value + * 4 bytes + */ union F32{ float value = 0; quint8 bytes[sizeof(float)]; }; -union I32 { - qint32 value = 0; - quint8 bytes[sizeof(qint32)]; +/*! + * \brief The U32 union + * \details This is the union which will be used to extract the bytes of an unsigned int type value + * 4 bytes + */ +union U32 { + quint32 value = 0; + quint8 bytes[sizeof(quint32)]; }; } Index: unittests/unittests.cpp =================================================================== diff -u -r2085b749d1d0aafe823e840f5aa0bc88a340798a -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- unittests/unittests.cpp (.../unittests.cpp) (revision 2085b749d1d0aafe823e840f5aa0bc88a340798a) +++ unittests/unittests.cpp (.../unittests.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 * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, * IN PART OR IN WHOLE, Index: unittests/unittests.h =================================================================== diff -u -rf623529d6ec25b555f3ac2248d71fc2b5e7063d6 -rfee7fabf49befb065c89248c19e15efc9ca194e4 --- unittests/unittests.h (.../unittests.h) (revision f623529d6ec25b555f3ac2248d71fc2b5e7063d6) +++ unittests/unittests.h (.../unittests.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 * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, * IN PART OR IN WHOLE,