Index: firmware/App/Services/TDInterface.c =================================================================== diff -u -r3cafed12c435f95be8ae38a8e5a5cf20ec6b706f -re81f545a20177c58fa54f6550657a96701dc5476 --- firmware/App/Services/TDInterface.c (.../TDInterface.c) (revision 3cafed12c435f95be8ae38a8e5a5cf20ec6b706f) +++ firmware/App/Services/TDInterface.c (.../TDInterface.c) (revision e81f545a20177c58fa54f6550657a96701dc5476) @@ -7,8 +7,8 @@ * * @file TDInterface.c * -* @author (last) Sameer Kalliadan Poyil -* @date (last) 10-Jul-2026 +* @author (last) suresh +* @date (last) 12-Aug-2026 * * @author (original) Vinayakam Mani * @date (original) 06-Nov-2024 @@ -695,7 +695,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 *************************************************************************/