Index: firmware/App/Modes/ModePostGenDialysate.c =================================================================== diff -u -r830213bc6dcc1a684610caf78c79d55f2cb41e93 -r5db64c182f58f16d6b4b9a5131a2913b4a156ccc --- firmware/App/Modes/ModePostGenDialysate.c (.../ModePostGenDialysate.c) (revision 830213bc6dcc1a684610caf78c79d55f2cb41e93) +++ firmware/App/Modes/ModePostGenDialysate.c (.../ModePostGenDialysate.c) (revision 5db64c182f58f16d6b4b9a5131a2913b4a156ccc) @@ -186,4 +186,60 @@ return result; } +/*********************************************************************//** + * @brief + * The testValidateDDPostGenDialysateChangeReq function validate whether request + * operation sub mode is legal or not. + * @details \b Inputs: none + * @details \b Outputs: none + * @param newSubMode the enumerated sub state of the mode + * @return TRUE if request is legal, FALSE if not + *************************************************************************/ +BOOL testValidateDDPostGenDialysateChangeReq( U32 newSubMode ) +{ + BOOL result = FALSE; + + if ( newSubMode < NUM_OF_DD_POST_GEN_DIALYSATE_STATES ) + { + switch ( newSubMode ) + { + // TODO add validate condition after checking with Vinay + case DD_POST_GEN_DIALYSATE_STATE_START: + case DD_POST_GEN_DIALYSATE_STATE_COMPLETE: + default: + result = TRUE; + break; + } + } + + return result; +} + +/*********************************************************************//** + * @brief + * The testSignalNewDDPostGenDialysateSubMode function request transition + * to a new operation sub mode. + * @details \b Inputs: none + * @details \b Outputs: none + * @param newSubMode the enumerated sub state of the mode + * @return none + *************************************************************************/ +void testSignalNewDDPostGenDialysateSubMode( U32 newSubMode ) +{ + if ( newSubMode < NUM_OF_DD_POST_GEN_DIALYSATE_STATES ) + { + postGenDialysateState = (DD_POST_GEN_DAILYSATE_STATE_T)newSubMode; + + switch ( newSubMode ) + { + // TODO add logic after checking with Vinay + // Any of these state require no special handling + case DD_POST_GEN_DIALYSATE_STATE_START: + case DD_POST_GEN_DIALYSATE_STATE_COMPLETE: + default: + break; + } + } +} + /**@}*/