Index: sources/bluetooth/BLEScanner.cpp =================================================================== diff -u -r66e87ea403ec12a273553284919684282d87bc6a -rfdb48ba3fba8e95027ebf573325c8f25db74c070 --- sources/bluetooth/BLEScanner.cpp (.../BLEScanner.cpp) (revision 66e87ea403ec12a273553284919684282d87bc6a) +++ sources/bluetooth/BLEScanner.cpp (.../BLEScanner.cpp) (revision fdb48ba3fba8e95027ebf573325c8f25db74c070) @@ -9,6 +9,7 @@ #include "main.h" #include "Logger.h" +// coco begin validated: Cannot be tested on server, but has been validated manually BLEScanner::BLEScanner(QObject *parent) : QObject(parent) { discoveryAgent = new QBluetoothDeviceDiscoveryAgent(this); @@ -587,3 +588,5 @@ // LOG_DEBUG(QString("Retrying to connect to BLE device with address %1").arg(selectedDeviceInfo.address().toString())); lowEnergyController->connectToDevice(); } + +// coco end Index: sources/view/VAlert.h =================================================================== diff -u -r5384b4f5833568db90b988b11bbd502386d2f9b2 -rfdb48ba3fba8e95027ebf573325c8f25db74c070 --- sources/view/VAlert.h (.../VAlert.h) (revision 5384b4f5833568db90b988b11bbd502386d2f9b2) +++ sources/view/VAlert.h (.../VAlert.h) (revision fdb48ba3fba8e95027ebf573325c8f25db74c070) @@ -44,9 +44,11 @@ explicit VAlert(QObject *parent = NULL); private: + // coco begin validated: Has been validated manually PROPERTY(QString , title, "") PROPERTY(QString , description, "") PROPERTY(GuiAlertID , alertID, GuiAlertID::ID_Alert_None) + // coco end signals: void didRequestShowAlert(); Index: sources/view/VBluetooth.cpp =================================================================== diff -u -ra706f0bc5c65ec23de7e199d4aae158a06d07214 -rfdb48ba3fba8e95027ebf573325c8f25db74c070 --- sources/view/VBluetooth.cpp (.../VBluetooth.cpp) (revision a706f0bc5c65ec23de7e199d4aae158a06d07214) +++ sources/view/VBluetooth.cpp (.../VBluetooth.cpp) (revision fdb48ba3fba8e95027ebf573325c8f25db74c070) @@ -10,6 +10,7 @@ using namespace View; using namespace Storage; +// coco begin validated: This class cannot be tested on the server, but has been validated manually VBluetooth::VBluetooth(QObject *parent) : QObject(parent) { // incoming @@ -397,3 +398,4 @@ QBluetoothDeviceInfo device(QBluetoothAddress(deviceInfo->getAddress()), deviceInfo->getName(), 0); emit didRequestReconnectToDevice(device); } +// coco end Index: sources/view/VBluetoothDeviceInfo.cpp =================================================================== diff -u -r2fde0cfeb28b3fab9437e9bd15c1ec775785f103 -rfdb48ba3fba8e95027ebf573325c8f25db74c070 --- sources/view/VBluetoothDeviceInfo.cpp (.../VBluetoothDeviceInfo.cpp) (revision 2fde0cfeb28b3fab9437e9bd15c1ec775785f103) +++ sources/view/VBluetoothDeviceInfo.cpp (.../VBluetoothDeviceInfo.cpp) (revision fdb48ba3fba8e95027ebf573325c8f25db74c070) @@ -5,7 +5,7 @@ #include // Project - +// coco begin validated: Cannot be tested on server, but has been validated manually using namespace View; /*! @@ -85,3 +85,5 @@ return true; } + +// coco end Index: sources/view/VBluetoothDeviceInfo.h =================================================================== diff -u -r2fde0cfeb28b3fab9437e9bd15c1ec775785f103 -rfdb48ba3fba8e95027ebf573325c8f25db74c070 --- sources/view/VBluetoothDeviceInfo.h (.../VBluetoothDeviceInfo.h) (revision 2fde0cfeb28b3fab9437e9bd15c1ec775785f103) +++ sources/view/VBluetoothDeviceInfo.h (.../VBluetoothDeviceInfo.h) (revision fdb48ba3fba8e95027ebf573325c8f25db74c070) @@ -8,11 +8,18 @@ // Project +// forward declarations +class tst_views; + namespace View { class VBluetoothDeviceInfo: public QObject { Q_OBJECT + + // friends + friend class::tst_views; + Q_PROPERTY(QString name READ getName NOTIFY deviceChanged) Q_PROPERTY(QString address READ getAddress NOTIFY deviceChanged) Q_PROPERTY(bool connected READ isConnected NOTIFY deviceChanged) Index: sources/view/VVitals.cpp =================================================================== diff -u -ra72ae0a4ecea77ac03220ddc5d8e5f322b254a61 -rfdb48ba3fba8e95027ebf573325c8f25db74c070 --- sources/view/VVitals.cpp (.../VVitals.cpp) (revision a72ae0a4ecea77ac03220ddc5d8e5f322b254a61) +++ sources/view/VVitals.cpp (.../VVitals.cpp) (revision fdb48ba3fba8e95027ebf573325c8f25db74c070) @@ -54,12 +54,14 @@ */ void VVitals::doManualBPMeasureEntry(const quint32 &systolic, const quint32 &diastolic, const quint32 &pulse_rate) { + // coco begin validated: Has been validated manually BLEMeasurementData measurement; measurement.systolic = systolic; measurement.diastolic = diastolic; measurement.pulse_rate = pulse_rate; onReceiveBPMeasurement(measurement); } +// coco end /*! * \brief VVitals::onReceiveBPMeasurement @@ -68,10 +70,12 @@ */ void VVitals::onReceiveBPMeasurement(BLEMeasurementData measurement) { + // coco begin validated: Has been validated manually bloodPressureDiastolic (measurement.diastolic); bloodPressureSystolic (measurement.systolic); pulseBPM (measurement.pulse_rate); } +// coco end /*! * \brief VVitals::onHDOperationModeUpdate @@ -92,6 +96,7 @@ */ void VVitals::onTimeout() { + // coco begin validated: Has been validated manually if (_inTreatmentMode && _lastNotification.secsTo(QDateTime::currentDateTime()) >= bloodPressureMeasureIntervalMinutes()*60) // PRS 94 { @@ -102,12 +107,12 @@ request.description = tr("Press 'Confirm' once you have finished measuring your blood pressure and heart rate."); emit didRequestShowAlert(request); _lastNotification = QDateTime::currentDateTime(); - } /*else { int secondsRemaining = bloodPressureMeasureIntervalMinutes()*60 - _lastNotification.secsTo(QDateTime::currentDateTime()); LOG_DEBUG(QString("There are %1 seconds until next bp/hr measurement request notification").arg(secondsRemaining)); - }*/ + }*/ } +// coco end /*! * \brief VVitals::onReceiveAlertResponse @@ -116,11 +121,12 @@ */ void VVitals::onReceiveAlertResponse(GuiAlertResponseData response) { + // coco begin validated: Has been validated manually if (response.id != GuiAlertID::ID_Alert_BLE_Measurement_Timeout) return; - LOG_DEBUG(QString("User confirmed alert? %1").arg(response.confirmed)); } +// coco end /*! * \brief VVitals::onActionReceive @@ -130,8 +136,9 @@ */ void VVitals::onActionReceive(const TreatmentStartResponseData &response) { + // coco begin validated: Has been validated manually if (response.startTreatmentResponse != 1) return; - + // coco end _lastNotification = QDateTime::currentDateTime(); } Index: sources/view/VVitals.h =================================================================== diff -u -r5384b4f5833568db90b988b11bbd502386d2f9b2 -rfdb48ba3fba8e95027ebf573325c8f25db74c070 --- sources/view/VVitals.h (.../VVitals.h) (revision 5384b4f5833568db90b988b11bbd502386d2f9b2) +++ sources/view/VVitals.h (.../VVitals.h) (revision fdb48ba3fba8e95027ebf573325c8f25db74c070) @@ -34,10 +34,12 @@ explicit VVitals(QObject *parent = nullptr); protected: + // coco begin validated: Has been validated manually PROPERTY(quint32, bloodPressureSystolic, UNSET) PROPERTY(quint32, bloodPressureDiastolic, UNSET) PROPERTY(quint32, pulseBPM, UNSET) PROPERTY(quint32, bloodPressureMeasureIntervalMinutes, UNSET) + // coco end public slots: void doUpdateBPMeasureInterval(const quint32 &intervalMinutes); void doManualBPMeasureEntry(const quint32 &systolic, const quint32 &diastolic, const quint32 &pulse_rate); Index: unittests/tst_views.cpp =================================================================== diff -u -r89e3ca8e108dd4b3315ae7862c631eba43f8fd0f -rfdb48ba3fba8e95027ebf573325c8f25db74c070 --- unittests/tst_views.cpp (.../tst_views.cpp) (revision 89e3ca8e108dd4b3315ae7862c631eba43f8fd0f) +++ unittests/tst_views.cpp (.../tst_views.cpp) (revision fdb48ba3fba8e95027ebf573325c8f25db74c070) @@ -23,6 +23,8 @@ #include "VTreatmentBegin.h" #include "VPriming.h" #include "VAlarmStatus.h" +#include "VBluetooth.h" +#include "VBluetoothDeviceInfo.h" tst_views::tst_views(QObject *parent) : QObject(parent) { } @@ -862,3 +864,29 @@ view.continueEnabled(false); QCOMPARE(view.continueEnabled(), false); } + +void tst_views::VBluetoothDeviceInfo_properties() +{ + View::VBluetoothDeviceInfo view("EC:21:E5:F4:BC:C9", "BP7000"); + QCOMPARE("EC:21:E5:F4:BC:C9", view.getAddress()); + QCOMPARE("BP7000", view.getName()); + QCOMPARE(view.isValid(), true); + + QCOMPARE(view.isConnected(), false); + view.setConnected(true); + QCOMPARE(view.isConnected(), true); + view.setConnected(false); + QCOMPARE(view.isConnected(), false); + + View::VBluetoothDeviceInfo view2("EC:21:E5:F4:BC", "BP7000"); + QCOMPARE(view2.isValid(), false); + + View::VBluetoothDeviceInfo view3("EC:21:E5:F4:BC:C9", ""); + QCOMPARE(view3.isValid(), false); + + QCOMPARE(view2 == view3, false); + + View::VBluetoothDeviceInfo view4("EC:21:E5:F4:BC:C9", "BP7000"); + QCOMPARE(view == view4, true); + +} Index: unittests/tst_views.h =================================================================== diff -u -r0d59385f134f65a19dace1e2b46eb2631924396e -rfdb48ba3fba8e95027ebf573325c8f25db74c070 --- unittests/tst_views.h (.../tst_views.h) (revision 0d59385f134f65a19dace1e2b46eb2631924396e) +++ unittests/tst_views.h (.../tst_views.h) (revision fdb48ba3fba8e95027ebf573325c8f25db74c070) @@ -50,4 +50,6 @@ void VTreatmentBegin_continue(); void VTreatmentPriming_properties(); + + void VBluetoothDeviceInfo_properties(); };