Index: leahi.pro =================================================================== diff -u -r9403146058e7c4cef17bd542bbd39bbf032be9f3 -r5504ac8191553be2580700b4a010426a58d71fd4 --- leahi.pro (.../leahi.pro) (revision 9403146058e7c4cef17bd542bbd39bbf032be9f3) +++ leahi.pro (.../leahi.pro) (revision 5504ac8191553be2580700b4a010426a58d71fd4) @@ -172,6 +172,7 @@ sources/model/fp/data/MFPLevelData.h \ sources/model/fp/data/MFPPressuresData.h \ sources/model/fp/data/MFPROPumpData.h \ + sources/model/fp/data/MFPRORejectionPercentageData.h \ sources/model/fp/data/MFPTemperatureData.h \ sources/model/td/adjustment/settings/MAdjustTDAdvancedInstitutionalRecordResponse.h \ sources/model/td/adjustment/settings/MAdjustTDSerialNumberResponse.h \ @@ -252,6 +253,7 @@ sources/view/fp/data/VFPLevelData.h \ sources/view/fp/data/VFPPressuresData.h \ sources/view/fp/data/VFPROPumpData.h \ + sources/view/fp/data/VFPRORejectionPercentageData.h \ sources/view/fp/data/VFPTemperatureData.h \ sources/view/settings/VAdjustmentAdvancedInstitutionalRecord.h \ sources/view/settings/VAdvancedInstitutionalRecord.h \ @@ -540,6 +542,7 @@ sources/model/fp/data/MFPLevelData.cpp \ sources/model/fp/data/MFPPressuresData.cpp \ sources/model/fp/data/MFPROPumpData.cpp \ + sources/model/fp/data/MFPRORejectionPercentageData.cpp \ sources/model/fp/data/MFPTemperatureData.cpp \ sources/model/td/adjustment/settings/MAdjustTDAdvancedInstitutionalRecordResponse.cpp \ sources/model/td/adjustment/settings/MAdjustTDSerialNumberResponse.cpp \ @@ -588,6 +591,7 @@ sources/view/fp/data/VFPLevelData.cpp \ sources/view/fp/data/VFPPressuresData.cpp \ sources/view/fp/data/VFPROPumpData.cpp \ + sources/view/fp/data/VFPRORejectionPercentageData.cpp \ sources/view/fp/data/VFPTemperatureData.cpp \ sources/view/hd/data/post/VHDPOSTData.cpp \ sources/bluetooth/BluetoothInterface.cpp \ Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r9403146058e7c4cef17bd542bbd39bbf032be9f3 -r5504ac8191553be2580700b4a010426a58d71fd4 --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 9403146058e7c4cef17bd542bbd39bbf032be9f3) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 5504ac8191553be2580700b4a010426a58d71fd4) @@ -121,6 +121,7 @@ {Gui::GuiActionType::ID_FPConductivityData , 2 * 4 }, // 2 parameters each 4bytes {Gui::GuiActionType::ID_FPTemperaturesData , 13 * 4 }, // 13 parameters each 4bytes {Gui::GuiActionType::ID_FPROBoosterPumpData , 9 * 4 }, // 9 parameters each 4bytes + {Gui::GuiActionType::ID_FPRORejectionPercentageData , 5 * 4 }, // 5 parameters each 4bytes // HD Data Messages {Gui::GuiActionType::ID_HDAccelerometerData , 9 * 4 }, // 9 parameters each 4bytes {Gui::GuiActionType::ID_HDSyringePumpData , 9 * 4 }, // 9 parameters each 4bytes Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -rda08f523146f2933343958ec712f4b8637d586be -r5504ac8191553be2580700b4a010426a58d71fd4 --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision da08f523146f2933343958ec712f4b8637d586be) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 5504ac8191553be2580700b4a010426a58d71fd4) @@ -683,13 +683,14 @@ LOG_APPED(QString("FP,CheckIn," + QVariant(vData).toStringList().join(','))); break; // FP data messages - case Gui::GuiActionType::ID_FPROPumpData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_FPROPumpData ); break; - case Gui::GuiActionType::ID_FPPressuresData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_FPPressuresData ); break; - case Gui::GuiActionType::ID_FPLevelData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_FPLevelData ); break; - case Gui::GuiActionType::ID_FPFlowSensorData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_FPFlowSensorData ); break; - case Gui::GuiActionType::ID_FPConductivityData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_FPConductivityData ); break; - case Gui::GuiActionType::ID_FPTemperaturesData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_FPTemperaturesData ); break; - case Gui::GuiActionType::ID_FPROBoosterPumpData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_FPROBoosterPumpData ); break; + case Gui::GuiActionType::ID_FPROPumpData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_FPROPumpData ); break; + case Gui::GuiActionType::ID_FPPressuresData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_FPPressuresData ); break; + case Gui::GuiActionType::ID_FPLevelData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_FPLevelData ); break; + case Gui::GuiActionType::ID_FPFlowSensorData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_FPFlowSensorData ); break; + case Gui::GuiActionType::ID_FPConductivityData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_FPConductivityData ); break; + case Gui::GuiActionType::ID_FPTemperaturesData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_FPTemperaturesData ); break; + case Gui::GuiActionType::ID_FPROBoosterPumpData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_FPROBoosterPumpData ); break; + case Gui::GuiActionType::ID_FPRORejectionPercentageData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_FPRORejectionPercentageData ); break; // FP Response Messages case Gui::GuiActionType::ID_AdjustVersionsFPRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustVersionsFPRsp ); break; Index: sources/gui/GuiGlobals.cpp =================================================================== diff -u -rca67f7413160dfba507856222bd9aa95c5fa6200 -r5504ac8191553be2580700b4a010426a58d71fd4 --- sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision ca67f7413160dfba507856222bd9aa95c5fa6200) +++ sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 5504ac8191553be2580700b4a010426a58d71fd4) @@ -129,6 +129,7 @@ #include "VFPConductivityData.h" #include "VFPTemperatureData.h" #include "VFPBoostPumpData.h" +#include "VFPRORejectionPercentageData.h" // ----- #include "VTreatmentCreate.h" #include "VTreatmentIsolatedUFData.h" Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r9403146058e7c4cef17bd542bbd39bbf032be9f3 -r5504ac8191553be2580700b4a010426a58d71fd4 --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 9403146058e7c4cef17bd542bbd39bbf032be9f3) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 5504ac8191553be2580700b4a010426a58d71fd4) @@ -222,6 +222,7 @@ ID_FPConductivityData = 0x3700, // 55 //// ----- @LEAHIZED ID_FPTemperaturesData = 0x3900, // 57 //// ----- @LEAHIZED ID_FPROBoosterPumpData = 0x5000, // 80 //// ----- @LEAHIZED + ID_FPRORejectionPercentageData = 0x7100, // 113 //// ----- @LEAHIZED // HD Data Messages ID_HDAccelerometerData = 0x3300, // 51 Index: sources/gui/qml/dialogs/diagnostics/DiagnosticsFP.qml =================================================================== diff -u -r91c381afa3a5a01579d47a603600f1a56c8ab5b6 -r5504ac8191553be2580700b4a010426a58d71fd4 --- sources/gui/qml/dialogs/diagnostics/DiagnosticsFP.qml (.../DiagnosticsFP.qml) (revision 91c381afa3a5a01579d47a603600f1a56c8ab5b6) +++ sources/gui/qml/dialogs/diagnostics/DiagnosticsFP.qml (.../DiagnosticsFP.qml) (revision 5504ac8191553be2580700b4a010426a58d71fd4) @@ -94,6 +94,30 @@ ] } + DebugDataColumn { id: _FPRoRejectionPercentageColumn + textObjectName :"_FPRoRejectionPercentageColumn" + title : qsTr(" RO Rejection Ratio ") + anchors { + top : _FPROPumpColumn.bottom + topMargin : spacing + left : _FPROPumpColumn.left + } + model: [ + vFPRORejectionPercentage.rawRORejectionRatio .toFixed(1) , + vFPRORejectionPercentage.rawRORejectionRatioTankFill .toFixed(1) , + vFPRORejectionPercentage.avgRORejectionRatio .toFixed(1) , + vFPRORejectionPercentage.avgRORejectionRatioTankFill .toFixed(1) , + vFPRORejectionPercentage.genPermeateState .toFixed(1) , + ] + label: [ + "raw ", + "raw Tank Fill ", + "avg ", + "avg Tank Fill ", + "genPermeateState ", + ] + } + DebugDataColumn { id: _FPBoostPumpColumn textObjectName :"_FPBoostPumpData" title : qsTr(" Boost Pump ") Index: sources/gui/qml/dialogs/watersample/WaterSampleDialysatePage.qml =================================================================== diff -u -r0975a67dd4e4673b9a7b226bfea02cbfa489c418 -r5504ac8191553be2580700b4a010426a58d71fd4 --- sources/gui/qml/dialogs/watersample/WaterSampleDialysatePage.qml (.../WaterSampleDialysatePage.qml) (revision 0975a67dd4e4673b9a7b226bfea02cbfa489c418) +++ sources/gui/qml/dialogs/watersample/WaterSampleDialysatePage.qml (.../WaterSampleDialysatePage.qml) (revision 5504ac8191553be2580700b4a010426a58d71fd4) @@ -134,7 +134,7 @@ unitText : "%" contentItem : Text { id: _actualRORejectionPercentageText anchors.centerIn: parent - text : vTreatmentCreate.actualRORejectionPercentage + text : vFPRORejectionPercentage.avgRORejectionRatio.toFixed(Variables.dialysateCondPrecision) color : Colors.offWhite font.pixelSize : Fonts.fontPixelValueControl } Index: sources/gui/qml/main.qml =================================================================== diff -u -rca67f7413160dfba507856222bd9aa95c5fa6200 -r5504ac8191553be2580700b4a010426a58d71fd4 --- sources/gui/qml/main.qml (.../main.qml) (revision ca67f7413160dfba507856222bd9aa95c5fa6200) +++ sources/gui/qml/main.qml (.../main.qml) (revision 5504ac8191553be2580700b4a010426a58d71fd4) @@ -126,6 +126,7 @@ import VFPConductivity 0.1 import VFPTemperature 0.1 import VFPBoostPump 0.1 +import VFPRORejectionPercentage 0.1 // In-Treatment - Adjustemnt import VTreatmentAdjustmentBloodPrime 0.1 import VTreatmentAdjustmentBolusVolume 0.1 @@ -280,6 +281,7 @@ VFPConductivity { id: vFPConductivity } VFPTemperature { id: vFPTemperature } VFPBoostPump { id: vFPBoostPump } + VFPRORejectionPercentage { id: vFPRORejectionPercentage } // --- Pre-Treatment Progress Data VPreTreatmentAdjustmentInitTreatment { id: vPreTreatmentAdjustmentInitTreatment } VDGFilterFlush { id: vDGFilterFlush } Index: sources/model/MModel.h =================================================================== diff -u -r9403146058e7c4cef17bd542bbd39bbf032be9f3 -r5504ac8191553be2580700b4a010426a58d71fd4 --- sources/model/MModel.h (.../MModel.h) (revision 9403146058e7c4cef17bd542bbd39bbf032be9f3) +++ sources/model/MModel.h (.../MModel.h) (revision 5504ac8191553be2580700b4a010426a58d71fd4) @@ -129,6 +129,7 @@ #include "MFPConductivityData.h" #include "MFPTemperatureData.h" #include "MFPBoostPumpData.h" +#include "MFPRORejectionPercentageData.h" // Pre-Treatment #include "MPreTreatmentAdjustRequests.h" @@ -423,6 +424,7 @@ REGISTER_METATYPE( FPConductivityData ) \ REGISTER_METATYPE( FPTemperatureData ) \ REGISTER_METATYPE( FPBoostPumpData ) \ + REGISTER_METATYPE( FPRORejectionPercentageData ) \ \ REGISTER_METATYPE( HDDebugTextData ) \ REGISTER_METATYPE( DGDebugTextData ) \ @@ -657,6 +659,7 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, FPConductivityData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, FPTemperatureData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, FPBoostPumpData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, FPRORejectionPercentageData ) \ \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, HDDebugTextData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, DGDebugTextData ) \ @@ -904,6 +907,7 @@ ACTION_RECEIVE_BRIDGE_DEFINITION( FPConductivityData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( FPTemperatureData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( FPBoostPumpData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( FPRORejectionPercentageData ) \ \ ACTION_RECEIVE_BRIDGE_DEFINITION( HDDebugTextData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( DGDebugTextData ) \ @@ -1284,6 +1288,7 @@ ACTION_RECEIVE_SIGNAL( FPConductivityData ) \ ACTION_RECEIVE_SIGNAL( FPTemperatureData ) \ ACTION_RECEIVE_SIGNAL( FPBoostPumpData ) \ + ACTION_RECEIVE_SIGNAL( FPRORejectionPercentageData ) \ \ ACTION_RECEIVE_SIGNAL( HDDebugTextData ) \ ACTION_RECEIVE_SIGNAL( DGDebugTextData ) \ Index: sources/model/fp/data/MFPRORejectionPercentageData.cpp =================================================================== diff -u --- sources/model/fp/data/MFPRORejectionPercentageData.cpp (revision 0) +++ sources/model/fp/data/MFPRORejectionPercentageData.cpp (revision 5504ac8191553be2580700b4a010426a58d71fd4) @@ -0,0 +1,45 @@ + +#include "MFPRORejectionPercentageData.h" + +using namespace Model; + +QVariantList MFPRORejectionPercentage::parameters() const { + return { + _data.mRawRORejectionRatio .value, + _data.mRawRORejectionRatioTankFill .value, + _data.mAvgRORejectionRatio .value, + _data.mAvgRORejectionRatioTankFill .value, + _data.mGenPermeateState .value, + }; +} + +bool MFPRORejectionPercentage::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; // message data start position + if ( ! GetValue(vByteArray, index, _data.mRawRORejectionRatio )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mRawRORejectionRatioTankFill )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mAvgRORejectionRatio )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mAvgRORejectionRatioTankFill )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mGenPermeateState )) goto lError; + + return true ; + +lError: + if(vIndex) { *vIndex = index; } + + return false ; +} + +/*! + * \brief MFPRORejectionPercentage::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MFPRORejectionPercentage::Data MFPRORejectionPercentage::data() const { + Data data; + data.mRawRORejectionRatio = _data.mRawRORejectionRatio .value; + data.mRawRORejectionRatioTankFill = _data.mRawRORejectionRatioTankFill .value; + data.mAvgRORejectionRatio = _data.mAvgRORejectionRatio .value; + data.mAvgRORejectionRatioTankFill = _data.mAvgRORejectionRatioTankFill .value; + data.mGenPermeateState = _data.mGenPermeateState .value; + return data; +} Index: sources/model/fp/data/MFPRORejectionPercentageData.h =================================================================== diff -u --- sources/model/fp/data/MFPRORejectionPercentageData.h (revision 0) +++ sources/model/fp/data/MFPRORejectionPercentageData.h (revision 5504ac8191553be2580700b4a010426a58d71fd4) @@ -0,0 +1,79 @@ +#pragma once + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The FP RO Rejection Percentage class + * \details The FP RO Rejection Percentage data model + * + * | MSG | CAN ID | Box | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:---:|:------:|:---:|:---:|:---:|:-----------: | + * |0x7100| 0x102 | 8 | 1 Hz | N | FP | All | FP RO Rejection Percentage Data | + * + * | Payload || + * | || + * | #01:(F32) | \ref Data::mRawRORejectionRatio | + * | #02:(F32) | \ref Data::mRawRORejectionRatioTankFill | + * | #03:(F32) | \ref Data::mAvgRORejectionRatio | + * | #04:(F32) | \ref Data::mAvgRORejectionRatioTankFill | + * | #05:(U32) | \ref Data::mGenPermeateState | + + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | FP | + * | infoText | RORejectionPercentage | + * + */ +class MFPRORejectionPercentage : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::F32 mRawRORejectionRatio ; + Types::F32 mRawRORejectionRatioTankFill ; + Types::F32 mAvgRORejectionRatio ; + Types::F32 mAvgRORejectionRatioTankFill ; + Types::U32 mGenPermeateState ; + + } _data; + +public: + + Type_Enum typeText () const override { return Type_Enum::eDatum ; } + Unit_Enum unitText () const override { return Unit_Enum::eFP ; } + QString infoText () const override { return QString("RORejectionPercentage") ; } + + struct Data { + float mRawRORejectionRatio = 0; + float mRawRORejectionRatioTankFill = 0; + float mAvgRORejectionRatio = 0; + float mAvgRORejectionRatioTankFill = 0; + quint32 mGenPermeateState = 0; + }; + + MFPRORejectionPercentage () {} + + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; +}; +} + +typedef Model::MFPRORejectionPercentage::Data FPRORejectionPercentageData; Index: sources/view/VTreatmentCreate.h =================================================================== diff -u -r82b22f0f0ae1ff5b0a5c1524c7e91cc8d667b180 -r5504ac8191553be2580700b4a010426a58d71fd4 --- sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision 82b22f0f0ae1ff5b0a5c1524c7e91cc8d667b180) +++ sources/view/VTreatmentCreate.h (.../VTreatmentCreate.h) (revision 5504ac8191553be2580700b4a010426a58d71fd4) @@ -107,8 +107,6 @@ VALUESET(QString , patientID ,"") VALUESET(bool , parametersValidated , 0) - VALUESET(qint32 , actualRORejectionPercentage , 0) // TODO comes from FP Update Later - PROPERTY(QString , txCode ,"") TRIGGER(quint32 , treatmentModalityRejectReason , 0) Index: sources/view/VView.h =================================================================== diff -u -rca67f7413160dfba507856222bd9aa95c5fa6200 -r5504ac8191553be2580700b4a010426a58d71fd4 --- sources/view/VView.h (.../VView.h) (revision ca67f7413160dfba507856222bd9aa95c5fa6200) +++ sources/view/VView.h (.../VView.h) (revision 5504ac8191553be2580700b4a010426a58d71fd4) @@ -209,6 +209,7 @@ REGISTER_TYPE( VFPConductivity ) \ REGISTER_TYPE( VFPTemperature ) \ REGISTER_TYPE( VFPBoostPump ) \ + REGISTER_TYPE( VFPRORejectionPercentage ) \ /* Pre-Treatment */ \ REGISTER_TYPE( VPreTreatmentAdjustmentInitTreatment ) \ REGISTER_TYPE( VDGFilterFlush ) \ Index: sources/view/fp/data/VFPRORejectionPercentageData.cpp =================================================================== diff -u --- sources/view/fp/data/VFPRORejectionPercentageData.cpp (revision 0) +++ sources/view/fp/data/VFPRORejectionPercentageData.cpp (revision 5504ac8191553be2580700b4a010426a58d71fd4) @@ -0,0 +1,16 @@ + +#include "VFPRORejectionPercentageData.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VFPRORejectionPercentage, FPRORejectionPercentageData) + +void VFPRORejectionPercentage::onActionReceive(const FPRORejectionPercentageData &vData) +{ + rawRORejectionRatio ( vData.mRawRORejectionRatio ); + rawRORejectionRatioTankFill ( vData.mRawRORejectionRatioTankFill ); + avgRORejectionRatio ( vData.mAvgRORejectionRatio ); + avgRORejectionRatioTankFill ( vData.mAvgRORejectionRatioTankFill ); + genPermeateState ( vData.mGenPermeateState ); +} Index: sources/view/fp/data/VFPRORejectionPercentageData.h =================================================================== diff -u --- sources/view/fp/data/VFPRORejectionPercentageData.h (revision 0) +++ sources/view/fp/data/VFPRORejectionPercentageData.h (revision 5504ac8191553be2580700b4a010426a58d71fd4) @@ -0,0 +1,34 @@ + +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : do not remove +#include "VView.h" +#include "MFPRORejectionPercentageData.h" + +// namespace +namespace View { + +/*! + * \brief The VFPRORejectionPercentage class + * \details View for Model's Data representation. + * + * \sa Model::MFPRORejectionPercentage + * + */ +class VFPRORejectionPercentage : public QObject +{ + Q_OBJECT + + PROPERTY( float , rawRORejectionRatio , 0) + PROPERTY( float , rawRORejectionRatioTankFill , 0) + PROPERTY( float , avgRORejectionRatio , 0) + PROPERTY( float , avgRORejectionRatioTankFill , 0) + PROPERTY( quint32 , genPermeateState , 0) + + VIEW_DEC(VFPRORejectionPercentage, FPRORejectionPercentageData) +}; +}