Index: SDDs/CreateRx.png =================================================================== diff -u Binary files differ Index: SDDs/DiagnosticsScreen.png =================================================================== diff -u Binary files differ Index: SDDs/MainTreatmentScreen.png =================================================================== diff -u Binary files differ Index: SDDs/Wifi.png =================================================================== diff -u Binary files differ Index: leahi.pro =================================================================== diff -u -r86c040b666b2544800274db2a18ba5374fbfd4e7 -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- leahi.pro (.../leahi.pro) (revision 86c040b666b2544800274db2a18ba5374fbfd4e7) +++ leahi.pro (.../leahi.pro) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -156,6 +156,8 @@ sources/model/td/adjustment/settings/MAdjustTDSerialNumberResponse.h \ sources/model/td/adjustment/settings/MAdjustTDVersionsRequest.h \ sources/model/td/adjustment/settings/MAdjustTDVersionsResponse.h \ + sources/model/td/data/MTDAirBubbleData.h \ + sources/model/td/data/MTDAirPumpData.h \ sources/model/td/data/MTDAirTrapData.h \ sources/model/td/data/MTDBatteryData.h \ sources/model/td/data/MTDEjectorData.h \ @@ -193,6 +195,8 @@ sources/view/dd/data/VDDTemperaturesData.h \ sources/view/dd/data/VDDValvesStatesData.h \ sources/view/hd/data/VTreatmentRanges.h \ + sources/view/td/data/VTDAirBubbleData.h \ + sources/view/td/data/VTDAirPumpData.h \ sources/view/td/data/VTDAirTrapData.h \ sources/view/td/data/VTDBatteryData.h \ sources/view/td/data/VTDEjectorData.h \ @@ -274,7 +278,6 @@ sources/model/hd/data/MHDGeneralEvent.h \ sources/model/hd/data/MHDAccelerometerData.h \ sources/model/hd/data/MHDSyringePumpData.h \ - sources/model/hd/data/MHDAirBubbleData.h \ sources/model/hd/data/MHDBloodLeakData.h \ sources/model/hd/data/MTreatmentRangesData.h \ sources/model/hd/data/treatment/MTreatmentDialysateFlowData.h \ @@ -391,7 +394,6 @@ sources/view/hd/data/post/VHDPOSTData.h \ sources/view/hd/data/VHDAccelerometerData.h \ sources/view/hd/data/VHDSyringePumpData.h \ - sources/view/hd/data/VHDAirBubbleData.h \ sources/view/hd/data/VHDBloodLeakData.h \ sources/view/hd/data/treatment/VTreatmentDialysateFlow.h \ sources/view/hd/data/treatment/VTreatmentHeparinData.h \ @@ -459,6 +461,8 @@ sources/model/td/adjustment/settings/MAdjustTDSerialNumberResponse.cpp \ sources/model/td/adjustment/settings/MAdjustTDVersionsRequest.cpp \ sources/model/td/adjustment/settings/MAdjustTDVersionsResponse.cpp \ + sources/model/td/data/MTDAirBubbleData.cpp \ + sources/model/td/data/MTDAirPumpData.cpp \ sources/model/td/data/MTDAirTrapData.cpp \ sources/model/td/data/MTDBatteryData.cpp \ sources/model/td/data/MTDEjectorData.cpp \ @@ -560,7 +564,6 @@ sources/model/hd/data/MHDGeneralEvent.cpp \ sources/model/hd/data/MHDAccelerometerData.cpp \ sources/model/hd/data/MHDSyringePumpData.cpp \ - sources/model/hd/data/MHDAirBubbleData.cpp \ sources/model/hd/data/MHDBloodLeakData.cpp \ sources/model/hd/data/MTreatmentRangesData.cpp \ sources/model/hd/data/treatment/MTreatmentDialysateFlowData.cpp \ @@ -614,6 +617,8 @@ sources/view/VGeneralEvent.cpp \ sources/device/DeviceView.cpp \ \ # ---------- Views - TD - States Data + sources/view/td/data/VTDAirBubbleData.cpp \ + sources/view/td/data/VTDAirPumpData.cpp \ sources/view/td/data/VTDAirTrapData.cpp \ sources/view/td/data/VTDBatteryData.cpp \ sources/view/td/data/VTDEjectorData.cpp \ @@ -678,7 +683,6 @@ \ # ---------- Views - HD - Data sources/view/hd/data/VHDAccelerometerData.cpp \ sources/view/hd/data/VHDSyringePumpData.cpp \ - sources/view/hd/data/VHDAirBubbleData.cpp \ sources/view/hd/data/VHDBloodLeakData.cpp \ \ # ---------- Views - HD - Data - Pre-Treatment sources/view/hd/data/pretreatment/VPreTreatmentSelfTestNoCartridgeData.cpp \ Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r3d13050e0319cf30a1686b58c8f2328f6860910a -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 3d13050e0319cf30a1686b58c8f2328f6860910a) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -83,7 +83,8 @@ {Gui::GuiActionType::ID_Recirculate , 2 * 4 }, // 2 parameters each 4bytes {Gui::GuiActionType::ID_BloodPrime , 2 * 4 }, // 2 parameters each 4bytes {Gui::GuiActionType::ID_TreatmentStop , 2 * 4 }, // 2 parameters each 4bytes - {Gui::GuiActionType::ID_HDAirBubbleData , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_TDAirBubbleData , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_TDAirPumpData , 2 * 4 }, // 2 parameters each 4bytes {Gui::GuiActionType::ID_TDAirTrapData , 6 * 4 }, // 6 parameters each 4bytes {Gui::GuiActionType::ID_HDBloodLeakData , 4 * 4 }, // 4 parameters each 4bytes // ---- Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -r86c040b666b2544800274db2a18ba5374fbfd4e7 -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 86c040b666b2544800274db2a18ba5374fbfd4e7) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -477,8 +477,9 @@ // ----- Datum case Gui::GuiActionType::ID_HDAccelerometerData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDAccelerometerData ); break; case Gui::GuiActionType::ID_HDSyringePumpData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDSyringePumpData ); break; - case Gui::GuiActionType::ID_HDAirBubbleData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDAirBubbleData ); break; case Gui::GuiActionType::ID_TDVoltageData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TDVoltageData ); break; + case Gui::GuiActionType::ID_TDAirBubbleData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TDAirBubbleData ); break; + case Gui::GuiActionType::ID_TDAirPumpData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TDAirPumpData ); break; case Gui::GuiActionType::ID_TDAirTrapData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TDAirTrapData ); break; case Gui::GuiActionType::ID_TDValvesData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TDValvesData ); break; case Gui::GuiActionType::ID_TDBatteryData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TDBatteryData ); break; Index: sources/gui/GuiGlobals.cpp =================================================================== diff -u -r86c040b666b2544800274db2a18ba5374fbfd4e7 -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 86c040b666b2544800274db2a18ba5374fbfd4e7) +++ sources/gui/GuiGlobals.cpp (.../GuiGlobals.cpp) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -89,7 +89,8 @@ #include "VHDAccelerometerData.h" #include "VHDSyringePumpData.h" #include "VHDBloodLeakData.h" -#include "VHDAirBubbleData.h" +#include "VTDAirBubbleData.h" +#include "VTDAirPumpData.h" #include "VTDAirTrapData.h" #include "VTDVoltageData.h" #include "VTDValvesData.h" Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r86c040b666b2544800274db2a18ba5374fbfd4e7 -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 86c040b666b2544800274db2a18ba5374fbfd4e7) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -193,7 +193,7 @@ // DG Data Messages ID_DGROPumpData = 0x1F0F, // 31 //// ----- @CRAPIZED: had to change to avoid duplication - ID_DGDrainPumpData = 0x2400, // 36 + ID_DGDrainPumpData = 0x240F, // ?? //// ----- @CRAPIZED: had to change to avoid duplication ID_DGOperationModeData = 0x270F, // ?? //// ----- @CRAPIZED: had to change to avoid duplication ID_DGReservoirData = 0x280F, // ?? //// ----- @CRAPIZED: had to change to avoid duplication ID_DGLoadCellReadingsData = 0x0C00, // 12 @@ -213,7 +213,8 @@ ID_HDAccelerometerData = 0x3300, // 51 ID_HDSyringePumpData = 0x6900, // 105 ID_HDBloodLeakData = 0x6C00, // 108 - ID_HDAirBubbleData = 0x9300, // 147 + ID_TDAirBubbleData = 0x1E00, // 30 //// ----- @LEAHIZED + ID_TDAirPumpData = 0x2000, // 32 //// ----- @LEAHIZED ID_TDAirTrapData = 0x2A00, // 42 //// ----- @LEAHIZED ID_TDVoltageData = 0x1D00, // 29 //// ----- @LEAHIZED ID_TDValvesData = 0x2B00, // 43 //// ----- @LEAHIZED Index: sources/gui/qml/dialogs/diagnostics/DiagnosticsBase.qml =================================================================== diff -u -r0cb2630813e6f7216adaf990f4129deb87b849bf -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/gui/qml/dialogs/diagnostics/DiagnosticsBase.qml (.../DiagnosticsBase.qml) (revision 0cb2630813e6f7216adaf990f4129deb87b849bf) +++ sources/gui/qml/dialogs/diagnostics/DiagnosticsBase.qml (.../DiagnosticsBase.qml) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -17,8 +17,6 @@ import QtQuick 2.12 // Project -import Gui.VEventSpy 0.1 - // Qml imports import "qrc:/globals" import "qrc:/components" Index: sources/gui/qml/dialogs/diagnostics/DiagnosticsDD.qml =================================================================== diff -u -r86c040b666b2544800274db2a18ba5374fbfd4e7 -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/gui/qml/dialogs/diagnostics/DiagnosticsDD.qml (.../DiagnosticsDD.qml) (revision 86c040b666b2544800274db2a18ba5374fbfd4e7) +++ sources/gui/qml/dialogs/diagnostics/DiagnosticsDD.qml (.../DiagnosticsDD.qml) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -15,8 +15,8 @@ // Qt import QtQuick 2.12 -import Gui.Actions 0.1 // Project +import Gui.Actions 0.1 // Qml imports import "qrc:/globals" import "qrc:/components" @@ -189,7 +189,7 @@ DebugDataColumn { id: _DDTemperatureColumn textObjectName :"_DDTemperatureData" - title : qsTr(" Temperature ") + title : qsTr(" Temp ") x: col(4.5) y: row(0) model: [ @@ -304,11 +304,11 @@ x: col(9) y: row(0) model: [ - vDDConductivity.bicarbCondutivity1 , - vDDConductivity.acidBicarbCondutivity1 , - vDDConductivity.acidBicarbCondutivity2 , - vDDConductivity.spentCondutivity1 , - vDDConductivity.bicarbCondutivity2 , + vDDConductivity.bicarbCondutivity1 .toFixed(2), + vDDConductivity.acidBicarbCondutivity1 .toFixed(2), + vDDConductivity.acidBicarbCondutivity2 .toFixed(2), + vDDConductivity.spentCondutivity1 .toFixed(2), + vDDConductivity.bicarbCondutivity2 .toFixed(2), ] label: [ "bicarb1 ", Index: sources/gui/qml/dialogs/diagnostics/DiagnosticsDialog.qml =================================================================== diff -u -r0cb2630813e6f7216adaf990f4129deb87b849bf -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/gui/qml/dialogs/diagnostics/DiagnosticsDialog.qml (.../DiagnosticsDialog.qml) (revision 0cb2630813e6f7216adaf990f4129deb87b849bf) +++ sources/gui/qml/dialogs/diagnostics/DiagnosticsDialog.qml (.../DiagnosticsDialog.qml) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -17,8 +17,6 @@ import QtQuick 2.12 // Project -import Gui.VEventSpy 0.1 - // Qml imports import "qrc:/globals" import "qrc:/components" Index: sources/gui/qml/dialogs/diagnostics/DiagnosticsSwipe.qml =================================================================== diff -u -r57f4e55fd9102dce870271ec379d44aa478128fe -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/gui/qml/dialogs/diagnostics/DiagnosticsSwipe.qml (.../DiagnosticsSwipe.qml) (revision 57f4e55fd9102dce870271ec379d44aa478128fe) +++ sources/gui/qml/dialogs/diagnostics/DiagnosticsSwipe.qml (.../DiagnosticsSwipe.qml) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -41,8 +41,10 @@ count: view.count currentIndex: view.currentIndex - anchors.bottom: view.bottom anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: view.bottom + anchors.bottomMargin: 10 + spacing: 10 delegate: Rectangle { implicitWidth: 15 Index: sources/gui/qml/dialogs/diagnostics/DiagnosticsTD.qml =================================================================== diff -u -r3d13050e0319cf30a1686b58c8f2328f6860910a -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/gui/qml/dialogs/diagnostics/DiagnosticsTD.qml (.../DiagnosticsTD.qml) (revision 3d13050e0319cf30a1686b58c8f2328f6860910a) +++ sources/gui/qml/dialogs/diagnostics/DiagnosticsTD.qml (.../DiagnosticsTD.qml) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -15,8 +15,8 @@ // Qt import QtQuick 2.12 -import Gui.Actions 0.1 // Project +import Gui.Actions 0.1 // Qml imports import "qrc:/globals" import "qrc:/components" @@ -85,10 +85,42 @@ ] } + DebugDataColumn { id: _TDAirPumpColumn + textObjectName :"_TDAirPumpData" + title : qsTr(" Air Pumps ") + x: col(3) + y: row(0) + model: [ + vTDAirPump.airPumpState , + vTDAirPump.airPumpPower , + + ] + label: [ + "state (H12) ", + "power (H12) ", + ] + } + + DebugDataColumn { id: _TDAirBubblesColumn + textObjectName :"_TDAirBubblesData" + title : qsTr(" Bubbles ") + x: col(3) + y: row(1.5) + model: [ + vTDAirBubble.venousAirBubbleStatus , + vTDAirBubble.venousAirBubbleState , + + ] + label: [ + "status (H18) ", + "state (H18) ", + ] + } + DebugDataColumn { id: _TDValvesColumn textObjectName :"_TDValvesData" - title : qsTr(" Vlv ") - x: col(3) + title : qsTr(" Valves ") + x: col(4.5) y: row(0) model: [ vTDValves.valveId , @@ -109,8 +141,8 @@ DebugDataColumn { id: _TDEjectorColumn textObjectName :"_TDEjectorData" - title : qsTr(" Ejt ") - x: col(4.5) + title : qsTr(" Ejector ") + x: col(6) y: row(0) model: [ vTDEjector.state , @@ -126,7 +158,7 @@ DebugDataColumn { id: _TDSwitchesColumn textObjectName :"_TDSwitchesData" title : qsTr(" Switches ") - x: col(6) + x: col(7.5) y: row(0) model: [ vTDSwitches.door , @@ -137,7 +169,6 @@ ] } - DebugDataColumn { id: _TDTXStatesColumn textObjectName :"_TDTxStatesData" title : qsTr(" TXStates ") @@ -169,25 +200,25 @@ ] } - DebugDataColumn { id: _TDBatteryCoulumn - textObjectName :"_TDBatterypData" - title : qsTr(" Battery ") - x: col(1.5) - y: row(3.5) + DebugDataColumn { id: _TDOpModeColumn + textObjectName :"_TDOpmodeData" + title : qsTr(" Opmode ") + x: col(0) + y: row(7) model: [ - vTDBattery.acPower , - vTDBattery.capacity , + vTDOpMode.opMode , + vTDOpMode.subMode ] label: [ - "AC ", - "cap ", + "opMode " , + "subMode " ] } DebugDataColumn { id: _TDVoltageCoulumn textObjectName :"_TDVoltageData" - title : qsTr(" Vol ") - x: col(3) + title : qsTr(" Volume ") + x: col(1.5) y: row(3.5) model: [ vTDVoltage.line_1_2V .toFixed(2) , @@ -217,6 +248,41 @@ ] } + DebugDataColumn { id: _TDPressureOcclusionCoulumn + textObjectName :"_TDPressureData" + title : qsTr(" Pressure ") + x: col(3) + y: row(3.5) + model: [ + vTreatmentPressureOcclusion.arterialPressure .toFixed(2), + vTreatmentPressureOcclusion.venousPressure , + vTreatmentPressureOcclusion.limitState , + vTreatmentPressureOcclusion.arterialMin , + vTreatmentPressureOcclusion.arterialMax , + vTreatmentPressureOcclusion.venousMin , + vTreatmentPressureOcclusion.venousMax , + vTreatmentPressureOcclusion.arterialLongFilter .toFixed(2), + vTreatmentPressureOcclusion.venousLongFilter .toFixed(2), + vTreatmentPressureOcclusion.tmpPressure .toFixed(2), + vTreatmentPressureOcclusion.tmpMin .toFixed(2), + vTreatmentPressureOcclusion.tmpMax .toFixed(2) + ] + label: [ + "Arterial (H12) " , + "Venous (H14) " , + "limit " , + "artMin (H12) " , + "artMax (H12) " , + "venMin (H14) " , + "venMax (H14) " , + "aLong (H12) " , + "vLong (H14) " , + "TMP " , + "tmpMin " , + "tmpMax " , + ] + } + DebugDataColumn { id: _TDTemperatureCoulumn textObjectName :"_TDTemperatureData" title : qsTr(" Temp ") @@ -230,7 +296,22 @@ ] } + DebugDataColumn { id: _TDBatteryCoulumn + textObjectName :"_TDBatteryData" + title : qsTr(" Battery ") + x: col(6) + y: row(3.5) + model: [ + vTDBattery.acPower , + vTDBattery.capacity , + ] + label: [ + "AC ", + "cap ", + ] + } + // TODO: The TouchRect should be unnecessary since the first communication message with UI/TD is the version. TouchRect { x : col(9.0) Index: sources/gui/qml/main.qml =================================================================== diff -u -r86c040b666b2544800274db2a18ba5374fbfd4e7 -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/gui/qml/main.qml (.../main.qml) (revision 86c040b666b2544800274db2a18ba5374fbfd4e7) +++ sources/gui/qml/main.qml (.../main.qml) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -26,7 +26,8 @@ import VHDAccelerometer 0.1 import VHDSyringePump 0.1 import VHDBloodLeak 0.1 -import VHDAirBubble 0.1 +import VTDAirBubble 0.1 +import VTDAirPump 0.1 import VTDAirTrap 0.1 import VTDVoltage 0.1 import VTDValves 0.1 @@ -193,7 +194,8 @@ VGeneralEvent { id: vGeneralEvent } VHDAccelerometer { id: vHDAccelerometer } VHDSyringePump { id: vHDSyringePump } - VHDAirBubble { id: vHDAirBubble } + VTDAirBubble { id: vTDAirBubble } + VTDAirPump { id: vTDAirPump } VHDBloodLeak { id: vHDBloodLeak } VTDAirTrap { id: vTDAirTrap } VTDVoltage { id: vTDVoltage } Index: sources/model/MModel.h =================================================================== diff -u -r86c040b666b2544800274db2a18ba5374fbfd4e7 -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/model/MModel.h (.../MModel.h) (revision 86c040b666b2544800274db2a18ba5374fbfd4e7) +++ sources/model/MModel.h (.../MModel.h) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -62,9 +62,10 @@ #include "MHDAccelerometerData.h" #include "MHDSyringePumpData.h" #include "MHDBloodLeakData.h" -#include "MHDAirBubbleData.h" #include "MHDRTCEpochData.h" #include "MHDUsageInfoResponse.h" +#include "MTDAirBubbleData.h" +#include "MTDAirPumpData.h" #include "MTDAirTrapData.h" #include "MTDVoltageData.h" #include "MTDValvesData.h" @@ -353,7 +354,8 @@ REGISTER_METATYPE( TDSwitchesData ) \ REGISTER_METATYPE( TDEjectorData ) \ REGISTER_METATYPE( TDTemperatureData ) \ - REGISTER_METATYPE( HDAirBubbleData ) \ + REGISTER_METATYPE( TDAirBubbleData ) \ + REGISTER_METATYPE( TDAirPumpData ) \ REGISTER_METATYPE( HDUsageInfoResponseData ) \ REGISTER_METATYPE( HDUsageInfoRequestData ) \ /* Treatment Log */ \ @@ -540,7 +542,8 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, HDSyringePumpData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, HDAccelerometerData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, HDBloodLeakData ) \ - ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, HDAirBubbleData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TDAirBubbleData ) \ + ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TDAirPumpData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TDAirTrapData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TDVoltageData ) \ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, TDTemperatureData ) \ @@ -746,7 +749,8 @@ ACTION_RECEIVE_BRIDGE_DEFINITION( HDSyringePumpData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( HDAccelerometerData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( HDBloodLeakData ) \ - ACTION_RECEIVE_BRIDGE_DEFINITION( HDAirBubbleData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( TDAirBubbleData ) \ + ACTION_RECEIVE_BRIDGE_DEFINITION( TDAirPumpData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( TDAirTrapData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( TDVoltageData ) \ ACTION_RECEIVE_BRIDGE_DEFINITION( TDValvesData ) \ @@ -1063,7 +1067,8 @@ ACTION_RECEIVE_SIGNAL( TDSwitchesData ) \ ACTION_RECEIVE_SIGNAL( TDEjectorData ) \ ACTION_RECEIVE_SIGNAL( TDTemperatureData ) \ - ACTION_RECEIVE_SIGNAL( HDAirBubbleData ) \ + ACTION_RECEIVE_SIGNAL( TDAirBubbleData ) \ + ACTION_RECEIVE_SIGNAL( TDAirPumpData ) \ /* Alarms */ \ ACTION_RECEIVE_SIGNAL( AlarmStatusData ) \ ACTION_RECEIVE_SIGNAL( AlarmTriggeredData ) \ Index: sources/model/dd/data/MDDDialysatePumpData.h =================================================================== diff -u -r3d13050e0319cf30a1686b58c8f2328f6860910a -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/model/dd/data/MDDDialysatePumpData.h (.../MDDDialysatePumpData.h) (revision 3d13050e0319cf30a1686b58c8f2328f6860910a) +++ sources/model/dd/data/MDDDialysatePumpData.h (.../MDDDialysatePumpData.h) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -101,31 +101,31 @@ public: - Type_Enum typeText () const override { return Type_Enum::eDatum ; } - Unit_Enum unitText () const override { return Unit_Enum::eDD ; } - QString infoText () const override { return QString("DialysatePump"); } + Type_Enum typeText () const override { return Type_Enum::eDatum ; } + Unit_Enum unitText () const override { return Unit_Enum::eDD ; } + QString infoText () const override { return QString("DialysatePump") ; } struct Data { - float mD12PumpTargetRPM = 0; ///< Dialysate pump D11_Pump current set speed - float mD48PumpTargetRPM = 0; ///< Dialysate pump D11_Pump measured speed - float mD12PumpMeasuredSpeed = 0; ///< Dialysate pump D10_Pump current set speed - float mD48PumpMeasuredSpeed = 0; ///< Dialysate pump D10_Pump measured speed - float mD12PumpCurrentSpeed = 0; ///< Dialysate pump D11_Pump target revolution count - float mD48PumpCurrentSpeed = 0; ///< Dialysate pump D11_Pump measured revolution count - quint32 mD12PumpState = 0; ///< Dialysate pump D10_Pump target revolution count - quint32 mD48PumpState = 0; ///< Dialysate pump D10_Pump measured revolution count - float mD12PumpTargetPressure = 0; ///< Dialysate pump D11_Pump current state - float mD48PumpTargetPressure = 0; ///< Dialysate pump D10_Pump current state - float mD12PumpMeasuredPressure = 0; ///< Dialysate pump D11_Pump pulse in microseconds - float mD48PumpMeasuredPressure = 0; ///< Dialysate pump D10_Pump pulse in microseconds - float mD12PumpMeasuredCurrent = 0; ///< Dialysate pump D11_Pump target speed - float mD48PumpMeasuredCurrent = 0; ///< Dialysate pump D10_Pump target speed - quint32 mD12PumpControl = 0; ///< Dialysate pump D11_Pump parked status - quint32 mD48PumpControl = 0; ///< Dialysate pump D10_Pump parked status - quint32 mD12PumpDirErrCnt = 0; ///< Dialysate pump D11_Pump park fault status - quint32 mD48PumpDirErrCnt = 0; ///< Dialysate pump D10_Pump park fault status - quint32 mD12PumpMeasuredDir = 0; ///< Dialysate pump D76_Pump target speed - quint32 mD48PumpMeasuredDir = 0; ///< Dialysate pump D76_Pump current set speed + float mD12PumpTargetRPM = 0; ///< Fresh dialysate pump speed set point. + float mD48PumpTargetRPM = 0; ///< Spent dialysate pump speed set point. + float mD12PumpMeasuredSpeed = 0; ///< Fresh dialysate pump measured speed. + float mD48PumpMeasuredSpeed = 0; ///< Spent dialysate pump measured speed. + float mD12PumpCurrentSpeed = 0; ///< Fresh dialysate pump current speed. + float mD48PumpCurrentSpeed = 0; ///< Spent dialysate pump current speed. + quint32 mD12PumpState = 0; ///< Fresh dialysate pump state machine state. + quint32 mD48PumpState = 0; ///< Spent state machine state. + float mD12PumpTargetPressure = 0; ///< Fresh dialysate pump target pressure. + float mD48PumpTargetPressure = 0; ///< Spent dialysate pump target pressure. + float mD12PumpMeasuredPressure = 0; ///< Fresh dialysate pump measured pressure. + float mD48PumpMeasuredPressure = 0; ///< Spent dialysate pump measured pressure. + float mD12PumpMeasuredCurrent = 0; ///< Fresh dialysate pump measured current. + float mD48PumpMeasuredCurrent = 0; ///< Spent dialysate pump measured current. + quint32 mD12PumpControl = 0; ///< Fresh dialysate pump control to check run/stop state. + quint32 mD48PumpControl = 0; ///< Spent dialysate pump control to check run/stop state. + quint32 mD12PumpDirErrCnt = 0; ///< Fresh dialysate pump direction error count. + quint32 mD48PumpDirErrCnt = 0; ///< Spent dialysate pump direction error count. + quint32 mD12PumpMeasuredDir = 0; ///< Fresh dialysate pump direction. + quint32 mD48PumpMeasuredDir = 0; ///< Spent dialysate pump direction. }; MDDDialysatePump() { } Index: sources/model/dd/data/MDDHeatersData.h =================================================================== diff -u -r0cb2630813e6f7216adaf990f4129deb87b849bf -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/model/dd/data/MDDHeatersData.h (.../MDDHeatersData.h) (revision 0cb2630813e6f7216adaf990f4129deb87b849bf) +++ sources/model/dd/data/MDDHeatersData.h (.../MDDHeatersData.h) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -40,20 +40,20 @@ * | #02:(F32) | \ref Data::mTrimmerHeaterDC | * | #03:(F32) | \ref Data::mPrimaryTargetTemp | * | #04:(F32) | \ref Data::mTrimmerTargetTemp | - * | #05:(F32) | \ref Data::mPrimaryHeaterState | - * | #06:(F32) | \ref Data::mTrimmerHeaterState | - * | #07:(F32) | \ref Data::mPrimaryHeaterIntervalCount | - * | #08:(F32) | \ref Data::mTrimmerHeaterIntervalCount | + * | #05:(U32) | \ref Data::mPrimaryHeaterState | + * | #06:(U32) | \ref Data::mTrimmerHeaterState | + * | #07:(U32) | \ref Data::mPrimaryHeaterIntervalCount | + * | #08:(U32) | \ref Data::mTrimmerHeaterIntervalCount | * * | #09:(F32) | \ref Data::dbg1 | # All the below payload will only be available during debug period and may be removed in the future * | #10:(F32) | \ref Data::dbg2 | * | #11:(F32) | \ref Data::dbg3 | * | #12:(F32) | \ref Data::dbg4 | - * | #13:(U32) | \ref Data::dbg5 | - * | #14:(U32) | \ref Data::dbg6 | - * | #15:(U32) | \ref Data::dbg7 | - * | #16:(U32) | \ref Data::dbg8 | - * | #17:(U32) | \ref Data::dbg9 | + * | #13:(F32) | \ref Data::dbg5 | + * | #14:(F32) | \ref Data::dbg6 | + * | #15:(F32) | \ref Data::dbg7 | + * | #16:(F32) | \ref Data::dbg8 | + * | #17:(F32) | \ref Data::dbg9 | * * \sa Data * @@ -105,10 +105,10 @@ float mTrimmerHeaterDC = 0; ///< Trimmer heater Duty Cycle float mPrimaryTargetTemp = 0; ///< Primary heater target temperature float mTrimmerTargetTemp = 0; ///< Trimmer heater target temperature - float mPrimaryHeaterState = 0; ///< Primary heater state - float mTrimmerHeaterState = 0; ///< Trimmer heater state - float mPrimaryHeaterIntervalCount = 0; ///< Primary heater control interval count - float mTrimmerHeaterIntervalCount = 0; ///< Trimmer heater control interval count + quint32 mPrimaryHeaterState = 0; ///< Primary heater state + quint32 mTrimmerHeaterState = 0; ///< Trimmer heater state + quint32 mPrimaryHeaterIntervalCount = 0; ///< Primary heater control interval count + quint32 mTrimmerHeaterIntervalCount = 0; ///< Trimmer heater control interval count ///< All the below payload will only be available during debug period and may be removed in the future float dbg1 = 0; Index: sources/model/dd/data/MDDValvesStatesData.h =================================================================== diff -u -r3d13050e0319cf30a1686b58c8f2328f6860910a -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/model/dd/data/MDDValvesStatesData.h (.../MDDValvesStatesData.h) (revision 3d13050e0319cf30a1686b58c8f2328f6860910a) +++ sources/model/dd/data/MDDValvesStatesData.h (.../MDDValvesStatesData.h) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -36,22 +36,14 @@ * * | Payload || * | || - * | #01:(U16) | \ref Data::mStates | - * | #02:(U08) | \ref Data::mVRf | - | #03:(U08) | \ref Data::mVRi | - | #04:(U08) | \ref Data::mRes | - | #05:(U08) | \ref Data::mVRo | - | #06:(U08) | \ref Data::mVPo | - | #07:(U08) | \ref Data::mVBf | - | #08:(U08) | \ref Data::mVRc | - | #09:(U08) | \ref Data::mVDr | - | #10:(U08) | \ref Data::mVPi | - | #11:(U08) | \ref Data::mVSP | - | #12:(U08) | \ref Data::mVR1 | - | #13:(U08) | \ref Data::mVR2 | - | #14:(U08) | \ref Data::mVPd | - + * | #01:(U16) | \ref Data::mValvesStatus | + * | #02:(U08) | \ref Data::mValvesBCStatus | + * | #03:(U08) | \ref Data::mValvesUFStatus | + * | #04:(U08) | \ref Data::mValvesSensedState1 | + * | #..:(U08) | \ref Data::mValvesSensedState.. | + * | #31:(U08) | \ref Data::mValvesSensedState28 | * + * * \sa Data * \sa Flag * Index: sources/model/td/data/MTDAirBubbleData.cpp =================================================================== diff -u -r47aa5719d35c6023a9a612f16da694f08ffa27be -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/model/td/data/MTDAirBubbleData.cpp (.../MTDAirBubbleData.cpp) (revision 47aa5719d35c6023a9a612f16da694f08ffa27be) +++ sources/model/td/data/MTDAirBubbleData.cpp (.../MTDAirBubbleData.cpp) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -5,28 +5,28 @@ * 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 MHDAirBubbleData.cpp + * \file MTDAirBubbleData.cpp * \author (last) Dara Navaei * \date (last) 27-Feb-2024 * \author (original) Michael Garthwaite * \date (original) 23-Feb-2022 * */ -#include "MHDAirBubbleData.h" +#include "MTDAirBubbleData.h" using namespace Model; -QVariantList MHDAirBubbleData::parameters() const { +QVariantList MTDAirBubbleData::parameters() const { return { - _data.mVenousAirBubbleStatus .value, - _data.mVenousAirBubbleState .value, + _data.h18Status .value, + _data.h18State .value, }; } -bool MHDAirBubbleData::fromByteArray(const QByteArray &vByteArray, int *vIndex) { +bool MTDAirBubbleData::fromByteArray(const QByteArray &vByteArray, int *vIndex) { int index = 0; - if ( ! GetValue(vByteArray, index, _data.mVenousAirBubbleStatus )) goto lError; - if ( ! GetValue(vByteArray, index, _data.mVenousAirBubbleState )) goto lError; + if ( ! GetValue(vByteArray, index, _data.h18Status )) goto lError; + if ( ! GetValue(vByteArray, index, _data.h18State )) goto lError; return true ; @@ -37,13 +37,13 @@ } /*! - * \brief MHDAirBubbleData::data + * \brief MTDAirBubbleData::data * \details Provides model's Data from the received messages data values * \return Data */ -MHDAirBubbleData::Data MHDAirBubbleData::data() const{ +MTDAirBubbleData::Data MTDAirBubbleData::data() const{ Data data; - data.mVenousAirBubbleStatus = _data.mVenousAirBubbleStatus.value; - data.mVenousAirBubbleState = _data.mVenousAirBubbleState.value; + data.mVenousAirBubbleStatus = _data.h18Status .value; + data.mVenousAirBubbleState = _data.h18State .value; return data; } Index: sources/model/td/data/MTDAirBubbleData.h =================================================================== diff -u -r47aa5719d35c6023a9a612f16da694f08ffa27be -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/model/td/data/MTDAirBubbleData.h (.../MTDAirBubbleData.h) (revision 47aa5719d35c6023a9a612f16da694f08ffa27be) +++ sources/model/td/data/MTDAirBubbleData.h (.../MTDAirBubbleData.h) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -5,7 +5,7 @@ * 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 MHDAirBubbleData.h + * \file MTDAirBubbleData.h * \author (last) Behrouz NematiPour * \date (last) 09-Mar-2022 * \author (original) Michael Garthwaite @@ -28,12 +28,12 @@ namespace Model { /*! - * \brief The MHDAirBubbleData class - * \details The HD Air Bubble data model + * \brief The MTDAirBubbleData class + * \details The TD Air Bubble data model * - * | MSG | CAN ID | Type | Ack | Src | Dst | Description | - * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------: | - * |0x9300| 0x040 | 1 Hz | N | HD | All | HD Air Bubble Data | + * | MSG | CAN ID | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------: | + * |0x1E00| 0x100 | 1 Hz | N | TD | All | TD Air Bubble Data | * * | Payload || * | || @@ -46,20 +46,20 @@ * | || * | || * | typeText | Datum | - * | unitText | HD | + * | unitText | TD | * | infoText | AirBubble | * */ -class MHDAirBubbleData : public MAbstract { +class MTDAirBubbleData : public MAbstract { // friends friend class ::tst_models; QVariantList parameters() const override; struct { - Types::U32 mVenousAirBubbleStatus ; - Types::U32 mVenousAirBubbleState ; + Types::U32 h18Status ; + Types::U32 h18State ; } _data; public: @@ -74,11 +74,11 @@ quint32 mVenousAirBubbleState = 0; ///< Air Bubble State }; - MHDAirBubbleData () { } + MTDAirBubbleData () { } bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; Data data ( ) const ; }; } -typedef Model::MHDAirBubbleData::Data HDAirBubbleData; +typedef Model::MTDAirBubbleData::Data TDAirBubbleData; Index: sources/model/td/data/MTDAirPumpData.cpp =================================================================== diff -u --- sources/model/td/data/MTDAirPumpData.cpp (revision 0) +++ sources/model/td/data/MTDAirPumpData.cpp (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -0,0 +1,49 @@ +/*! + * + * Copyright (c) 2022-2024 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 MTDAirPumpData.cpp + * \author (last) Dara Navaei + * \date (last) 27-Feb-2024 + * \author (original) Michael Garthwaite + * \date (original) 23-Feb-2022 + * + */ +#include "MTDAirPumpData.h" + +using namespace Model; + +QVariantList MTDAirPumpData::parameters() const { + return { + _data.h12State .value, + _data.h12Power .value, + }; +} + +bool MTDAirPumpData::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; + if ( ! GetValue(vByteArray, index, _data.h12State )) goto lError; + if ( ! GetValue(vByteArray, index, _data.h12Power )) goto lError; + + return true ; + +lError: + if(vIndex) { *vIndex = index; } + + return false ; +} + +/*! + * \brief MTDAirPumpData::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MTDAirPumpData::Data MTDAirPumpData::data() const{ + Data data; + data.mAirPumpState = _data.h12State .value; + data.mAirPumpPower = _data.h12Power .value; + return data; +} Index: sources/model/td/data/MTDAirPumpData.h =================================================================== diff -u --- sources/model/td/data/MTDAirPumpData.h (revision 0) +++ sources/model/td/data/MTDAirPumpData.h (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -0,0 +1,84 @@ +/*! + * + * Copyright (c) 2022-2024 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 MTDAirPumpData.h + * \author (last) Behrouz NematiPour + * \date (last) 09-Mar-2022 + * \author (original) Michael Garthwaite + * \date (original) 23-Feb-2022 + * + */ +#pragma once + + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MTDAirPumpData class + * \details The TD Air Pump data model + * + * | MSG | CAN ID | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------: | + * |0x2000| 0x100 | 1 Hz | N | TD | All | TD Air Pump Data | + * + * | Payload || + * | || + * | #1:(U32) | \ref Data::mAirPumpState | + * | #2:(U32) | \ref Data::mAirPumpPower | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | TD | + * | infoText | AirPump | + * + */ +class MTDAirPumpData : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::U32 h12State ; + Types::U32 h12Power ; + } _data; + +public: + + Type_Enum typeText() const override { return Type_Enum::eDatum ; } + Unit_Enum unitText() const override { return Unit_Enum::eTD ; } + QString infoText() const override { return QString("AirPump") ; } + + + struct Data { + quint32 mAirPumpState = 0; ///< Air Pump State + quint32 mAirPumpPower = 0; ///< Air Pump Power + }; + + MTDAirPumpData () { } + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; + +}; +} + +typedef Model::MTDAirPumpData::Data TDAirPumpData; Index: sources/model/td/data/MTDPressureData.cpp =================================================================== diff -u --- sources/model/td/data/MTDPressureData.cpp (revision 0) +++ sources/model/td/data/MTDPressureData.cpp (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -0,0 +1,79 @@ +/*! + * + * Copyright (c) 2022-2025 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 MTDPressureData.cpp + * \author (last) Dara Navaei + * \date (last) 27-Feb-2024 + * \author (original) Michael Garthwaite + * \date (original) 23-Feb-2022 + * + */ +#include "MTDPressureData.h" + +using namespace Model; + +QVariantList MTDPressureData::parameters() const { + return { + _data.mH2Pressure .value, + _data.mH14Pressure .value, + _data.mPresLimitState .value, + _data.mH2MinLimit .value, + _data.mH2MaxLimit .value, + _data.mH14MinLimit .value, + _data.mH14MaxLimit .value, + _data.mH2LongFilterPres .value, + _data.mH14LongFilterPres .value, + _data.mTmpPressure .value, + _data.mTmpMinLimit .value, + _data.mTmpMaxLimit .value, + }; +} + +bool MTDPressureData::fromByteArray(const QByteArray &vByteArray, int *vIndex) { + int index = 0; + if ( ! GetValue(vByteArray, index, _data.mH2Pressure )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mH14Pressure )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mPresLimitState )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mH2MinLimit )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mH2MaxLimit )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mH14MinLimit )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mH14MaxLimit )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mH2LongFilterPres )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mH14LongFilterPres )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mTmpPressure )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mTmpMinLimit )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mTmpMaxLimit )) goto lError; + + return true ; + +lError: + if(vIndex) { *vIndex = index; } + + return false ; +} + +/*! + * \brief MTDPressureData::data + * \details Provides model's Data from the received messages data values + * \return Data + */ +MTDPressureData::Data MTDPressureData::data() const{ + Data data; + data.mArterialPressure = _data.mH2Pressure .value; + data.mVenousPressure = _data.mH14Pressure .value; + data.mPresLimitState = _data.mPresLimitState .value; + data.mArterialMinLimit = _data.mH2MinLimit .value; + data.mArterialMaxLimit = _data.mH2MaxLimit .value; + data.mVenousMinLimit = _data.mH14MinLimit .value; + data.mVenousMaxLimit = _data.mH14MaxLimit .value; + data.mArterialLongFilterPres = _data.mH2LongFilterPres .value; + data.mVenousLongFilterPres = _data.mH14LongFilterPres .value; + data.mTransmembranePressure = _data.mTmpPressure .value; + data.mTransmembraneMinLimit = _data.mTmpMinLimit .value; + data.mTransmembraneMaxLimit = _data.mTmpMaxLimit .value; + return data; +} Index: sources/model/td/data/MTDPressureData.h =================================================================== diff -u --- sources/model/td/data/MTDPressureData.h (revision 0) +++ sources/model/td/data/MTDPressureData.h (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -0,0 +1,112 @@ +/*! + * + * Copyright (c) 2022-2025 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 MTDPressureData.h + * \author (original) Tiffany Mejia + * \date (original) 07-May-2025 + * + */ +#pragma once + + +// Qt +#include + +// Project +#include "MAbstract.h" +#include "types.h" + +// forward declarations +class tst_models; + +namespace Model { + +/*! + * \brief The MTDPressureData class + * \details The TD Pressure data model + * + * | MSG | CAN ID | Type | Ack | Src | Dst | Description | + * |:----:|:------:|:------:|:---:|:---:|:---:|:-----------: | + * |0x2400| 0x100 | 1 Hz | N | TD | All | TD Pressure Data | + * + * | Payload || + * | || + * | #01:(U32) | \ref Data::mArterialPressure | + * | #02:(U32) | \ref Data::mVenousPressure | + * | #03:(U32) | \ref Data::mPresLimitState | + * | #04:(U32) | \ref Data::mArterialMinLimit | + * | #05:(U32) | \ref Data::mArterialMaxLimit | + * | #06:(U32) | \ref Data::mVenousMinLimit | + * | #07:(U32) | \ref Data::mVenousMaxLimit | + * | #08:(U32) | \ref Data::mArterialLongFilterPres | + * | #09:(U32) | \ref Data::mVenousLongFilterPres | + * | #10:(U32) | \ref Data::mTransmembranePressure | + * | #11:(U32) | \ref Data::mTransmembraneMinLimit | + * | #12:(U32) | \ref Data::mTransmembraneMaxLimit | + * + * \sa Data + * + *

