Index: denali.pro.user =================================================================== diff -u -r7710fea4486a639caaa3c510add0eac0bcd4ddcc -r7777127f3b60d5f884cd07adc9d586353d914f69 --- denali.pro.user (.../denali.pro.user) (revision 7710fea4486a639caaa3c510add0eac0bcd4ddcc) +++ denali.pro.user (.../denali.pro.user) (revision 7777127f3b60d5f884cd07adc9d586353d914f69) @@ -1,6 +1,6 @@ - + EnvironmentId Index: sources/canbus/MessageDispatcher.cpp =================================================================== diff -u -r7710fea4486a639caaa3c510add0eac0bcd4ddcc -r7777127f3b60d5f884cd07adc9d586353d914f69 --- sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 7710fea4486a639caaa3c510add0eac0bcd4ddcc) +++ sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 7777127f3b60d5f884cd07adc9d586353d914f69) @@ -343,14 +343,14 @@ * \param vData - Data model contains the user acknowledge request information. * \return void */ -/* coco begin validated: Manually tested. This model class is a placeholder and there is no use case for this now. +/* // coco begin validated: Manually tested. This model class is a placeholder and there is no use case for this now. void MessageDispatcher::onAdjustment(const AlarmClearedConditionRequestData &vData) { QVariantList mData; mData += vData.alarmID; onActionTransmit(GuiActionType::ID_AlarmClearedConditionReq, mData); } -coco end */ +// coco end */ /*! * \brief MessageDispatcher::onAdjustment Index: sources/view/VTreatmentBegin.h =================================================================== diff -u -r1f8abdd821041623392d18cf4f80cad9ae1bf246 -r7777127f3b60d5f884cd07adc9d586353d914f69 --- sources/view/VTreatmentBegin.h (.../VTreatmentBegin.h) (revision 1f8abdd821041623392d18cf4f80cad9ae1bf246) +++ sources/view/VTreatmentBegin.h (.../VTreatmentBegin.h) (revision 7777127f3b60d5f884cd07adc9d586353d914f69) @@ -33,7 +33,9 @@ TREATMENT_PARAMETER(float, ufVolume, 0.1, 0, 8.0, 0.1 ) // mL // coco end protected: + // coco begin validated: the implementation has not completed yet. PROPERTY(bool, continueEnabled, false) + // coco end private slots: void doUserModifiedParameters(); Index: sources/view/hd/alarm/VAlarmStatus.cpp =================================================================== diff -u -r7fb8debadb3cbdc33036c3fd33072226cf4128b1 -r7777127f3b60d5f884cd07adc9d586353d914f69 --- sources/view/hd/alarm/VAlarmStatus.cpp (.../VAlarmStatus.cpp) (revision 7fb8debadb3cbdc33036c3fd33072226cf4128b1) +++ sources/view/hd/alarm/VAlarmStatus.cpp (.../VAlarmStatus.cpp) (revision 7777127f3b60d5f884cd07adc9d586353d914f69) @@ -23,9 +23,9 @@ ACTION_VIEW_CONNECTION(AlarmStatusData ); ADJUST_VIEW_CONNECTION(AlarmSilenceRequestData ); ADJUST_VIEW_CONNECTION(AlarmUserActionRequestData ); - /* coco begin validated: Manually tested. This model class is a placeholder and there is no use case for this now. + /* // coco begin validated: Manually tested. This model class is a placeholder and there is no use case for this now. ADJUST_VIEW_CONNECTION(AlarmClearedConditionRequestData ); - coco end */ + // coco end */ } /*! Index: unittests/tst_messaging.cpp =================================================================== diff -u -r911882aaf10ee02ef646013914a2ddd6225224ca -r7777127f3b60d5f884cd07adc9d586353d914f69 --- unittests/tst_messaging.cpp (.../tst_messaging.cpp) (revision 911882aaf10ee02ef646013914a2ddd6225224ca) +++ unittests/tst_messaging.cpp (.../tst_messaging.cpp) (revision 7777127f3b60d5f884cd07adc9d586353d914f69) @@ -486,6 +486,20 @@ } /*! + * \brief tst_messaging::tst_MessageInterpreter_interpretMessage_AdjustUltrafiltrationInitReq + * \details Tests MessageInterpreter interpretMessage to handle AdjustUltrafiltrationInitReq message type + * if data is empty (count==0) + */ +void tst_messaging::tst_MessageInterpreter_interpretMessage_AdjustUltrafiltrationInitReq() +{ + Can::MessageInterpreter iMsg; + QByteArray payload; + // if the payload is empty the len is not valid and should return false and empty payload + QVERIFY(! iMsg.interpretMessage(Gui::GuiActionType::ID_AdjustUltrafiltrationInitReq, {}, payload)); + QVERIFY(payload.isEmpty()); +} + +/*! * \brief tst_messaging::tst_MessageInterpreter_interpretMessage_AdjustUltrafiltrationStateReq * \details Tests MessageInterpreter interpretMessage to handle AdjustUltrafiltrationStateReq message type * if data is empty (count==0) Index: unittests/tst_messaging.h =================================================================== diff -u -r911882aaf10ee02ef646013914a2ddd6225224ca -r7777127f3b60d5f884cd07adc9d586353d914f69 --- unittests/tst_messaging.h (.../tst_messaging.h) (revision 911882aaf10ee02ef646013914a2ddd6225224ca) +++ unittests/tst_messaging.h (.../tst_messaging.h) (revision 7777127f3b60d5f884cd07adc9d586353d914f69) @@ -70,6 +70,7 @@ void tst_MessageInterpreter_interpretMessage_AdjustBloodDialysateReq(); void tst_MessageInterpreter_interpretMessage_AdjustDurationReq(); void tst_MessageInterpreter_interpretMessage_AlarmSilenceReq(); + void tst_MessageInterpreter_interpretMessage_AdjustUltrafiltrationInitReq(); void tst_MessageInterpreter_interpretMessage_AdjustUltrafiltrationStateReq(); void tst_MessageInterpreter_interpretMessage_AdjustUltrafiltrationEditReq(); void tst_MessageInterpreter_interpretMessage_AdjustUltrafiltrationConfirmReq(); Index: unittests/tst_models.cpp =================================================================== diff -u -r0d3114203575d6725576f8bdc8299ad772d55fd5 -r7777127f3b60d5f884cd07adc9d586353d914f69 --- unittests/tst_models.cpp (.../tst_models.cpp) (revision 0d3114203575d6725576f8bdc8299ad772d55fd5) +++ unittests/tst_models.cpp (.../tst_models.cpp) (revision 7777127f3b60d5f884cd07adc9d586353d914f69) @@ -232,6 +232,52 @@ } } +// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Adjust Ultrafiltration Init Response ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // +void tst_models::tst_MAdjustUltrafiltrationInitResponse_data () +{ + QTest::addColumn("errorIndex"); + QTest::addColumn("data"); + QTest::newRow("msg complete ")<< 0 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B")); + QTest::newRow("mAccepted ")<< 1 << QByteArray::fromHex(QByteArray()); + QTest::newRow("mAccepted ")<< 1 << QByteArray::fromHex(QByteArray("00")); + QTest::newRow("mAccepted ")<< 1 << QByteArray::fromHex(QByteArray("00" "01")); + QTest::newRow("mAccepted ")<< 1 << QByteArray::fromHex(QByteArray("00" "01" "02")); + QTest::newRow("mReason ")<< 2 << QByteArray::fromHex(QByteArray("00" "01" "02" "03")); + QTest::newRow("mReason ")<< 2 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04")); + QTest::newRow("mReason ")<< 2 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05")); + QTest::newRow("mReason ")<< 2 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06")); + QTest::newRow("mVolume ")<< 3 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07")); + QTest::newRow("mVolume ")<< 3 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08")); + QTest::newRow("mVolume ")<< 3 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09")); + QTest::newRow("mVolume ")<< 3 << QByteArray::fromHex(QByteArray("00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A")); +} + +void tst_models::tst_MAdjustUltrafiltrationInitResponse () +{ + Model::MAdjustUltrafiltrationInitResponse mData; + + QFETCH(int , errorIndex ); + QFETCH(QByteArray, data ); + + int startIndex = 0; + int index = errorIndex - 1; + bool ok = mData.fromByteArray(data, &startIndex); + Q_UNUSED(ok) +#ifdef CONSOLEOUT + qDebug() << index << errorIndex << startIndex << ok << data ; +#endif + + switch (errorIndex) { + case 0: { index = 0 ; QVERIFY ( mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; + case 1: { index = index * sizeof mData._data.mAccepted ; QVERIFY (! mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; + case 2: { index = index * sizeof mData._data.mReason ; QVERIFY (! mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; + case 3: { index = index * sizeof mData._data.mVolume ; QVERIFY (! mData.fromByteArray(data)); QCOMPARE( index, startIndex ); } break; + default: + QVERIFY2(false, "Incorrect Test"); + break; + } +} + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Adjust Ultrafiltration State Response ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // void tst_models::tst_MAdjustUltrafiltrationStateResponse_data () { Index: unittests/tst_models.h =================================================================== diff -u -rdf0c8b4fa51d4f5ef0216eb2c3f6f5dfc97bf12e -r7777127f3b60d5f884cd07adc9d586353d914f69 --- unittests/tst_models.h (.../tst_models.h) (revision df0c8b4fa51d4f5ef0216eb2c3f6f5dfc97bf12e) +++ unittests/tst_models.h (.../tst_models.h) (revision 7777127f3b60d5f884cd07adc9d586353d914f69) @@ -51,6 +51,9 @@ void tst_MAdjustBloodDialysateResponse (); // -- Ultrafiltration + // --- Init + void tst_MAdjustUltrafiltrationInitResponse_data (); + void tst_MAdjustUltrafiltrationInitResponse (); // --- State void tst_MAdjustUltrafiltrationStateResponse_data (); void tst_MAdjustUltrafiltrationStateResponse ();