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);