Logging info

+ * | || + * | || + * | typeText | Datum | + * | unitText | TD | + * | infoText | Pressure | + * + */ +class MTDPressureData : public MAbstract { + + // friends + friend class ::tst_models; + + QVariantList parameters() const override; + + struct { + Types::F32 mH2Pressure ; + Types::F32 mH14Pressure ; + Types::U32 mPresLimitState ; + Types::S32 mH2MinLimit ; + Types::S32 mH2MaxLimit ; + Types::S32 mH14MinLimit ; + Types::S32 mH14MaxLimit ; + Types::F32 mH2LongFilterPres ; + Types::F32 mH14LongFilterPres ; + Types::F32 mTmpPressure ; + Types::F32 mTmpMinLimit ; + Types::F32 mTmpMaxLimit ; + } _data; + +public: + + Type_Enum typeText() const override { return Type_Enum::eDatum ; } + Unit_Enum unitText() const override { return Unit_Enum::eTD ; } + QString infoText() const override { return QString("Pressure") ; } + + + struct Data { + float mArterialPressure = 0; ///< Latest arterial pressure (mmHg) + float mVenousPressure = 0; ///< Latest venous pressure (mmHg) + quint32 mPresLimitState = 0; ///< Current pressure limits state (enum-stabilization or stable) + qint32 mArterialMinLimit = 0; ///< Current arterial minimum pressure limit (mmHg) + qint32 mArterialMaxLimit = 0; ///< Current arterial maximum pressure limit (mmHg) + qint32 mVenousMinLimit = 0; ///< Current venous minimum pressure limit (mmHg) + qint32 mVenousMaxLimit = 0; ///< Current venous maximum pressure limit (mmHg) + float mArterialLongFilterPres = 0; ///< Latest long filtered arterial pressure (mmHg) + float mVenousLongFilterPres = 0; ///< Latest long filtered venous pressure (mmHg) + float mTransmembranePressure = 0; ///< Latest trans-membrane pressure (mmHg) + float mTransmembraneMinLimit = 0; ///< Current TMP minimum pressure limit (mmHg) + float mTransmembraneMaxLimit = 0; ///< Current TMP maximum pressure limit (mmHg) + }; + + MTDPressureData () { } + bool fromByteArray (const QByteArray &vByteArray , int *vIndex = nullptr) override; + Data data ( ) const ; + +}; +} + +typedef Model::MTDPressureData::Data TDPressureData; Index: sources/view/VView.h =================================================================== diff -u -r86c040b666b2544800274db2a18ba5374fbfd4e7 -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/view/VView.h (.../VView.h) (revision 86c040b666b2544800274db2a18ba5374fbfd4e7) +++ sources/view/VView.h (.../VView.h) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -170,7 +170,8 @@ REGISTER_TYPE( VHDAccelerometer ) \ REGISTER_TYPE( VHDSyringePump ) \ REGISTER_TYPE( VHDBloodLeak ) \ - REGISTER_TYPE( VHDAirBubble ) \ + REGISTER_TYPE( VTDAirBubble ) \ + REGISTER_TYPE( VTDAirPump ) \ REGISTER_TYPE( VTDAirTrap ) \ REGISTER_TYPE( VTDVoltage ) \ REGISTER_TYPE( VTDValves ) \ Index: sources/view/td/data/VTDAirBubbleData.cpp =================================================================== diff -u -r47aa5719d35c6023a9a612f16da694f08ffa27be -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/view/td/data/VTDAirBubbleData.cpp (.../VTDAirBubbleData.cpp) (revision 47aa5719d35c6023a9a612f16da694f08ffa27be) +++ sources/view/td/data/VTDAirBubbleData.cpp (.../VTDAirBubbleData.cpp) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -5,21 +5,21 @@ * 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 VHDAirBubbleData.cpp + * \file VTDAirBubbleData.cpp * \author (last) Behrouz NematiPour * \date (last) 09-Mar-2022 * \author (original) Michael Garthwaite * \date (original) 23-Feb-2022 * */ -#include "VHDAirBubbleData.h" +#include "VTDAirBubbleData.h" // Project #include "GuiController.h" -VIEW_DEF(VHDAirBubble, HDAirBubbleData) +VIEW_DEF(VTDAirBubble, TDAirBubbleData) -void VHDAirBubble::onActionReceive(const HDAirBubbleData &vData) { +void VTDAirBubble::onActionReceive(const TDAirBubbleData &vData) { venousAirBubbleStatus (vData.mVenousAirBubbleStatus); venousAirBubbleState (vData.mVenousAirBubbleState ); } Index: sources/view/td/data/VTDAirBubbleData.h =================================================================== diff -u -r47aa5719d35c6023a9a612f16da694f08ffa27be -r3c07dc803109f716937b692cb4a67a5324bb9ca3 --- sources/view/td/data/VTDAirBubbleData.h (.../VTDAirBubbleData.h) (revision 47aa5719d35c6023a9a612f16da694f08ffa27be) +++ sources/view/td/data/VTDAirBubbleData.h (.../VTDAirBubbleData.h) (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -5,7 +5,7 @@ * 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 VHDAirBubbleData.h + * \file VTDAirBubbleData.h * \author (last) Behrouz NematiPour * \date (last) 09-Mar-2022 * \author (original) Michael Garthwaite @@ -20,24 +20,24 @@ // Project #include "main.h" // Doxygen : do not remove #include "VView.h" -#include "MHDAirBubbleData.h" +#include "MTDAirBubbleData.h" // namespace namespace View { /*! - * \brief The VHDAirBubble class + * \brief The VTDAirBubble class * \details View for Model's Data representation. * - * \sa Model::MHDAirBubbleData + * \sa Model::MTDAirBubbleData * */ -class VHDAirBubble : public QObject { +class VTDAirBubble : public QObject { Q_OBJECT PROPERTY( quint32 , venousAirBubbleStatus , 0) PROPERTY( quint32 , venousAirBubbleState , 0) - VIEW_DEC(VHDAirBubble, HDAirBubbleData) + VIEW_DEC(VTDAirBubble, TDAirBubbleData) }; } Index: sources/view/td/data/VTDAirPumpData.cpp =================================================================== diff -u --- sources/view/td/data/VTDAirPumpData.cpp (revision 0) +++ sources/view/td/data/VTDAirPumpData.cpp (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -0,0 +1,25 @@ +/*! + * + * Copyright (c) 2022-2024 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 VTDAirPumpData.cpp + * \author (last) Behrouz NematiPour + * \date (last) 09-Mar-2022 + * \author (original) Michael Garthwaite + * \date (original) 23-Feb-2022 + * + */ +#include "VTDAirPumpData.h" + +// Project +#include "GuiController.h" + +VIEW_DEF(VTDAirPump, TDAirPumpData) + +void VTDAirPump::onActionReceive(const TDAirPumpData &vData) { + airPumpState (vData.mAirPumpState ); + airPumpPower (vData.mAirPumpPower ); +} Index: sources/view/td/data/VTDAirPumpData.h =================================================================== diff -u --- sources/view/td/data/VTDAirPumpData.h (revision 0) +++ sources/view/td/data/VTDAirPumpData.h (revision 3c07dc803109f716937b692cb4a67a5324bb9ca3) @@ -0,0 +1,43 @@ +/*! + * + * Copyright (c) 2022-2024 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 VTDAirPumpData.h + * \author (last) Dara Navaei + * \date (last) 27-Feb-2024 + * \author (original) Michael Garthwaite + * \date (original) 23-Feb-2022 + * + */ +#pragma once + +// Qt +#include + +// Project +#include "main.h" // Doxygen : do not remove +#include "VView.h" +#include "MTDAirPumpData.h" + +// namespace +namespace View { + +/*! + * \brief The VTDAirPumpData class + * \details View for Model's Data representation. + * + * \sa Model::MTDAirPumpData + * + */ +class VTDAirPump : public QObject { + Q_OBJECT + + PROPERTY( quint32 , airPumpState , 0) + PROPERTY( quint32 , airPumpPower , 0) + + VIEW_DEC(VTDAirPump, TDAirPumpData) +}; +}