Index: sources/canbus/messageglobals.h =================================================================== diff -u -r35959dd708a5c4fdf02626306441e5a77e7f7782 -r3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7 --- sources/canbus/messageglobals.h (.../messageglobals.h) (revision 35959dd708a5c4fdf02626306441e5a77e7f7782) +++ sources/canbus/messageglobals.h (.../messageglobals.h) (revision 3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7) @@ -42,6 +42,7 @@ * So the data collector has to collect this amount of bytes as payload of a message. */ const QHash payloadLen { + // ---- {Gui::GuiActionType::PowerOff , 1 }, {Gui::GuiActionType::PowerOffBroadcast , 0 }, {Gui::GuiActionType::KeepAlive , 255 }, // 0 => 255 to be able to run a multi-frame test. @@ -50,6 +51,7 @@ {Gui::GuiActionType::DialysateOutletFlow, 7 * 4 }, // 7 parameters each 4bytes {Gui::GuiActionType::TreatmentTime , 3 * 4 }, // 3 parameters each 4bytes {Gui::GuiActionType::PressureOcclusion , 5 * 4 }, // 5 parameters each 4bytes + // ---- {Gui::GuiActionType::String , 255 }, {Gui::GuiActionType::Acknow , 0 }, }; Index: sources/canbus/messageinterpreter.cpp =================================================================== diff -u -r35959dd708a5c4fdf02626306441e5a77e7f7782 -r3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7 --- sources/canbus/messageinterpreter.cpp (.../messageinterpreter.cpp) (revision 35959dd708a5c4fdf02626306441e5a77e7f7782) +++ sources/canbus/messageinterpreter.cpp (.../messageinterpreter.cpp) (revision 3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7) @@ -349,7 +349,7 @@ * \param vData - The dialydate inlet flow data * \return true if the message can be successfully converted to the Blood Flow data elements. */ -bool MessageInterpreter::getDialysateInletFlowData(const Message &vMessage, Model::DialysateFlow &vData) +bool MessageInterpreter::getDialysateInletFlowData(const Message &vMessage, Model::MDialysateFlow &vData) { if ( vMessage.actionId != Gui::GuiActionType::DialysateInletFlow ) { return false; @@ -378,7 +378,7 @@ bool MessageInterpreter::dialysateInletFlowData(const Message &vMessage, QVariantList &vData) { bool ok; - Model::DialysateFlow mData; + Model::MDialysateFlow mData; ok = getDialysateInletFlowData(vMessage, mData); LOG_DATUM(mData.toString()); Index: sources/canbus/messageinterpreter.h =================================================================== diff -u -r35959dd708a5c4fdf02626306441e5a77e7f7782 -r3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7 --- sources/canbus/messageinterpreter.h (.../messageinterpreter.h) (revision 35959dd708a5c4fdf02626306441e5a77e7f7782) +++ sources/canbus/messageinterpreter.h (.../messageinterpreter.h) (revision 3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7) @@ -33,38 +33,39 @@ { Q_OBJECT - void printUnhandled (const Message &vMessage); + void printUnhandled(const Message &vMessage); - bool interpretMessage_HD (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; - bool interpretMessage_DG (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; + bool interpretMessage_HD(const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; + bool interpretMessage_DG(const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; + // ( // ---- PowerOff - bool getPowerOffData(const Message &vMessage, Model::MPowerOff &vData) __attribute_warn_unused_result__; - bool powerOffData(const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; + bool getPowerOffData(const Message &vMessage, Model::MPowerOff &vData) __attribute_warn_unused_result__; + bool powerOffData(const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; // ---- BloodFlowData - bool getBloodFlowData(const Message &vMessage, Model::MBloodFlow &vData) __attribute_warn_unused_result__; - bool bloodFlowData(const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; + bool getBloodFlowData(const Message &vMessage, Model::MBloodFlow &vData) __attribute_warn_unused_result__; + bool bloodFlowData(const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; // ---- Dialysate Inlet FlowData - bool getDialysateInletFlowData(const Message &vMessage, Model::DialysateFlow &vData) __attribute_warn_unused_result__; - bool dialysateInletFlowData(const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; + bool getDialysateInletFlowData(const Message &vMessage, Model::MDialysateFlow &vData) __attribute_warn_unused_result__; + bool dialysateInletFlowData(const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; // ---- Dialysate Outlet FlowData - bool getDialysateOutletFlowData(const Message &vMessage, Model::MOutletFlow &vData) __attribute_warn_unused_result__; - bool dialysateOutletFlowData(const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; + bool getDialysateOutletFlowData(const Message &vMessage, Model::MOutletFlow &vData) __attribute_warn_unused_result__; + bool dialysateOutletFlowData(const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; // ---- AlarmStatus - bool getAlarmStatus (const Message &vMessage, Model::MAlarmStatus &vData) __attribute_warn_unused_result__; - bool alarmStatus (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; + bool getAlarmStatus(const Message &vMessage, Model::MAlarmStatus &vData) __attribute_warn_unused_result__; + bool alarmStatus(const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; // ---- Treatment Time - bool getTreatmentTime (const Message &vMessage, Model::MTreatmentTime &vData); - bool treatmentTime (const Message &vMessage, QVariantList &vData); + bool getTreatmentTime(const Message &vMessage, Model::MTreatmentTime &vData) __attribute_warn_unused_result__; + bool treatmentTime(const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; // ---- Treatment Pressure/Occlusion - bool getPressureOcclusionData (const Message &vMessage, Model::MPressureOcclusion &vData) __attribute_warn_unused_result__; - bool pressureOcclusionData (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; + bool getPressureOcclusionData(const Message &vMessage, Model::MPressureOcclusion &vData) __attribute_warn_unused_result__; + bool pressureOcclusionData(const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; public: explicit MessageInterpreter(QObject *parent = nullptr); Index: sources/gui/guiglobals.cpp =================================================================== diff -u -r595ed1fbe8066960afd4c8fea168208e81b173d9 -r3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7 --- sources/gui/guiglobals.cpp (.../guiglobals.cpp) (revision 595ed1fbe8066960afd4c8fea168208e81b173d9) +++ sources/gui/guiglobals.cpp (.../guiglobals.cpp) (revision 3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7) @@ -24,6 +24,7 @@ #include "mmodel.h" #include "vview.h" +using namespace View; namespace Gui { QQuickView *_viewer = nullptr; Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -rcd7de5f6d239a11615ba8c6c03339a10996486ca -r3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision cd7de5f6d239a11615ba8c6c03339a10996486ca) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7) @@ -64,6 +64,7 @@ readonly property int sliderTextMargin : 20 + // --- PRS --- readonly property int bloodFlowResolution : 25 readonly property int dialysateFlowResolution : 50 Index: sources/model/mtreatmentflows.cpp =================================================================== diff -u -r595ed1fbe8066960afd4c8fea168208e81b173d9 -r3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7 --- sources/model/mtreatmentflows.cpp (.../mtreatmentflows.cpp) (revision 595ed1fbe8066960afd4c8fea168208e81b173d9) +++ sources/model/mtreatmentflows.cpp (.../mtreatmentflows.cpp) (revision 3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7) @@ -66,7 +66,7 @@ } // ----- DialysateFlow ----- -DialysateFlow::Data DialysateFlow::data() const { +MDialysateFlow::Data MDialysateFlow::data() const { Data data; data.mFlowSetPoint = MFlow::data().mFlowSetPoint .value; data.mMeasuredFlow = MFlow::data().mMeasuredFlow .value; Index: sources/model/mtreatmentflows.h =================================================================== diff -u -r595ed1fbe8066960afd4c8fea168208e81b173d9 -r3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7 --- sources/model/mtreatmentflows.h (.../mtreatmentflows.h) (revision 595ed1fbe8066960afd4c8fea168208e81b173d9) +++ sources/model/mtreatmentflows.h (.../mtreatmentflows.h) (revision 3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7) @@ -63,10 +63,10 @@ float mPWMDutyCycle = 0; /*!< vPWMDtCycle - PWM Duty Cycle in % value of type float extracted out */ }; MBloodFlow() { stringPrefix = "Blood Flow"; } - Data data() const; + Data data() const; }; -class DialysateFlow : public MFlow { +class MDialysateFlow : public MFlow { public: struct Data { qint32 mFlowSetPoint = 0; /*!< vFlowSetPoint - Flow Set Point value of type signed int extracted out */ @@ -77,11 +77,11 @@ float mMotorCtlCurrent = 0; /*!< vMotorCtlCurrent - Motor Controller Current value of type float extracted out */ float mPWMDutyCycle = 0; /*!< vPWMDtCycle - PWM Duty Cycle in % value of type float extracted out */ }; - DialysateFlow() { stringPrefix = "Dialysate Flow"; } - Data data() const; + MDialysateFlow() { stringPrefix = "Dialysate Flow"; } + Data data() const; }; } -typedef Model:: MBloodFlow::Data BloodFlowData; -typedef Model::DialysateFlow::Data DialysateFlowData; +typedef Model:: MBloodFlow::Data BloodFlowData; +typedef Model::MDialysateFlow::Data DialysateFlowData; Index: sources/view/valarmstatus.h =================================================================== diff -u -rb166776048ef9001ff2cb4b69df81a5dff40849a -r3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7 --- sources/view/valarmstatus.h (.../valarmstatus.h) (revision b166776048ef9001ff2cb4b69df81a5dff40849a) +++ sources/view/valarmstatus.h (.../valarmstatus.h) (revision 3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7) @@ -21,7 +21,7 @@ #include "vview.h" // namespace -namespace Gui { +namespace View { class VAlarmStatus : public QObject { Index: sources/view/vpoweroff.h =================================================================== diff -u -rb166776048ef9001ff2cb4b69df81a5dff40849a -r3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7 --- sources/view/vpoweroff.h (.../vpoweroff.h) (revision b166776048ef9001ff2cb4b69df81a5dff40849a) +++ sources/view/vpoweroff.h (.../vpoweroff.h) (revision 3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7) @@ -21,7 +21,7 @@ #include "vview.h" // namespace -namespace Gui { +namespace View { class VPowerOff : public QObject { Index: sources/view/vtreatmentbloodflow.h =================================================================== diff -u -rb166776048ef9001ff2cb4b69df81a5dff40849a -r3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7 --- sources/view/vtreatmentbloodflow.h (.../vtreatmentbloodflow.h) (revision b166776048ef9001ff2cb4b69df81a5dff40849a) +++ sources/view/vtreatmentbloodflow.h (.../vtreatmentbloodflow.h) (revision 3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7) @@ -21,7 +21,7 @@ #include "vview.h" // namespace -namespace Gui { +namespace View { class VTreatmentBloodFlow : public QObject { Index: sources/view/vtreatmentdialysateflow.h =================================================================== diff -u -rb166776048ef9001ff2cb4b69df81a5dff40849a -r3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7 --- sources/view/vtreatmentdialysateflow.h (.../vtreatmentdialysateflow.h) (revision b166776048ef9001ff2cb4b69df81a5dff40849a) +++ sources/view/vtreatmentdialysateflow.h (.../vtreatmentdialysateflow.h) (revision 3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7) @@ -21,7 +21,7 @@ #include "vview.h" // namespace -namespace Gui { +namespace View { class VTreatmentDialysateFlow : public QObject { Index: sources/view/vtreatmenttime.h =================================================================== diff -u -rb166776048ef9001ff2cb4b69df81a5dff40849a -r3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7 --- sources/view/vtreatmenttime.h (.../vtreatmenttime.h) (revision b166776048ef9001ff2cb4b69df81a5dff40849a) +++ sources/view/vtreatmenttime.h (.../vtreatmenttime.h) (revision 3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7) @@ -21,7 +21,7 @@ #include "vview.h" // namespace -namespace Gui { +namespace View { class VTreatmentTime : public QObject { Index: sources/view/vtreatmentultrafiltration.h =================================================================== diff -u -rb166776048ef9001ff2cb4b69df81a5dff40849a -r3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7 --- sources/view/vtreatmentultrafiltration.h (.../vtreatmentultrafiltration.h) (revision b166776048ef9001ff2cb4b69df81a5dff40849a) +++ sources/view/vtreatmentultrafiltration.h (.../vtreatmentultrafiltration.h) (revision 3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7) @@ -21,7 +21,7 @@ #include "vview.h" // namespace -namespace Gui { +namespace View { class VTreatmentUltrafiltration : public QObject { Index: sources/view/vview.h =================================================================== diff -u -r595ed1fbe8066960afd4c8fea168208e81b173d9 -r3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7 --- sources/view/vview.h (.../vview.h) (revision 595ed1fbe8066960afd4c8fea168208e81b173d9) +++ sources/view/vview.h (.../vview.h) (revision 3bdf58e8bee7d76eb19c1116738ff1e2c534ccc7) @@ -27,7 +27,8 @@ //--------------------------------------------------------------------------------// // The child definition in cpp #define VIEW_DEF(vCLASS, vDATATYPE) \ -using namespace Gui; \ +using namespace Gui ; \ +using namespace View; \ vCLASS::vCLASS(QObject *parent) : QObject(parent) { \ initConnections(); \ } \