Index: sources/view/hd/data/VHDTreatmentStatesData.cpp =================================================================== diff -u -rbd01334f257c35b96b7b232beacbcd7fae60c852 -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/view/hd/data/VHDTreatmentStatesData.cpp (.../VHDTreatmentStatesData.cpp) (revision bd01334f257c35b96b7b232beacbcd7fae60c852) +++ sources/view/hd/data/VHDTreatmentStatesData.cpp (.../VHDTreatmentStatesData.cpp) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -17,30 +17,9 @@ // Project #include "GuiController.h" -VIEW_DEF_CLASS(VHDTreatmentStates) +VIEW_DEF(VHDTreatmentStates, TreatmentStatesData) /*! - * \brief VTreatmentAdjustmentSaline::initConnections - * \details Initializes the message(s) connection - * \note This class not only listens to its dedicated message TreatmentStatesData, - * But also listens to other messages which affect ultrafiltration and saline bolus state. - * These extra messages are AdjustSalineResponseData , AdjustUltrafiltrationStateResponseData. - * Which ever comes first will set its related properties. - * Since the properties wont set twice if they have the same value it doesn't affect performance so much. - * Also FW suppose to send the TreatmentStatesData related message immediately after the two others. - */ -void VHDTreatmentStates::initConnections() { - ACTION_VIEW_CONNECTION(TreatmentStatesData ); - // these messages sending the same states as in message 15 (TreatmentStates above) - // it is redundant and with a better messaging protocol - // the one in the Adjustment messages should be removed since it is not sent on each state change - // and will be sent only once to the request. - ACTION_VIEW_CONNECTION(AdjustUltrafiltrationStateResponseData ); - ACTION_VIEW_CONNECTION(AdjustSalineResponseData ); - ACTION_VIEW_CONNECTION(AdjustHeparinResponseData ); -} - -/*! * \brief VHDTreatmentStates::onActionReceive * \details sets the properties for the received data of Treatment States * \param vData - Treatment States data @@ -132,46 +111,3 @@ } txStop ( mTreatmentStop ); } - -/*! - * \brief VHDTreatmentStates::onActionReceive - * \details message handler for the message AdjustUltrafiltrationStateResponse data - * \param vData - AdjustUltrafiltrationStateResponse data - */ -void VHDTreatmentStates::onActionReceive(const AdjustUltrafiltrationStateResponseData &vData) -{ - // Ultrafiltration states - ufStart ( vData.mState == GuiUFStates ::UF_START_STATE ); - ufPaused ( vData.mState == GuiUFStates ::UF_PAUSED_STATE ); - ufRunning ( vData.mState == GuiUFStates ::UF_RUNNING_STATE ); -} - -/*! - * \brief VHDTreatmentStates::onActionReceive - * \details message handler for the message AdjustSalineResponseData data - * \param vData - AdjustSalineResponseData data - */ -void VHDTreatmentStates::onActionReceive(const AdjustSalineResponseData &vData) -{ - // Saline Bolus states - sbIdle ( vData.mState == GuiSalineStates ::SALINE_BOLUS_STATE_IDLE ); - sbWaitPump ( vData.mState == GuiSalineStates ::SALINE_BOLUS_STATE_WAIT_FOR_PUMPS_STOP ); - sbRunning ( vData.mState == GuiSalineStates ::SALINE_BOLUS_STATE_IN_PROGRESS ); - sbMaxReached ( vData.mState == GuiSalineStates ::SALINE_BOLUS_STATE_MAX_DELIVERED ); -} - -/*! - * \brief VHDTreatmentStates::onActionReceive - * \details message handler for the message AdjustHeparinResponseData data - * \param vData - AdjustHeparinResponseData data - */ -void VHDTreatmentStates::onActionReceive(const AdjustHeparinResponseData &vData) -{ - // Saline Bolus states - hpOff ( vData.mState == GuiHeparinStates ::HEPARIN_STATE_OFF ); - hpPaused ( vData.mState == GuiHeparinStates ::HEPARIN_STATE_PAUSED ); - hpInitial_bolus ( vData.mState == GuiHeparinStates ::HEPARIN_STATE_INITIAL_BOLUS ); - hpDispensing ( vData.mState == GuiHeparinStates ::HEPARIN_STATE_DISPENSING ); - hpCompleted ( vData.mState == GuiHeparinStates ::HEPARIN_STATE_COMPLETED ); - hpEmpty ( vData.mState == GuiHeparinStates ::HEPARIN_STATE_EMPTY ); -}