Index: denali.pro.user =================================================================== diff -u -re12bcd41f4bbc3f4a97f338ffb9d20c1a04f5f83 -r119cd695daee08e15d7a4132b0a64c6c2242fb44 --- denali.pro.user (.../denali.pro.user) (revision e12bcd41f4bbc3f4a97f338ffb9d20c1a04f5f83) +++ denali.pro.user (.../denali.pro.user) (revision 119cd695daee08e15d7a4132b0a64c6c2242fb44) @@ -1,6 +1,6 @@ - + EnvironmentId Index: en_US.udic =================================================================== diff -u -rec36df2f94c93e62095f49c7f65a30c2d508a579 -r119cd695daee08e15d7a4132b0a64c6c2242fb44 --- en_US.udic (.../en_US.udic) (revision ec36df2f94c93e62095f49c7f65a30c2d508a579) +++ en_US.udic (.../en_US.udic) (revision 119cd695daee08e15d7a4132b0a64c6c2242fb44) @@ -202,3 +202,5 @@ deviceID reconnection FALLTHROUGH +POSTDone +POSTItem Index: sources/canbus/FrameInterface.cpp =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r119cd695daee08e15d7a4132b0a64c6c2242fb44 --- sources/canbus/FrameInterface.cpp (.../FrameInterface.cpp) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/canbus/FrameInterface.cpp (.../FrameInterface.cpp) (revision 119cd695daee08e15d7a4132b0a64c6c2242fb44) @@ -178,9 +178,9 @@ case eDG_Dialin: case eDialin_UI: case eUI_Dialin: - channelGroup = ChannelGroup::eChannel_Ignores; + channelGroup = ChannelGroup::eChannel_Listens; debugChannel = true; - ok = false; // it's still false since UI is not handling any messages coming from Debug Channels. + ok = true; // it's still false since UI is not handling any messages coming from Debug Channels. break; case eChlid_HD_DG : Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -r2124420a19819f672e9180979ff3762dc083eb7f -r119cd695daee08e15d7a4132b0a64c6c2242fb44 --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 2124420a19819f672e9180979ff3762dc083eb7f) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 119cd695daee08e15d7a4132b0a64c6c2242fb44) @@ -334,6 +334,7 @@ eCan_Unknown = -1, eCan_HD = 0, eCan_DG = 1, + eCan_DI = 2, }; /*! Index: sources/canbus/MessageInterpreter.cpp =================================================================== diff -u -r2d37cfe6593a90633a9db1fa5136f8fc43b56188 -r119cd695daee08e15d7a4132b0a64c6c2242fb44 --- sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 2d37cfe6593a90633a9db1fa5136f8fc43b56188) +++ sources/canbus/MessageInterpreter.cpp (.../MessageInterpreter.cpp) (revision 119cd695daee08e15d7a4132b0a64c6c2242fb44) @@ -25,6 +25,7 @@ using namespace Can; using namespace Model; +#define DISABLE_CHECKIN_LOG 0 #define DEBUG_SIGNAL(vID, vMODEL) // qDebug() << vID << vMODEL; @@ -169,8 +170,8 @@ */ void MessageInterpreter::printUnhandled(const Message &vMessage) const { - if ( logUnhandledMessage(vMessage)) return; - if ( gDisableUnhandledReport ) return; + if ( logUnhandledMessage(vMessage)) return; // the message is defined as unhandled and can still be handled and logged, return. + if ( gDisableUnhandledReport ) return; // if the unhandled message error has been disabled, return. QString mActionIdHexString = Format::toHexString(vMessage.actionId, false, eLenMessageIDDigits); QString logMessage = tr("Unhandled Message ID (HD)") + '\n' + QString("%1 # %2 %3") @@ -226,8 +227,9 @@ if ( length ) { // this message has a variable length vPayload = Format::fromVariant(vData[0]); } - // DEBUG: +#if DISABLE_CHECKIN_LOG == 0 LOG_EVENT_UI(QString("CheckIn")); +#endif break; case Gui::GuiActionType::ID_RawData: // len: 255, can have any len @@ -321,6 +323,15 @@ if (vText) *vText = "DG"; return Can_Source::eCan_DG; + case eDialin_HD : // 0x400, ///< dialin => HD + case eHD_Dialin : // 0x401, ///< HD => dialin + case eDialin_DG : // 0x402, ///< dialin => DG + case eDG_Dialin : // 0x403, ///< DG => dialin + case eDialin_UI : // 0x404, ///< dialin => UI + case eUI_Dialin : // 0x405, ///< UI => dialin + if (vText) *vText = "DI"; + return Can_Source::eCan_DI; + default: if (vText) *vText = "XX"; return Can_Source::eCan_Unknown; @@ -349,6 +360,15 @@ if (vText) *vText = "DG"; return Can_Id::eChlid_UI_DG; + case eDialin_HD : // 0x400, ///< dialin => HD + case eHD_Dialin : // 0x401, ///< HD => dialin + case eDialin_DG : // 0x402, ///< dialin => DG + case eDG_Dialin : // 0x403, ///< DG => dialin + case eDialin_UI : // 0x404, ///< dialin => UI + case eUI_Dialin : // 0x405, ///< UI => dialin + if (vText) *vText = "DI"; + return Can_Id::eChlid_UI_Sync; + default: if (vText) *vText = "XX"; return Can_Id::eChlid_UI_Sync; @@ -359,6 +379,11 @@ * \brief MessageInterpreter::interpretMessage * \details This method will call appropriate message interpreter * for received messages from HD or DG regarding the Can_Id. + * This function checks to identify the source of the message. + * if it is from HD or DG then checks the standard handled messages with strongly typed models. + * we still have a chance in each HD/DG interpreter to log the unhandled messages. + * if the source is none of the HD or DG it doesn't go to the individual interpreters, + * and the message will identified as unhandled immediately. * \param vCan_Id - The Channel Id of the CANBus frame. * \param vMessage - The complete message of type Message which needs to be interpreted. * \param vActionId - The ActionId of GuiActionType which will be extracted from vMessage. @@ -375,7 +400,7 @@ switch (identifySource(vMessage.can_id)) { case Can_Source::eCan_HD: ok = interpretMessage_HD(vMessage, vData); break; case Can_Source::eCan_DG: ok = interpretMessage_DG(vMessage, vData); break; - default : break; + default : printUnhandled (vMessage ); break; // ok is false, the individual interpreters for ?HD/DG should not be called, and it should be done here. } return ok; } @@ -399,18 +424,18 @@ vData.clear(); switch (vMessage.actionId) { // notice we are in receive mode // ----- Debug - case Gui::GuiActionType::ID_CANBusFaultCount : ok = canbusFaultCountData (vMessage, vData); break; // TODO : implement notify<>() + case Gui::GuiActionType::ID_CANBusFaultCount : ok = canbusFaultCountData (vMessage, vData); /* TODO : implement notify<>() */ break; case Gui::GuiActionType::ID_HDDebugText : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDDebugText ); break; case Gui::GuiActionType::ID_HDGeneralEvent : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDGeneralEvent ); break; // ----- Events - case Gui::GuiActionType::ID_Acknow : ok = true; break; // TODO : implement notify<>() + case Gui::GuiActionType::ID_Acknow : ok = true; /* TODO : implement notify<>() */ break; case Gui::GuiActionType::ID_PowerOff : ok = notify(vMessage, vData, Gui::GuiActionType::ID_PowerOff ); break; - case Gui::GuiActionType::ID_ShuttingDown : ok = true; LOG_EVENT("HD,ShuttingDown"); break; // TODO : implement notify<>() + case Gui::GuiActionType::ID_ShuttingDown : ok = true; LOG_EVENT("HD,ShuttingDown"); /* TODO : implement notify<>() */ break; // ----- POST case Gui::GuiActionType::ID_HDPostSingleResultData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDPostSingleResultData ); break; - case Gui::GuiActionType::ID_HDPostFinalResultData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDPostFinalResultData ); break; + case Gui::GuiActionType::ID_HDPostFinalResultData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_HDPostFinalResultData ); break; // ----- Settings case Gui::GuiActionType::ID_AdjustVersionsHDReq : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustVersionsHDReq ); break; @@ -488,8 +513,8 @@ case Gui::GuiActionType::ID_AdjustChemicalConfirmRsp : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AdjustChemicalConfirmRsp ); break; // these need to be standard and use notify as well - case Gui::GuiActionType::ID_AdjustUltrafiltrationEditRsp : ok = adjustUltrafiltrationEdit (vMessage, vData); break; // TODO : implement notify<>() - case Gui::GuiActionType::ID_AdjustUltrafiltrationConfirmRsp : ok = adjustUltrafiltrationConfirm (vMessage, vData); break; // TODO : implement notify<>() + case Gui::GuiActionType::ID_AdjustUltrafiltrationEditRsp : ok = adjustUltrafiltrationEdit (vMessage, vData); /* TODO : implement notify<>() */ break; + case Gui::GuiActionType::ID_AdjustUltrafiltrationConfirmRsp : ok = adjustUltrafiltrationConfirm (vMessage, vData); /* TODO : implement notify<>() */ break; // ----- Alarms case Gui::GuiActionType::ID_AlarmStatus : ok = notify(vMessage, vData, Gui::GuiActionType::ID_AlarmStatus ); break; @@ -503,7 +528,7 @@ // unhandled messages: these will only be logged as received message // there has nothing been defined for these messages. - default : printUnhandled(vMessage); break; + default : printUnhandled (vMessage ); break; } return ok; @@ -527,11 +552,9 @@ bool ok = false; vData.clear(); switch (vMessage.actionId) { // notice we are in receive mode - case Gui::GuiActionType::ID_Acknow : ok = true; break; // TODO : implement notify<>() - case Gui::GuiActionType::ID_DGCheckIn: // TODO : implement notify<>() - ok = true; - LOG_EVENT(QString("DG,CheckIn," + QVariant(vData).toStringList().join(','))); - break; + case Gui::GuiActionType::ID_Acknow : ok = true; /* TODO : implement notify<>() */ break; + case Gui::GuiActionType::ID_DGCheckIn : ok = true; /* TODO : implement notify<>() */ + LOG_EVENT(QString("DG,CheckIn," + QVariant(vData).toStringList().join(','))); break; // ----- POST case Gui::GuiActionType::ID_DGPostSingleResultData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGPostSingleResultData ); break; case Gui::GuiActionType::ID_DGPostFinalResultData : ok = notify(vMessage, vData, Gui::GuiActionType::ID_DGPostFinalResultData ); break; @@ -565,7 +588,7 @@ // unhandled messages: these will only be logged as received message // there has nothing been defined for these messages. - default : printUnhandled(vMessage); break; + default : printUnhandled (vMessage ); break; } return ok; @@ -686,10 +709,12 @@ for ( int i = 0; i < items.count(); i++ ) { QString item = items[i]; if (i == 0) { - switch (identifySource(vMessage.can_id)) { - case Can_Source::eCan_HD: logString = "HD,~" + item; break; - case Can_Source::eCan_DG: logString = "DG,~" + item; break; - default : logString = "XX,~" + item; break; + QString ID; + switch (identifySource(vMessage.can_id, &ID)) { + case Can_Source::eCan_HD: logString = ID + ",~" + item; break; + case Can_Source::eCan_DG: logString = ID + ",~" + item; break; + case Can_Source::eCan_DI: logString = ID + ",~" + item; break; + default : logString = ID + ",~" + item; break; } } else { Index: sources/model/dg/data/MDGAccelerometerData.h =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r119cd695daee08e15d7a4132b0a64c6c2242fb44 --- sources/model/dg/data/MDGAccelerometerData.h (.../MDGAccelerometerData.h) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/model/dg/data/MDGAccelerometerData.h (.../MDGAccelerometerData.h) (revision 119cd695daee08e15d7a4132b0a64c6c2242fb44) @@ -53,9 +53,9 @@ *

