Index: sources/ApplicationController.cpp =================================================================== diff -u -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b -r7f2b5b06e41e5ab0b86c0b7107a77786e01ce5fa --- sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) +++ sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision 7f2b5b06e41e5ab0b86c0b7107a77786e01ce5fa) @@ -28,6 +28,7 @@ #include "MSettings.h" #include "BluetoothInterface.h" #include "VAdjustmentVersions.h" +#include "AlarmGenerator.h" /*! * \brief ApplicationController::ApplicationController @@ -197,9 +198,13 @@ * \details Called when failed to get a response back from the HD * \param seq - The sequence that failed to send to the HD. */ -void ApplicationController::onFailedTransmit(Sequence seq) +void ApplicationController::onFailedTransmit(Sequence) { - emit didFailedTransmit(seq); +// emit didFailedTransmit(seq); + LOG_APPED_MSG(GuiActions::ID_AlarmStatus, AlarmGenerator::toString()); + + AlarmStatusData data = AlarmGenerator::ALARM_ID_TD_COMM_TIMEOUT(); + emit didAdjustment(data); } /*! Index: sources/ApplicationController.h =================================================================== diff -u -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b -r7f2b5b06e41e5ab0b86c0b7107a77786e01ce5fa --- sources/ApplicationController.h (.../ApplicationController.h) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) +++ sources/ApplicationController.h (.../ApplicationController.h) (revision 7f2b5b06e41e5ab0b86c0b7107a77786e01ce5fa) @@ -142,7 +142,6 @@ signals: void didActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= TD/DD - void didActionTransmit(GuiActionType vAction, const QVariantList &vData); // UI => TD/DD void didFailedTransmit(Sequence seq); void didUSBDriveMount (); Index: sources/canbus/MessageDispatcher.cpp =================================================================== diff -u -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b -r7f2b5b06e41e5ab0b86c0b7107a77786e01ce5fa --- sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) +++ sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision 7f2b5b06e41e5ab0b86c0b7107a77786e01ce5fa) @@ -945,8 +945,25 @@ actionTransmit(GuiActionType::ID_DuetConfirmUIr, mData); } + /*! * \brief MessageDispatcher::onAdjustment + * \details This method transmits the UI Generic User Confirmation result. + * \param vData - Data model contains the Generic User Confirmation result. + * \return void + */ +void MessageDispatcher::onAdjustment(const AlarmStatusData &vData) +{ + QVariantList mData; + mData += vData.mState; + mData += vData.mTop; + mData += vData.mMuteTimeout; + mData += vData.mFlags; + actionTransmit(GuiActionType::ID_AlarmStatus, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment * \details This method transmits the UI RO Water Mode adjustment request. * \param vData - Data model contains the UI RO Water Mode adjustment request data. * \return void Index: sources/gui/GuiController.cpp =================================================================== diff -u -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b -r7f2b5b06e41e5ab0b86c0b7107a77786e01ce5fa --- sources/gui/GuiController.cpp (.../GuiController.cpp) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) +++ sources/gui/GuiController.cpp (.../GuiController.cpp) (revision 7f2b5b06e41e5ab0b86c0b7107a77786e01ce5fa) @@ -21,7 +21,6 @@ // Project #include "Logger.h" #include "ApplicationController.h" -#include "AlarmGenerator.h" #include "MessageAcknowModel.h" // namespace using namespace Gui; @@ -89,10 +88,6 @@ connect(&_ApplicationController, SIGNAL(didExportStat (quint32, const QString &, quint8)), this , SLOT( onExportStat (quint32, const QString &, quint8))); - // transmission fail - connect(&_ApplicationController, SIGNAL(didFailedTransmit(Sequence)), - this , SLOT( onFailedTransmit(Sequence))); - // POST result connect(&_ApplicationController, SIGNAL(didPOSTPass(bool)), this , SLOT( onPOSTPass(bool))); @@ -151,22 +146,6 @@ } /*! - * \brief An Action has been requested - * \details This method Confirmed that if the action is accepted or not, - * Regarding the current state and the action. - * These actions are only user actions and there is only one user interaction, - * So no need to capture from which screen this action comes since we have the current state. - * Sometimes GuiController requires to investigate with the ApplicationController to get approval from HD device. - * \param vAction - User requested Action - * \param vData - Message data to be transmitted. - */ -void GuiController::doActionTransmit(GuiActionType vAction, const QVariantList &vData) -{ - emit didActionTransmit(vAction, vData); -} - - -/*! * \brief GuiController::onUSBDriveMount * \details emits didUSBDriveMount signal to notify other classes (GuiView) * , the USB drive has been mounted. @@ -281,19 +260,6 @@ } /*! - * \brief GuiController::didFailedTransmit - * \details Raises an HD communication timeout alarm if communication with HD is lost. - * \param seq - Sequence that failed to transmit - */ -void GuiController::onFailedTransmit(Sequence) -{ - AlarmStatusData data = AlarmGenerator::ALARM_ID_TD_COMM_TIMEOUT(); - LOG_APPED_MSG(GuiActions::ID_AlarmStatus, AlarmGenerator::toString()); - //DEBUG qDebug() << " A" << _MessageAcknowModel.count(); - emit didActionReceive(data); -} - -/*! * \brief GuiController::onPOSTPass * \details Passes on the Post status * \param vPass - True if passed Index: sources/gui/GuiController.h =================================================================== diff -u -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b -r7f2b5b06e41e5ab0b86c0b7107a77786e01ce5fa --- sources/gui/GuiController.h (.../GuiController.h) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) +++ sources/gui/GuiController.h (.../GuiController.h) (revision 7f2b5b06e41e5ab0b86c0b7107a77786e01ce5fa) @@ -64,8 +64,6 @@ void quitThread(); public slots: - void doActionTransmit(GuiActionType vAction, const QVariantList &vData); // UI => TD/DD - void doUSBDriveUmount (); // UI => OS void doExportLog (const GuiStringIndexMap &vExportList); // UI => OS void doExportService (const GuiStringIndexMap &vExportList); // UI => OS @@ -84,14 +82,10 @@ void onExport (); // OS => UI void onExportStat (quint32 vIndex, const QString &vFileName, quint8 vPercent); - void onFailedTransmit(Sequence seq); void onPOSTPass (bool vPass); signals: - void didActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DD - void didActionTransmit(GuiActionType vAction, const QVariantList &vData); // UI => TD/DD - void didUSBDriveMount (); void didUSBDriveUmount(); void didUSBDriveRemove(); Index: sources/gui/GuiView.cpp =================================================================== diff -u -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b -r7f2b5b06e41e5ab0b86c0b7107a77786e01ce5fa --- sources/gui/GuiView.cpp (.../GuiView.cpp) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) +++ sources/gui/GuiView.cpp (.../GuiView.cpp) (revision 7f2b5b06e41e5ab0b86c0b7107a77786e01ce5fa) @@ -46,8 +46,6 @@ // since we do not have access to this object because it is created in QML. // Connection to the GuiController made here // It should be defined in the class which wants to connect to signal. - connect(this , SIGNAL(didActionTransmit(GuiActionType,const QVariantList &)), - &_GuiController, SLOT( doActionTransmit(GuiActionType,const QVariantList &))); connect(this , SIGNAL(didQuitApplication()), &_GuiController, SLOT( doQuitApplication())); @@ -83,39 +81,8 @@ connect(&_GuiController, SIGNAL(didPOSTPass (bool)), this , SLOT( onPOSTPass (bool))); } -/*! - * \brief GuiView::doActionTransmit - * \details emits didActionTransmit signal to notify other classes (GuiController) - * , an action has been required to be transmitted. - * \param vAction - the action - * \param vData - the action data - */ -void GuiView::doActionTransmit(GuiActionType vAction, const QVariantList &vData) -{ - // TODO : Remove this code later when Investigated thoroughly. - // This code later needs to be removed when Investigated thoroughly. - emit didActionTransmit(vAction, vData); -} /*! - * \brief GuiView::doActionTransmit - * \details emits didActionTransmit signal to notify other classes (GuiController) - * , an action has been required to be transmitted. - * \note The overloaded method with only one data parameter, for easier use in qml. - * \param vAction - the action - * \param vData - the action data - */ - -void GuiView::doActionTransmit(GuiActionType vAction, const QVariant &vData) -{ - // TODO : Remove this code later when Investigated thoroughly. - // This code later needs to be removed when Investigated thoroughly. - QVariantList mData; - mData += vData; - emit didActionTransmit(vAction, mData); -} - -/*! * \brief GuiView::doUSBDriveMount * \details emits didUSBDriveMount signal to notify other classes (UI) * , the USB drive has been mounted. Index: sources/gui/GuiView.h =================================================================== diff -u -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b -r7f2b5b06e41e5ab0b86c0b7107a77786e01ce5fa --- sources/gui/GuiView.h (.../GuiView.h) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) +++ sources/gui/GuiView.h (.../GuiView.h) (revision 7f2b5b06e41e5ab0b86c0b7107a77786e01ce5fa) @@ -119,8 +119,6 @@ void onPOSTPass (bool vPassed); public slots: // is public since will be used in the UI and is in the same thread. - void doActionTransmit(GuiActionType vAction, const QVariantList &vData); // UI => TD/DD - void doActionTransmit(GuiActionType vAction, const QVariant &vData); // UI => TD/DD void doUSBDriveUmount(); void doExportLog (); @@ -140,9 +138,6 @@ void doGenerateQRImage (const QString &vText ); signals: - void didActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DD - void didActionTransmit(GuiActionType vAction, const QVariantList &vData); // UI => TD/DD - void didUSBDriveMount (); void didUSBDriveUmount(); void didUSBDriveRemove(); Index: sources/model/MModel.h =================================================================== diff -u -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b -r7f2b5b06e41e5ab0b86c0b7107a77786e01ce5fa --- sources/model/MModel.h (.../MModel.h) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) +++ sources/model/MModel.h (.../MModel.h) (revision 7f2b5b06e41e5ab0b86c0b7107a77786e01ce5fa) @@ -805,6 +805,7 @@ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmUserActionRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmActiveListRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmTriggeredRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmStatusData ) \ /* Settings - HD Info */ \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, HDUsageInfoRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustInstitutionalRequestData ) \ @@ -1057,6 +1058,7 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION( AlarmUserActionRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AlarmActiveListRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AlarmTriggeredRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AlarmStatusData ) \ /* Settings - HD Info */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION( HDUsageInfoRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustInstitutionalRequestData ) \ @@ -1133,6 +1135,7 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AlarmUserActionRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AlarmActiveListRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AlarmTriggeredRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AlarmStatusData ) \ /* Settings - HD Info */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( HDUsageInfoRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustInstitutionalRequestData ) \ @@ -1209,6 +1212,7 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AlarmUserActionRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AlarmActiveListRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AlarmTriggeredRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AlarmStatusData ) \ /* Settings - HD Info */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( HDUsageInfoRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustInstitutionalRequestData ) \