Index: firmware/App/Services/TDInterface.c =================================================================== diff -u -rbd522c8ffdf75130571e5b6a79d1b1d6acd78b1c -ra183c6d91569ee07c9e944c989b67dc818a87941 --- firmware/App/Services/TDInterface.c (.../TDInterface.c) (revision bd522c8ffdf75130571e5b6a79d1b1d6acd78b1c) +++ firmware/App/Services/TDInterface.c (.../TDInterface.c) (revision a183c6d91569ee07c9e944c989b67dc818a87941) @@ -609,7 +609,96 @@ return result; } +/*********************************************************************//** + * @brief + * The handleTDRequestDDFlush function handles a DD flush request from TD. + * @details \b Inputs: none + * @details \b Outputs: DD flush request processed + * @param message Pointer to the received message + * @return TRUE if request is accepted, FALSE otherwise. + *************************************************************************/ +BOOL handleTDRequestDDFlush( MESSAGE_T *message ) +{ + BOOL result = FALSE; + if ( message->hdr.payloadLen == sizeof(U32) ) + { + BOOL startingDDFlush; + + memcpy( &startingDDFlush, message->payload, sizeof(U32) ); + + if ( TRUE == startingDDFlush ) + { + result = startDDFlush(); + } + else + { + ;// DO nothing + } + } + + // Respond to request + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_DD_2_TD, result ); + + return result; +} + +/*********************************************************************//** + * @brief + * The handleTDRequestDDHeatDisinfect function handles a DD heat disinfection + * request from TD. + * @details \b Inputs: none + * @details \b Outputs: DD heat disinfection request processed + * @param message Pointer to the received message + * @return TRUE if request is accepted, FALSE otherwise. + *************************************************************************/ +BOOL handleTDRequestDDHeatDisinfect( MESSAGE_T *message ) +{ + BOOL status = FALSE; + + if ( message->hdr.payloadLen == sizeof(U32) ) + { + status = startDDHeatDisinfect( ); + } + + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_DD_2_TD, status ); + + return status; +} + +/*********************************************************************//** + * @brief + * The handleTDRequestDDHeatDisinfectActiveCool function handles a DD heat + * disinfection active cool request from TD. + * @details \b Inputs: none + * @details \b Outputs: DD heat disinfection active cool request processed + * @param message Pointer to the received message + * @return TRUE if request is accepted, FALSE otherwise. + *************************************************************************/ +BOOL handleTDRequestDDHeatDisinfectActiveCool( MESSAGE_T *message ) +{ + BOOL status = FALSE; + + if ( message->hdr.payloadLen == sizeof(U32) ) + { + BOOL startingDDHeatDisinfect; + + memcpy( &startingDDHeatDisinfect, message->payload, sizeof(U32) ); + + if ( TRUE == startingDDHeatDisinfect ) + { + status = startDDHeatDisinfectActiveCool( ); + } + else + { + ;//do nothing + } + } + + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_DD_2_TD, status ); + + return status; +} /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/