Logging info

* | || * | || - * | typeText | Datum | - * | unitText | DG | - * | infoText | DGAccelData | + * | typeText | Datum | + * | unitText | DG | + * | infoText | Accel | * */ class MDGAccelerometer : public MAbstract { @@ -79,9 +79,9 @@ public: - Type_Enum typeText() const override { return Type_Enum::eDatum ; } - Unit_Enum unitText() const override { return Unit_Enum::eDG ; } - QString infoText() const override { return QString("DGAccelData") ; } + Type_Enum typeText() const override { return Type_Enum::eDatum; } + Unit_Enum unitText() const override { return Unit_Enum::eDG ; } + QString infoText() const override { return QString("Accel") ; } struct Data { float mX = 0; /*!< x Magnitude of acceleration vector in x axis in g units */ Index: sources/model/dg/data/post/MDGPostFinalResultData.h =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r119cd695daee08e15d7a4132b0a64c6c2242fb44 --- sources/model/dg/data/post/MDGPostFinalResultData.h (.../MDGPostFinalResultData.h) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/model/dg/data/post/MDGPostFinalResultData.h (.../MDGPostFinalResultData.h) (revision 119cd695daee08e15d7a4132b0a64c6c2242fb44) @@ -44,9 +44,9 @@ *

Logging info

* | || * | || - * | typeText | Event | - * | unitText | DG | - * | infoText | DGPOSTDone | + * | typeText | Event | + * | unitText | DG | + * | infoText | POSTDone | * */ @@ -63,9 +63,9 @@ public: - Type_Enum typeText () const override { return Type_Enum::eDatum ;} - Unit_Enum unitText () const override { return Unit_Enum::eDG ;} - QString infoText () const override { return QString("DGPOSTDone") ;} + Type_Enum typeText () const override { return Type_Enum::eDatum ;} + Unit_Enum unitText () const override { return Unit_Enum::eDG ;} + QString infoText () const override { return QString("POSTDone") ;} struct Data { quint32 mResult; Index: sources/model/dg/data/post/MDGPostSingleResultData.h =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r119cd695daee08e15d7a4132b0a64c6c2242fb44 --- sources/model/dg/data/post/MDGPostSingleResultData.h (.../MDGPostSingleResultData.h) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/model/dg/data/post/MDGPostSingleResultData.h (.../MDGPostSingleResultData.h) (revision 119cd695daee08e15d7a4132b0a64c6c2242fb44) @@ -45,9 +45,9 @@ *

Logging info

* | || * | || - * | typeText | Event | - * | unitText | DG | - * | infoText | DGPOSTItem | + * | typeText | Event | + * | unitText | DG | + * | infoText | POSTItem | * */ @@ -65,9 +65,9 @@ public: - Type_Enum typeText () const override { return Type_Enum::eDatum ;} - Unit_Enum unitText () const override { return Unit_Enum::eDG ;} - QString infoText () const override { return QString("DGPOSTItem") ;} + Type_Enum typeText () const override { return Type_Enum::eDatum ;} + Unit_Enum unitText () const override { return Unit_Enum::eDG ;} + QString infoText () const override { return QString("POSTItem") ;} struct Data { quint32 mResult; Index: sources/model/hd/data/MHDAccelerometerData.h =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r119cd695daee08e15d7a4132b0a64c6c2242fb44 --- sources/model/hd/data/MHDAccelerometerData.h (.../MHDAccelerometerData.h) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/model/hd/data/MHDAccelerometerData.h (.../MHDAccelerometerData.h) (revision 119cd695daee08e15d7a4132b0a64c6c2242fb44) @@ -53,9 +53,9 @@ *

Logging info

* | || * | || - * | typeText | Datum | - * | unitText | HD | - * | infoText | HDAccelData | + * | typeText | Datum | + * | unitText | HD | + * | infoText | Accel | * */ class MHDAccelerometer : public MAbstract { @@ -79,9 +79,9 @@ public: - Type_Enum typeText() const override { return Type_Enum::eDatum ; } - Unit_Enum unitText() const override { return Unit_Enum::eHD ; } - QString infoText() const override { return QString("HDAccelData") ; } + Type_Enum typeText() const override { return Type_Enum::eDatum; } + Unit_Enum unitText() const override { return Unit_Enum::eHD ; } + QString infoText() const override { return QString("Accel") ; } struct Data { float mX = 0; /*!< x Magnitude of acceleration vector in x axis in g units */ Index: sources/model/hd/data/MHDSyringePumpData.h =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r119cd695daee08e15d7a4132b0a64c6c2242fb44 --- sources/model/hd/data/MHDSyringePumpData.h (.../MHDSyringePumpData.h) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/model/hd/data/MHDSyringePumpData.h (.../MHDSyringePumpData.h) (revision 119cd695daee08e15d7a4132b0a64c6c2242fb44) @@ -56,9 +56,9 @@ *

Logging info

* | || * | || - * | typeText | Datum | - * | unitText | HD | - * | infoText | HDSyringeData | + * | typeText | Datum | + * | unitText | HD | + * | infoText | Syringe | * */ class MHDSyringePump : public MAbstract { @@ -86,7 +86,7 @@ Type_Enum typeText() const override { return Type_Enum::eDatum ; } Unit_Enum unitText() const override { return Unit_Enum::eHD ; } - QString infoText() const override { return QString("HDSyringeData"); } + QString infoText() const override { return QString("Syringe"); } struct Data { quint32 mSyringePumpState = 0; Index: sources/model/hd/data/post/MHDPostFinalResultData.h =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r119cd695daee08e15d7a4132b0a64c6c2242fb44 --- sources/model/hd/data/post/MHDPostFinalResultData.h (.../MHDPostFinalResultData.h) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/model/hd/data/post/MHDPostFinalResultData.h (.../MHDPostFinalResultData.h) (revision 119cd695daee08e15d7a4132b0a64c6c2242fb44) @@ -44,9 +44,9 @@ *

Logging info

* | || * | || - * | typeText | Event | - * | unitText | HD | - * | infoText | HDPOSTDone | + * | typeText | Event | + * | unitText | HD | + * | infoText | POSTDone | * */ @@ -63,9 +63,9 @@ public: - Type_Enum typeText () const override { return Type_Enum::eDatum ;} - Unit_Enum unitText () const override { return Unit_Enum::eHD ;} - QString infoText () const override { return QString("HDPOSTDone") ;} + Type_Enum typeText () const override { return Type_Enum::eDatum ;} + Unit_Enum unitText () const override { return Unit_Enum::eHD ;} + QString infoText () const override { return QString("POSTDone") ;} struct Data { quint32 mResult; Index: sources/model/hd/data/post/MHDPostSingleResultData.h =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r119cd695daee08e15d7a4132b0a64c6c2242fb44 --- sources/model/hd/data/post/MHDPostSingleResultData.h (.../MHDPostSingleResultData.h) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/model/hd/data/post/MHDPostSingleResultData.h (.../MHDPostSingleResultData.h) (revision 119cd695daee08e15d7a4132b0a64c6c2242fb44) @@ -65,9 +65,9 @@ public: - Type_Enum typeText () const override { return Type_Enum::eDatum ;} - Unit_Enum unitText () const override { return Unit_Enum::eHD ;} - QString infoText () const override { return QString("HDPOSTItem") ;} + Type_Enum typeText () const override { return Type_Enum::eDatum ;} + Unit_Enum unitText () const override { return Unit_Enum::eHD ;} + QString infoText () const override { return QString("POSTItem") ;} struct Data { quint32 mResult; Index: sources/view/settings/VDateTime.cpp =================================================================== diff -u -r27cc308ff5113a9386899d3c8f8b29962a8498e1 -r119cd695daee08e15d7a4132b0a64c6c2242fb44 --- sources/view/settings/VDateTime.cpp (.../VDateTime.cpp) (revision 27cc308ff5113a9386899d3c8f8b29962a8498e1) +++ sources/view/settings/VDateTime.cpp (.../VDateTime.cpp) (revision 119cd695daee08e15d7a4132b0a64c6c2242fb44) @@ -227,8 +227,7 @@ { if ( eMorningMin <= vMilitaryTime && vMilitaryTime < eMorningMax ) { greeting(tr("Good Morning" )); return; } if ( eAfternoonMin <= vMilitaryTime && vMilitaryTime < eAfternoonMax ) { greeting(tr("Good Afternoon")); return; } - - greeting(tr("Good Evening")); + greeting(tr("Good Evening" )); } /*!