Index: sources/canbus/MessageDispatcher.h =================================================================== diff -u -rfe9459548d7b0f6c1d8cb77c0e23d7a385b48fa2 -r80b8371f1a93481e05302cef6e474db802fda153 --- sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision fe9459548d7b0f6c1d8cb77c0e23d7a385b48fa2) +++ sources/canbus/MessageDispatcher.h (.../MessageDispatcher.h) (revision 80b8371f1a93481e05302cef6e474db802fda153) @@ -32,7 +32,7 @@ // since this class is the interface between GUI and Can // it needs to use Gui namespace otherwise it makes code hard to read. -using namespace Gui; +//using namespace Gui; namespace Can { /*! * \brief The MessageDispatcher class \n @@ -105,72 +105,6 @@ QThread *_thread = nullptr; bool _init = false; - // List of the transmit(request) only, messages which require acknowledge back(AckBack). - QList _needsAcknow { - // FIXME: check this on device first. It is not working with dialin. - GuiActionType::ID_KeepAlive , - // CONFIRM - GuiActionType::ID_DuetConfirmUIr , - // POST - GuiActionType::ID_UIPostFinalResultData , - // Alarm - GuiActionType::ID_AlarmUserActionReq , - GuiActionType::ID_AlarmSilenceReq , - GuiActionType::ID_AlarmClearedConditionReq , - GuiActionType::ID_AlarmActiveListReq , - GuiActionType::ID_AlarmVolumeSetReq , - // Pre-Treatment - GuiActionType::ID_AdjustInitTreatmentReq , - GuiActionType::ID_AdjustWaterSampleReq , - GuiActionType::ID_AdjustWaterSampleResultReq , - GuiActionType::ID_AdjustConsumablesConfirmReq , - GuiActionType::ID_AdjustDisposablesConfirmReq , - GuiActionType::ID_AdjustDisposablesPrimeReq , - GuiActionType::ID_AdjustPatientConnectionBeginReq , - GuiActionType::ID_AdjustUltrafiltrationInitReq , - GuiActionType::ID_AdjustPatientConnectionConfirmReq , - GuiActionType::ID_AdjustStartTreatmentReq , - // In-Treatment - GuiActionType::ID_AdjustBloodDialysateReq , - GuiActionType::ID_AdjustDurationReq , - GuiActionType::ID_AdjustUltrafiltrationStateReq , - GuiActionType::ID_AdjustUltrafiltrationEditReq , - GuiActionType::ID_AdjustUltrafiltrationConfirmReq , - GuiActionType::ID_AdjustSalineReq , - GuiActionType::ID_AdjustHeparinReq , - GuiActionType::ID_AdjustPressuresLimitsReq , - // End-Treatment - GuiActionType::ID_AdjustRinsebackReq , - GuiActionType::ID_AdjustRecirculateReq , - GuiActionType::ID_AdjustTreatmentEndReq , - // Post-Treatment - GuiActionType::ID_AdjustPatientDisconnectNotifyReq , - GuiActionType::ID_AdjustPatientDisconnectConfirmReq , - GuiActionType::ID_AdjustDisposablesRemovalConfirmReq , - // Disinfect - GuiActionType::ID_AdjustDisinfectModeReq , - GuiActionType::ID_AdjustDisinfectStartReq , - // DG Cleaning - GuiActionType::ID_AdjustDGCleaningUsageReq , - // Settings - GuiActionType::ID_AdjustServiceModeReq , - GuiActionType::ID_AdjustVersionsUIReq , - GuiActionType::ID_AdjustVersionsUIRsp , - GuiActionType::ID_AdjustServiceDatesReq , - GuiActionType::ID_AdjustHDDateTimeReq , - GuiActionType::ID_AdjustDGDateTimeReq , - GuiActionType::ID_HDUsageInfoReq , - GuiActionType::ID_AdjustInstitutionalRecordReq , - // Treatment Log - GuiActionType::ID_AdjustTreatmentLogReq , - GuiActionType::ID_TreatmentLogAvrgeData , - GuiActionType::ID_TreatmentLogAlarmData , - GuiActionType::ID_TreatmentLogEventData , - - // HD reset request in service mode - GuiActionType::ID_ResetHDInServiceModeReq , - }; - public slots: bool init(); bool init(QThread &vThread); @@ -185,10 +119,9 @@ void initThread(QThread &vThread); void quitThread(); - void actionTransmit (GuiActionType vActionId, const QVariantList &vData, Sequence vSequence = 0, Can_Id vCanId = Can::Can_Id::eChlid_UI_HD); + void actionTransmit (const QVariantList &vData, Sequence vSequence = 0, Can_Id vCanId = Can::Can_Id::eChlid_UI_HD); void framesTransmit (Can_Id vCan_Id, const FrameList &vFrameList); - bool needsAcknow (GuiActionType vActionId); bool needsAcknow (Can_Id vCan_Id); bool buildMessage (Can_Id vCan_Id, const QByteArray &vPayload); @@ -209,7 +142,7 @@ * \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); + void didActionReceive (const QVariantList &vData); /*! * \brief didActionReceive @@ -255,20 +188,12 @@ // A Frame has been received from CanInterface void onFrameReceive (Can_Id vCan_Id, const QByteArray &vPayload); + void onActionTransmit (const QVariantList &vData); + // void onFramesTransmit (Can_Id vCan_Id, Sequence vSequence, const FrameList &vFrameList); void onFailedTransmit ( Sequence vSequence); - // An Action has been requested to be transmitted. - void onActionTransmit (GuiActionType vActionId, const QVariantList &vData); - void onSettingsDone (); - - // ---- Signal/Slots - ADJUST_TRANSMT_MODEL_BRIDGE_DEFINITIONS_NOEMIT - ACTION_RECEIVE_MODEL_BRIDGE_DEFINITIONS - - ACTION_RECEIVE_PRIVATE_SLOT(UIPostFinalResultHDRequestData) - }; }