Index: sources/canbus/MessageGlobals.h =================================================================== diff -u -re4a0e2fc4c7ae0cbce0d670772276bf7f5ff3845 -r2124420a19819f672e9180979ff3762dc083eb7f --- sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision e4a0e2fc4c7ae0cbce0d670772276bf7f5ff3845) +++ sources/canbus/MessageGlobals.h (.../MessageGlobals.h) (revision 2124420a19819f672e9180979ff3762dc083eb7f) @@ -1,15 +1,15 @@ /*! - * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * + * Copyright (c) 2020-2022 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * - * \file MessageGlobals.h - * \author (last) Peter Lucia - * \date (last) 15-Oct-2020 - * \author (original) Behrouz NematiPour - * \date (original) 26-Aug-2020 + * \file MessageGlobals.h + * \author (last) Behrouz NematiPour + * \date (last) 07-Feb-2022 + * \author (original) Behrouz NematiPour + * \date (original) 26-Aug-2020 * */ #pragma once @@ -44,6 +44,10 @@ * */ const QHash payloadLen { + // FixMe: This has to be move to each model. + // it has been observed that these length can only check the payload length is correct. + // but if the model still needs more the model will fail. + // so it is better to keep them next to each other to make sure they are in sync. // ---- {Gui::GuiActionType::ID_PowerOff , 1 }, {Gui::GuiActionType::ID_ShuttingDown , 0 }, @@ -67,12 +71,14 @@ {Gui::GuiActionType::ID_Rinseback , 6 * 4 }, // 6 parameters each 4bytes {Gui::GuiActionType::ID_Recirculate , 2 * 4 }, // 2 parameters each 4bytes {Gui::GuiActionType::ID_BloodPrime , 2 * 4 }, // 2 parameters each 4bytes - + {Gui::GuiActionType::ID_TreatmentStop , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_HDAirBubbleData , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_HDAirTrapData , 2 * 4 }, // 2 parameters each 4bytes + {Gui::GuiActionType::ID_HDBloodLeakData , 10 * 4 }, // 2 parameters each 4bytes // ---- {Gui::GuiActionType::ID_HDOperationModeData , 2 * 4 }, // 2 parameter each 4bytes {Gui::GuiActionType::ID_PreTreatmentStates , 9 * 4 }, // 9 parameters each 4bytes - {Gui::GuiActionType::ID_TreatmentStates , 9 * 4 }, // 9 parameters each 4bytes - {Gui::GuiActionType::ID_TreatmentStates , 1 * 4 }, // 1 parameter each 4bytes + {Gui::GuiActionType::ID_TreatmentStates , 10 * 4 }, // 9 parameters each 4bytes {Gui::GuiActionType::ID_PostTreatmentStates , 1 * 4 }, // 1 parameter each 4bytes {Gui::GuiActionType::ID_DisinfectStates , 3 * 4 }, // 3 parameter each 4bytes @@ -87,6 +93,7 @@ {Gui::GuiActionType::ID_DGLoadCellReadingsData , 4 * 4 }, // 4 parameters each 4bytes {Gui::GuiActionType::ID_DGTemperaturesData , 12 * 4 }, // 12 parameters each 4bytes {Gui::GuiActionType::ID_DGAccelerometerData , 9 * 4 }, // 9 parameters each 4bytes + {Gui::GuiActionType::ID_DGConductivityData , 5 * 4 }, // 9 parameters each 4bytes // HD Data Messages {Gui::GuiActionType::ID_HDAccelerometerData , 9 * 4 }, // 9 parameters each 4bytes {Gui::GuiActionType::ID_HDSyringePumpData , 9 * 4 }, // 9 parameters each 4bytes @@ -137,8 +144,8 @@ {Gui::GuiActionType::ID_AdjustInitTreatmentReq , 1 * 4 }, // 1 parameters each 4bytes {Gui::GuiActionType::ID_AdjustInitTreatmentRsp , 2 * 4 }, // 2 parameters each 4bytes // Pre-Treatment Treatment Parameters Validation/Confirm - {Gui::GuiActionType::ID_AdjustParametersValidationReq , 17 * 4 }, //17 parameters each 4bytes - {Gui::GuiActionType::ID_AdjustParametersValidationRsp , 18 * 4 }, //18 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustParametersValidationReq , 18 * 4 }, //18 parameters each 4bytes + {Gui::GuiActionType::ID_AdjustParametersValidationRsp , 19 * 4 }, //19 parameters each 4bytes {Gui::GuiActionType::ID_AdjustParametersConfirmReq , 1 * 4 }, // 1 parameters each 4bytes // Pre-Treatment Water Sample {Gui::GuiActionType::ID_DGFilterFlushData , 2 * 4 }, // 2 parameters each 4bytes @@ -200,7 +207,7 @@ // ---- Treatment Log {Gui::GuiActionType::ID_AdjustTreatmentLogReq , 0 * 4 }, // 0 parameter - {Gui::GuiActionType::ID_AdjustTreatmentLogRsp , 33 * 4 }, //33 parameter each 4bytes + {Gui::GuiActionType::ID_AdjustTreatmentLogRsp , 36 * 4 }, //36 parameter each 4bytes {Gui::GuiActionType::ID_TreatmentLogAvrgeData , 5 * 4 }, // 5 parameter each 4bytes {Gui::GuiActionType::ID_TreatmentLogAlarmData , 3 * 4 }, // 3 parameter each 4bytes {Gui::GuiActionType::ID_TreatmentLogEventData , 3 * 4 }, // 3 parameter each 4bytes @@ -243,6 +250,9 @@ {Gui::GuiActionType::ID_HDDebugText , 40 + 1 }, // ASCII text - 40 bytes + null term {Gui::GuiActionType::ID_DGDebugText , 40 + 1 }, // ASCII text - 40 bytes + null term + {Gui::GuiActionType::ID_HDGeneralEvent , 5 * 4 }, // 5 parameters each 4bytes + {Gui::GuiActionType::ID_DGGeneralEvent , 5 * 4 }, // 5 parameters each 4bytes + }; /*!