Index: sources/ApplicationController.cpp =================================================================== diff -u -rba15fce14caf76166c286da95974c69f8a24d4b8 -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b --- sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision ba15fce14caf76166c286da95974c69f8a24d4b8) +++ sources/ApplicationController.cpp (.../ApplicationController.cpp) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) @@ -110,10 +110,7 @@ connect(&_GuiController , SIGNAL(didTreatmentRangesDone(bool)), this , SLOT( onTreatmentRangesDone(bool))); - // From HD/DG - connect(&_MessageDispatcher, SIGNAL(didActionReceive(GuiActionType, const QVariantList &)), - this , SLOT( onActionReceive(GuiActionType, const QVariantList &))); - + // From TD/DD connect(&_MessageDispatcher, SIGNAL(didFailedTransmit(Sequence)), this , SLOT( onFailedTransmit(Sequence))); @@ -206,18 +203,6 @@ } /*! - * \brief An action has been confirmed - * \details GUI requested an action. - * In response HD confirmed the action. - * \param vAction - Received action - * \param vData - data of the action - */ -void ApplicationController::onActionReceive (GuiActionType vAction, const QVariantList &vData) -{ - emit didActionReceive (vAction, vData); -} - -/*! * \brief ApplicationController::onMainTimerTimeout * \details This slot is called by MainTimer::didTimeout each second * to call required methods like checkIn @@ -353,8 +338,9 @@ else { mData += static_cast(GuiActionData::NoData); } -// TODO ask behrouz what this method does ************************ -// onActionTransmit(GuiActionType::ID_TDCheckIn, mData); + + CheckIn data; + emit didAdjustment(data); #endif } @@ -495,7 +481,7 @@ */ void ApplicationController::onSettingsUpdate() { - onActionReceive(SettingsData()); + didActionReceive(SettingsData()); /// POST /// //call initialization functions when setting's ready. @@ -589,12 +575,31 @@ static QVector failList; if ( vSend ) { if ( vSingle ) { - emit didActionTransmit(Gui::GuiActionType::ID_AlarmTriggered, {vAlarmID ,0,0,0,0,0,0,0}); + AlarmTriggeredRequestData data; + data.mAlarmID = vAlarmID; + data.mFieldDescriptor1 = 0; + data.mDataField1 = 0; + data.mFieldDescriptor2 = 0; + data.mDataField2 = 0; + data.mPriority = 0; + data.mRank = 0; + data.mClearTop = 0; + + emit didAdjustment(data); } else { for ( auto alarmID : failList ) { - //DEBUG qDebug()<< "sending POST fail alarm# "<< alarmID; - emit didActionTransmit(Gui::GuiActionType::ID_AlarmTriggered, {alarmID ,0,0,0,0,0,0,0}); + AlarmTriggeredRequestData data; + data.mAlarmID = alarmID; + data.mFieldDescriptor1 = 0; + data.mDataField1 = 0; + data.mFieldDescriptor2 = 0; + data.mDataField2 = 0; + data.mPriority = 0; + data.mRank = 0; + data.mClearTop = 0; + + emit didAdjustment(data); } } } Index: sources/ApplicationController.h =================================================================== diff -u -rba15fce14caf76166c286da95974c69f8a24d4b8 -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b --- sources/ApplicationController.h (.../ApplicationController.h) (revision ba15fce14caf76166c286da95974c69f8a24d4b8) +++ sources/ApplicationController.h (.../ApplicationController.h) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) @@ -89,8 +89,6 @@ void alarmTrigger (Gui::GuiAlarmID vAlarmID, bool vSend = false, bool vSingle = false); private slots: // Should be private for thread safety and is connected internally. - void onActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= TD/DD - void onMainTimerTimeout(); void onUSBDriveMount (); Index: sources/canbus/MessageDispatcher.cpp =================================================================== diff -u -rba15fce14caf76166c286da95974c69f8a24d4b8 -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b --- sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision ba15fce14caf76166c286da95974c69f8a24d4b8) +++ sources/canbus/MessageDispatcher.cpp (.../MessageDispatcher.cpp) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) @@ -141,7 +141,6 @@ * \details Upon message has been received over CANBus this slot will be called * by FrameInterface::didFrameReceive signal to process the frame * Upon completion of collected all the required frames - * on successful interpretation of the message, emits didActionReceived signal. * The message will be removed from list of the channel vCan_Id messages. * \param vCan_Id - CANBus channel of the frame * \param vPayload - Payload of the frame @@ -564,6 +563,26 @@ * \param vData - Data model contains HD Version state. * \return void */ +void MessageDispatcher::onAdjustment(const AlarmTriggeredRequestData &vData) +{ + QVariantList mData; + mData += vData.mAlarmID ; + mData += vData.mFieldDescriptor1 ; + mData += vData.mDataField1 ; + mData += vData.mFieldDescriptor2 ; + mData += vData.mDataField2 ; + mData += vData.mPriority ; + mData += vData.mRank ; + mData += vData.mClearTop ; + actionTransmit(GuiActionType::ID_AlarmTriggered, mData); +} + +/*! + * \brief MessageDispatcher::onAdjustment + * \details This method transmits the HD Version Denali message. + * \param vData - Data model contains HD Version state. + * \return void + */ void MessageDispatcher::onAdjustment(const AdjustVersionsResponseData &vData) { QVariantList mData; @@ -1046,6 +1065,16 @@ actionTransmit(GuiActionType::ID_AdvancedInstitutionalRecordReq, mData); } +/** + * \details This method transmits the Check In Leahi message. + * \return void + */ +void MessageDispatcher::onAdjustment(const CheckIn &) +{ + QVariantList mData; + actionTransmit(GuiActionType::ID_TDCheckIn, mData); +} + /*! * \brief MessageDispatcher::onAdjustment * \details This method transmits adjusting the TD advanced institutional record request to TD. @@ -1263,7 +1292,6 @@ if ( _interpreter.interpretMessage( vMessage, mData ) ) { ok = true; - emit didActionReceive(vMessage.actionId, mData); } _messageList[vMessage.can_id].removeLast(); Index: sources/canbus/MessageDispatcher.h =================================================================== diff -u -r05828e188ec618aa3dd104c066d9506e64be826b -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b --- sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision 05828e188ec618aa3dd104c066d9506e64be826b) +++ sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) @@ -217,23 +217,6 @@ signals: /*! - * \brief didActionReceive - * \details When a message received over the CANBus this signal is emitted - * on successful collecting all required payloads from different frames if any - * and successfully has been built into a message and can be interpreted - * \param vAction - The action has been extracted from CANBus message header to be done - * \param vData - The data has been collected from CANBus frame(s) - */ - void didActionReceive (GuiActionType vAction , const QVariantList &vData); - - /*! - * \brief didActionReceive - * \details Emits when a message requires - * \param vData - */ - void didActionReceive (const Message &vMessage); - - /*! * \brief didAcknowReceive * \details if the type the received message id is and Acknow this signal will be emitted * \param vData - the data of the Acknow message which is the message Sequence Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r2624ed8acc30847fb38816fb4ae6073518b091f9 -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 2624ed8acc30847fb38816fb4ae6073518b091f9) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) @@ -335,7 +335,6 @@ {Gui::GuiActionType::ID_DuetRoWaterModeUIi , 1 * 4 }, // 1 parameter each 4bytes {Gui::GuiActionType::ID_DuetRoWaterModeDGr , 3 * 4 }, // 3 parameters each 4bytes // ---- - {Gui::GuiActionType::ID_CANBusFaultCount , 1 }, {Gui::GuiActionType::ID_RawData , 255 }, {Gui::GuiActionType::ID_Acknow , 0 }, {Gui::GuiActionType::ID_AcknowGeneric , 1 }, Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -r2624ed8acc30847fb38816fb4ae6073518b091f9 -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 2624ed8acc30847fb38816fb4ae6073518b091f9) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) @@ -207,7 +207,7 @@ case Gui::GuiActionType::ID_TDCheckIn: // len: 255, can have any len if ( length ) { // this message has a variable length - vPayload = Format::fromVariant(vData.first()); + INTERPRET_TRSMT_MT_MESSAGE(CheckIn ); } if ( ! gDisableCheckInLog ) { LOG_APPED_UI(QString("CheckIn")); @@ -457,7 +457,6 @@ vData.clear(); switch (vMessage.actionId) { // notice we are in receive mode // ----- Debug - case Gui::GuiActionType::ID_CANBusFaultCount : ok = canbusFaultCountData (vMessage, vData); /* TODO : implement notify<>() */ break; case Gui::GuiActionType::ID_TDDebugText : ok = notify(vMessage, vData, Gui::GuiActionType::ID_TDDebugText ); break; case Gui::GuiActionType::ID_HDGeneralEvent : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDGeneralEvent ); break; @@ -718,34 +717,6 @@ } // ---------- ---------- Message handlers ---------- ---------- // - -// ---------- ---------- ---------- ---------- ---------- Debug ---------- ---------- ---------- ---------- ---------- // -/*! - * \brief MessageInterpreter::canbusFaultCountData - * \details This method interprets Fault Count message data - * in vMessage of type Message. This message is only used for debugging purposes. - * \param vMessage - The vMessage of type Message which contains all the data, - * require to be interpreted. - * \param vData - Fault Count data - * \return true if the data can be extracted as defined for Fault Count Message ID - */ -bool MessageInterpreter::canbusFaultCountData(const Message &vMessage, QVariantList &vData) -{ - // TODO : review other methods - bool ok = false; - if ( ! isValidMessage(vMessage, Gui::GuiActionType::ID_CANBusFaultCount) ) return ok; - - QVariantList mData; - int index = 0; - Types::U32 mCanBUSFaultCount; - ok = GetValue(vMessage.data, index, mCanBUSFaultCount); - // developer safety if for any reason length of CanBUSFaultCount set to 0 - if (ok) { - vData += mCanBUSFaultCount.value; - } - return ok; -} - // ---------- ---------- ---------- ---------- ---------- Adjustments ---------- ---------- ---------- ---------- ---------- // /*! * \brief MessageInterpreter::updateUnhandledMessages Index: sources/canbus/MessageInterpreter.h =================================================================== diff -u -rd53e02ed37354a7d81d713a2c56547b669604cc0 -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b --- sources/canbus/MessageInterpreter.h (.../MessageInterpreter.h) (revision d53e02ed37354a7d81d713a2c56547b669604cc0) +++ sources/canbus/MessageInterpreter.h (.../MessageInterpreter.h) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) @@ -66,9 +66,6 @@ bool interpretMessage_DD (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; bool interpretMessage_FP (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; - // ----- Debug - bool canbusFaultCountData (const Message &vMessage, QVariantList &vData) __attribute_warn_unused_result__; - // ----- Adjustments template bool notify (const Message &vMessage, QVariantList &vData, Gui::GuiActionType vIdCheck) __attribute_warn_unused_result__; Index: sources/gui/GuiController.cpp =================================================================== diff -u -rba15fce14caf76166c286da95974c69f8a24d4b8 -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b --- sources/gui/GuiController.cpp (.../GuiController.cpp) (revision ba15fce14caf76166c286da95974c69f8a24d4b8) +++ sources/gui/GuiController.cpp (.../GuiController.cpp) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) @@ -66,11 +66,6 @@ */ void GuiController::initConnections() { - // From HD/DG - connect(&_ApplicationController, SIGNAL(didActionReceive (GuiActionType, const QVariantList &)), - this , SLOT( onActionReceive (GuiActionType, const QVariantList &))); - - // From OS : USB Drive has been removed physically. // USB drive connect(&_ApplicationController, SIGNAL(didUSBDriveMount ()), @@ -170,19 +165,6 @@ emit didActionTransmit(vAction, vData); } -/*! - * \brief Action commanded by HD - * \details An action has been commanded by HD, - * Gui requires to be notified to perform the action. - * \param vAction - Message Action - * \param vData - The data to be translated. - */ -void GuiController::onActionReceive (GuiActionType vAction, const QVariantList &vData) -{ - // Process the command and notify GuiView - // Process ... - emit didActionReceive (vAction, vData); -} /*! * \brief GuiController::onUSBDriveMount Index: sources/gui/GuiController.h =================================================================== diff -u -rba15fce14caf76166c286da95974c69f8a24d4b8 -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b --- sources/gui/GuiController.h (.../GuiController.h) (revision ba15fce14caf76166c286da95974c69f8a24d4b8) +++ sources/gui/GuiController.h (.../GuiController.h) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) @@ -74,8 +74,6 @@ void doTreatmentRangesDone(bool vPass); private slots: // Should be private for thread safety and is connected internally. - void onActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DG - void onUSBDriveMount (); // OS => UI void onUSBDriveRemove(); // OS => UI void onUSBSpaceChange(bool vReady, qint64 vTotal, qint64 vAvailable, quint8 vPercent); Index: sources/gui/GuiGlobals.h =================================================================== diff -u -r2624ed8acc30847fb38816fb4ae6073518b091f9 -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 2624ed8acc30847fb38816fb4ae6073518b091f9) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) @@ -62,7 +62,6 @@ enum GuiActionsType_Enum /* : quint16 QML does not support enum types */ { ID_Unknown = 0x0000, - ID_CANBusFaultCount = 0x9909, ID_RawData = 0xFFFE, Index: sources/gui/GuiView.cpp =================================================================== diff -u -ra58f91b077c8131bea3dbde0fc338adb113fc9f3 -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b --- sources/gui/GuiView.cpp (.../GuiView.cpp) (revision a58f91b077c8131bea3dbde0fc338adb113fc9f3) +++ sources/gui/GuiView.cpp (.../GuiView.cpp) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) @@ -43,9 +43,6 @@ */ void GuiView::initConnections() { - connect(&_GuiController, SIGNAL(didActionReceive (GuiActionType, const QVariantList &)), - this , SLOT( onActionReceive (GuiActionType, const QVariantList &))); - // 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. @@ -86,21 +83,7 @@ connect(&_GuiController, SIGNAL(didPOSTPass (bool)), this , SLOT( onPOSTPass (bool))); } - /*! - * \brief GuiView::onActionReceive - * \details emits didActionReceive signal to notify other classes (Gui) - * , an action has been received. - * \param vAction - the action - * \param vData - the action data - */ -void GuiView::onActionReceive (GuiActionType vAction, const QVariantList &vData) -{ - // process the evaluation and notify GUI - emit didActionReceive (vAction, vData); -} - -/*! * \brief GuiView::doActionTransmit * \details emits didActionTransmit signal to notify other classes (GuiController) * , an action has been required to be transmitted. Index: sources/gui/GuiView.h =================================================================== diff -u -ra58f91b077c8131bea3dbde0fc338adb113fc9f3 -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b --- sources/gui/GuiView.h (.../GuiView.h) (revision a58f91b077c8131bea3dbde0fc338adb113fc9f3) +++ sources/gui/GuiView.h (.../GuiView.h) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) @@ -105,8 +105,6 @@ void initConnections(); private slots: - void onActionReceive (GuiActionType vAction, const QVariantList &vData); // UI <= HD/DG - void onUSBDriveMount (); void onUSBDriveRemove(); void onUSBSpaceChange(bool vReady, qint64 vTotal, qint64 vAvailable, quint8 vPercent); Index: sources/gui/qml/pages/settings/SettingsStack.qml =================================================================== diff -u -r72550dbbd6db8eab40aad38956b32f99416600c8 -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b --- sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision 72550dbbd6db8eab40aad38956b32f99416600c8) +++ sources/gui/qml/pages/settings/SettingsStack.qml (.../SettingsStack.qml) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) @@ -168,7 +168,7 @@ _GuiView.doQuitApplication() } else { - _GuiView.doActionTransmit(GuiActions.ID_PowerOff, GuiActions.NoData) +// _GuiView.doActionTransmit(GuiActions.ID_PowerOff, GuiActions.NoData) } } itemsText : _root.itemsText Index: sources/model/MModel.h =================================================================== diff -u -r2624ed8acc30847fb38816fb4ae6073518b091f9 -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b --- sources/model/MModel.h (.../MModel.h) (revision 2624ed8acc30847fb38816fb4ae6073518b091f9) +++ sources/model/MModel.h (.../MModel.h) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) @@ -311,6 +311,7 @@ \details Registers the models in the Qt MetaType so it can be used in signal/slots between threads. */ #define REGISTER_MODEL_METATYPES \ + REGISTER_METATYPE( CheckIn ) \ /* CONFIRM */ \ REGISTER_METATYPE( DuetConfirmTDiData ) \ REGISTER_METATYPE( DuetConfirmUIrData ) \ @@ -552,6 +553,7 @@ REGISTER_METATYPE( AdjustDDDateTimeResponseData ) \ /* Alarms - Active List Response */ \ REGISTER_METATYPE( AlarmActiveListResponseData ) \ + REGISTER_METATYPE( AlarmTriggeredRequestData ) \ REGISTER_METATYPE( AdjustHDAlarmVolumeResponseData ) \ REGISTER_METATYPE( AdjustInstitutionalRequestData ) \ REGISTER_METATYPE( AdjustInstitutionalRecordResponseData ) \ @@ -738,6 +740,7 @@ ACTION_RECEIVE_BRIDGE_CONNECTION(vSOURCE, AdvancedInstitutionalRecordResponseData ) \ // /* Request */ ---------------------------------------------------------// #define ADJUST_TRANSMT_MODEL_BRIDGE_CONNECTIONS(vSOURCE) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, CheckIn ) \ /* CONFIRM */ \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, DuetConfirmUIrData ) \ /* RO Water Mode */ \ @@ -801,12 +804,13 @@ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmSilenceRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmUserActionRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmActiveListRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AlarmTriggeredRequestData ) \ /* Settings - HD Info */ \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, HDUsageInfoRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustInstitutionalRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, InstitutionalRequestData ) \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustAdvancedInstitutionalRequestData ) \ - ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdvancedInstitutionalRequestData ) \ + ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustAdvancedInstitutionalRequestData ) \ /* HD reset in service mode */ \ ADJUST_TRANSMT_BRIDGE_CONNECTION(vSOURCE, AdjustHDResetInSrvcRequestData ) \ @@ -988,6 +992,7 @@ #define ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS \ /* Request --------------------------------------------------------- */ \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( CheckIn ) \ /* CONFIRM */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION( DuetConfirmUIrData ) \ /* RO Water Mode */ \ @@ -1051,6 +1056,7 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION( AlarmSilenceRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AlarmUserActionRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AlarmActiveListRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION( AlarmTriggeredRequestData ) \ /* Settings - HD Info */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION( HDUsageInfoRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION( AdjustInstitutionalRequestData ) \ @@ -1062,6 +1068,7 @@ #define ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS_NOEMIT \ /* Request ----------------------- NoEmit -------------------------- */ \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( CheckIn ) \ /* CONFIRM */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( DuetConfirmUIrData ) \ /* RO Water Mode */ \ @@ -1125,6 +1132,7 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AlarmSilenceRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AlarmUserActionRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AlarmActiveListRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AlarmTriggeredRequestData ) \ /* Settings - HD Info */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( HDUsageInfoRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_NOEMIT( AdjustInstitutionalRequestData ) \ @@ -1136,6 +1144,7 @@ #define ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS_PUBLIC \ /* Request ----------------------- public -------------------------- */ \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( CheckIn ) \ /* CONFIRM */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( DuetConfirmUIrData ) \ /* RO Water Mode */ \ @@ -1199,6 +1208,7 @@ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AlarmSilenceRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AlarmUserActionRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AlarmActiveListRequestData ) \ + ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AlarmTriggeredRequestData ) \ /* Settings - HD Info */ \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( HDUsageInfoRequestData ) \ ADJUST_TRANSMT_BRIDGE_DEFINITION_PUBLIC( AdjustInstitutionalRequestData ) \ Index: sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h =================================================================== diff -u -r2624ed8acc30847fb38816fb4ae6073518b091f9 -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b --- sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision 2624ed8acc30847fb38816fb4ae6073518b091f9) +++ sources/model/hd/adjustment/treatment/MTreatmentAdjustRequests.h (.../MTreatmentAdjustRequests.h) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) @@ -762,6 +762,29 @@ } }; +/*! + * \brief The MCheckInReq class + * \details The model to checkin + * + * | MSG | CAN ID | Type | Ack | Src | Dest | Description | + * |:----:|:------:|:----:|:---:|:---:|:----:|:---------------: | + * |0x1000| 0x100 | Req | Y | UI | TD | Checkin | + * + * | Payload || + * | || + * | (N/A) || + * + */ +class MCheckInReq : public MModel { +public: + QString toString() { + return toString({}); + } + static QString toString(const QVariantList &vParameters) { + return MModel::toString("CheckIn", vParameters); + } +}; + //// ---------- Alarms /*! @@ -841,3 +864,4 @@ // Alarms typedef Model:: MAlarmSilenceReq AlarmSilenceRequestData; typedef Model:: MAlarmUserActionReq AlarmUserActionRequestData; +typedef Model:: MCheckInReq CheckIn; Index: sources/model/hd/alarm/MAlarmTriggered.cpp =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b --- sources/model/hd/alarm/MAlarmTriggered.cpp (.../MAlarmTriggered.cpp) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/model/hd/alarm/MAlarmTriggered.cpp (.../MAlarmTriggered.cpp) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) @@ -82,18 +82,18 @@ /// The Alarm Trigger Request -QString MAlarmTriggeredReq::toString() { - return toString({}); -} +//QString MAlarmTriggeredReq::toString() { +// return toString({}); +//} -QString MAlarmTriggeredReq::toString(const QVariantList &vParameters) { - QString alarmText = ""; - if (vParameters.count()) { - bool ok; - GuiAlarmID alarmID = static_cast(vParameters[0].toInt(&ok)); - alarmText = Model::MAlarmStatus::toText(alarmID); - } - return MModel::toString("AlarmTriggered", { alarmText }); -} +//QString MAlarmTriggeredReq::toString(const QVariantList &vParameters) { +// QString alarmText = ""; +// if (vParameters.count()) { +// bool ok; +// GuiAlarmID alarmID = static_cast(vParameters[0].toInt(&ok)); +// alarmText = Model::MAlarmStatus::toText(alarmID); +// } +// return MModel::toString("AlarmTriggered", { alarmText }); +//} -Can::Can_Id MAlarmTriggeredReq::canid() { return Can::Can_Id::eChlid_UI_Sync; } +//Can::Can_Id MAlarmTriggeredReq::canid() { return Can::Can_Id::eChlid_UI_Sync; } Index: sources/model/hd/alarm/MAlarmTriggered.h =================================================================== diff -u -r712f4c8a1b2382919300895b4422b831471044a3 -rd7f70405a20319dd9f2dc93ee7f357cc88d0f84b --- sources/model/hd/alarm/MAlarmTriggered.h (.../MAlarmTriggered.h) (revision 712f4c8a1b2382919300895b4422b831471044a3) +++ sources/model/hd/alarm/MAlarmTriggered.h (.../MAlarmTriggered.h) (revision d7f70405a20319dd9f2dc93ee7f357cc88d0f84b) @@ -113,8 +113,14 @@ * |0x0200| 0x004 | Req | Y | UI | All | Alarm Triggered | * * | Payload || - * | || - * | || + * | #1:(U32) | \ref Data::mAlarmID | + * | #2:(U32) | \ref Data::mFieldDescriptor1 | + * | #3:(Any) | \ref Data::mDataField1 | + * | #4:(U32) | \ref Data::mFieldDescriptor2 | + * | #5:(Any) | \ref Data::mDataField2 | + * | #6:(U32) | \ref Data::mPriority | + * | #7:(U32) | \ref Data::mRank | + * | #8:(U32) | \ref Data::mClearTop | * * * \sa Data @@ -129,9 +135,30 @@ */ class MAlarmTriggeredReq : public MModel { public: - QString toString(); - static QString toString(const QVariantList &vParameters); - static Can::Can_Id canid (); + quint32 mAlarmID = 0; + quint32 mFieldDescriptor1 = 0; + quint32 mDataField1 = 0; + quint32 mFieldDescriptor2 = 0; + quint32 mDataField2 = 0; + quint32 mPriority = 0; + quint32 mRank = 0; + quint32 mClearTop = 0; + + QString toString() { + return toString + ({ mAlarmID , + mFieldDescriptor1 , + mDataField1 , + mFieldDescriptor2 , + mDataField2 , + mPriority , + mRank , + mClearTop + }); + } + static QString toString(const QVariantList &vParameters) { + return MModel::toString("AlarmTriggered", vParameters); + } }; }