Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r9cc5da6947aa143a10f95519eb7f366c1b095d61 -receb190a5d66fdbee779478ac8bb50a846ed9241 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 9cc5da6947aa143a10f95519eb7f366c1b095d61) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision eceb190a5d66fdbee779478ac8bb50a846ed9241) @@ -8,28 +8,32 @@ * @file SystemCommMessages.c * * @author (last) Dara Navaei -* @date (last) 03-Nov-2022 +* @date (last) 21-Dec-2022 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 * ***************************************************************************/ -#include // for memcpy() +#include // for memcpy() #include "reg_system.h" #include "Accel.h" #include "Compatible.h" #include "ConcentratePumps.h" #include "ConductivitySensors.h" +#include "CPLD.h" #include "Fans.h" #include "FlowSensors.h" #include "FPGA.h" #include "Heaters.h" +#include "ModeChemicalDisinfect.h" #include "ModeFill.h" #include "ModeFlush.h" #include "ModeGenIdle.h" +#include "ModeHeatDisinfect.h" +#include "ModeHeatDisinfectActiveCool.h" #include "ModeInitPOST.h" #include "ModeStandby.h" #include "MsgQueues.h" @@ -828,6 +832,35 @@ } /*********************************************************************//** + * @brief + * The handleDGScheduledRunsRequest function handles a request for DG + * scheduled runs information. + * @details Inputs: none + * @details Outputs: message handled, response constructed and queued for + * transmit. + * @return none + *************************************************************************/ +void handleDGScheduledRunsRequest( MESSAGE_T *message ) +{ + MESSAGE_T msg; + DG_SCHEDULED_RUN_RECORD_T scheduledService; + + // Get the service record. There are no arrays of service to check and also, raise no alarm since the service record + // has been already checked in POST + getNVRecord2Driver( GET_SRR_RECORD, (U08*)&scheduledService, sizeof( DG_SCHEDULED_RUN_RECORD_T ), 0, ALARM_ID_NO_ALARM ); + + // Create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_DG_SCHEDULED_RUNS_DATA; + msg.hdr.payloadLen = sizeof( U32 ) + sizeof( U32 ); + + // TODO this message is for Phase 1B. + + // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer + serializeMessage( msg, COMM_BUFFER_OUT_CAN_DG_2_UI, ACK_REQUIRED ); +} + +/*********************************************************************//** * @brief * The handleStartStopDGFlush function handles a request to start or stop * DG flush mode. @@ -1353,6 +1386,41 @@ } /*********************************************************************//** +* @brief +* The handleStartStopDGChemicalDisinfectFlush function handles a request to start +* or stop DG chemical disinfect flush mode. +* @details Inputs: none +* @details Outputs: message handled +* @param message a pointer to the message to handle +* @return none +*************************************************************************/ +BOOL handleStartStopDGChemicalDisinfectFlush( MESSAGE_T *message ) +{ + BOOL result = FALSE; + + if ( message->hdr.payloadLen == sizeof(BOOL) ) + { + BOOL startingDGChemicalDisinfectFlush; + + memcpy( &startingDGChemicalDisinfectFlush, message->payload, sizeof(BOOL) ); + + if ( TRUE == startingDGChemicalDisinfectFlush ) + { + result = startDGChemicalDisinfectFlush(); + } + else + { + result = stopChemicalDisinfectFlush(); + } + } + + // Respond to request + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_DG_2_HD, result ); + + return result; +} + +/*********************************************************************//** * @brief * The handleTestSetOpModeRequest function handles a request to set the * DG operation mode. @@ -1434,6 +1502,44 @@ } /*********************************************************************//** +* @brief +* The handleServiceModeRequest function handles a request to enter service +* mode. +* @details Inputs: none +* @details Outputs: message handled +* @param message a pointer to the message to handle +* @return none +*************************************************************************/ +void handleServiceModeRequest( MESSAGE_T *message ) +{ + BOOL status = FALSE; + DG_OP_MODE_T currentMode = getCurrentOperationMode(); + REQUEST_REJECT_REASON_CODE_T reject; + + if ( 0 == message->hdr.payloadLen ) + { + if ( ( DG_MODE_STAN == currentMode ) || ( DG_MODE_FAUL == currentMode ) ) + { + status = TRUE; + requestNewOperationMode( DG_MODE_SERV ); + reject = REQUEST_REJECT_REASON_NONE; + } + else + { + reject = REQUEST_REJECT_REASON_DG_NOT_IN_STANDBY_IDLE_STATE; + } + } + else + { + reject = REQUEST_REJECT_REASON_INVALID_REQUEST_FORMAT; + } + + // Respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, status ); + sendServiceModeResponse( status, (U32)reject ); +} + +/*********************************************************************//** * @brief * The handleHDRequestDGUsageInfo function handles a request for DG * usage information. @@ -1451,7 +1557,7 @@ // Create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_DG_USAGE_DATA; - msg.hdr.payloadLen = sizeof( U32 ) + sizeof( U32 ) + sizeof( BOOL ); + msg.hdr.payloadLen = sizeof( DG_USAGE_INFO_RECORD_T ); // Get the service record. There are no arrays of service to check and also, raise no alarm since the service record // has been already checked in POST @@ -1460,18 +1566,126 @@ if ( 0 == message->hdr.payloadLen ) { // Fill message payload - memcpy( payloadPtr, &usageInfo.lastHeatDisDateEpoch, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &usageInfo.lastChemicalDisDateEpoch, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &usageInfo.isDisinfected, sizeof( BOOL ) ); + memcpy( payloadPtr, &usageInfo, sizeof( DG_USAGE_INFO_RECORD_T ) ); } // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer serializeMessage( msg, COMM_BUFFER_OUT_CAN_DG_2_HD, ACK_REQUIRED ); } +/*********************************************************************//** + * @brief + * The sendServiceModeResponse function sends out the DG response to a + * UI request to go to service mode. + * @details Inputs: none + * @details Outputs: Service mode request response msg constructed and queued + * @param accepted TRUE if request was accepted, FALSE if not + * @param rejCode Reject reason code explaining why request was rejected + * @return none + *************************************************************************/ +BOOL sendServiceModeResponse( BOOL accepted, U32 rejCode ) +{ + BOOL result; + MESSAGE_T msg; + U08 *payloadPtr = msg.payload; + // Create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_DG_RESPONSE_SERVICE_MODE_REQUEST; + msg.hdr.payloadLen = sizeof( BOOL ) + sizeof( U32 ); + + memcpy( payloadPtr, &accepted, sizeof( BOOL ) ); + payloadPtr += sizeof( BOOL ); + memcpy( payloadPtr, &rejCode, sizeof( U32 ) ); + + // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer + result = serializeMessage( msg, COMM_BUFFER_OUT_CAN_DG_2_HD, ACK_REQUIRED ); + + return result; +} + +/*********************************************************************//** + * @brief + * The handleSetDGServiceTime function sets the DG service time once the + * command is received from UI + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleSetDGServiceTime( MESSAGE_T *message ) +{ + BOOL result = FALSE; + + if ( 0 == message->hdr.payloadLen ) + { + result = setServiceTime(); + } + + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_DG_2_UI, result ); +} + +/************************************************************************* + * @brief + * The handleStartStopDGHeatDisinfectActiveCool function handles a request + * start or stop DG heat disinfect active cool mode. + * @details Inputs: none + * @details Outputs: message handled + * @param message: a pointer to the message to handle + * @return result + *************************************************************************/ +void handleStartStopDGHeatDisinfectActiveCool( MESSAGE_T* message ) +{ + BOOL status = FALSE; + + if ( message->hdr.payloadLen == sizeof(U32) ) + { + BOOL startingDGHeatDisinfectActiveCool; + + memcpy( &startingDGHeatDisinfectActiveCool, message->payload, sizeof(U32) ); + + if ( TRUE == startingDGHeatDisinfectActiveCool ) + { + status = startDGHeatDisinfectActiveCool(); + } + else + { + status = stopDGHeatDisinfectActiveCool(); + } + } + + sendAckResponseMsg( (MSG_ID_T)message->hdr.msgID, COMM_BUFFER_OUT_CAN_DG_2_HD, status ); +} + +/*********************************************************************//** + * @brief + * The handleCpldStatusRequest function handles a CPLD Status request message. + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleCpldStatusRequest( MESSAGE_T *message ) +{ + MESSAGE_T msg; + CPLD_STATUS_T payload; + U08 *payloadPtr = msg.payload; + + // populate payload + getCPLDStatus( &payload ); + // create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_DG_CPLD_STATUS; + msg.hdr.payloadLen = sizeof( CPLD_STATUS_T ); + + // fill message payload + memcpy( payloadPtr, &payload, sizeof( CPLD_STATUS_T ) ); + + // serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer + serializeMessage( msg, COMM_BUFFER_OUT_CAN_DG_BROADCAST, ACK_NOT_REQUIRED ); +} + + // *********************************************************************** // **************** Message Handling Helper Functions ******************** // *********************************************************************** @@ -2678,13 +2892,13 @@ result = TRUE; memcpy( &payload, message->payload, sizeof( TEST_OVERRIDE_ARRAY_PAYLOAD_T ) ); - if ( ( BOOL )payload.state.u32 ) + if ( TRUE == ( BOOL )payload.state.u32 ) { requestConcentratePumpOn( ( CONCENTRATE_PUMPS_T )payload.index ); } else { - requestConcentratePumpOff( ( CONCENTRATE_PUMPS_T )payload.index ); + requestConcentratePumpOff( ( CONCENTRATE_PUMPS_T )payload.index, NO_PARK_CONC_PUMPS ); } } @@ -2950,16 +3164,19 @@ U32 totalMessages; U32 payloadLength; - memcpy(¤tMessage, payloadPtr, sizeof(U32)); - payloadPtr += sizeof(U32); + if ( message->hdr.payloadLen >= ( sizeof(currentMessage) + sizeof(totalMessages) + sizeof(payloadLength) ) ) + { + memcpy(¤tMessage, payloadPtr, sizeof(U32)); + payloadPtr += sizeof(U32); - memcpy(&totalMessages, payloadPtr, sizeof(U32)); - payloadPtr += sizeof(U32); + memcpy(&totalMessages, payloadPtr, sizeof(U32)); + payloadPtr += sizeof(U32); - memcpy(&payloadLength, payloadPtr, sizeof(U32)); - payloadPtr += sizeof(U32); + memcpy(&payloadLength, payloadPtr, sizeof(U32)); + payloadPtr += sizeof(U32); - status = receiveRecordFromDialin( NVDATAMGMT_CALIBRATION_RECORD, currentMessage, totalMessages, payloadLength, payloadPtr ); + status = receiveRecordFromDialin( NVDATAMGMT_CALIBRATION_RECORD, currentMessage, totalMessages, payloadLength, payloadPtr ); + } // Respond to request sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, status ); @@ -3009,16 +3226,19 @@ U32 totalMessages; U32 payloadLength; - memcpy(¤tMessage, payloadPtr, sizeof(U32)); - payloadPtr += sizeof(U32); + if ( message->hdr.payloadLen >= ( sizeof(currentMessage) + sizeof(totalMessages) + sizeof(payloadLength) ) ) + { + memcpy(¤tMessage, payloadPtr, sizeof(U32)); + payloadPtr += sizeof(U32); - memcpy(&totalMessages, payloadPtr, sizeof(U32)); - payloadPtr += sizeof(U32); + memcpy(&totalMessages, payloadPtr, sizeof(U32)); + payloadPtr += sizeof(U32); - memcpy(&payloadLength, payloadPtr, sizeof(U32)); - payloadPtr += sizeof(U32); + memcpy(&payloadLength, payloadPtr, sizeof(U32)); + payloadPtr += sizeof(U32); - status = receiveRecordFromDialin( NVDATAMGMT_SYSTEM_RECORD, currentMessage, totalMessages, payloadLength, payloadPtr ); + status = receiveRecordFromDialin( NVDATAMGMT_SYSTEM_RECORD, currentMessage, totalMessages, payloadLength, payloadPtr ); + } // Respond to request sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, status ); @@ -3095,7 +3315,7 @@ U32 totalMessages; U32 payloadLength; - if ( 0 == message->hdr.payloadLen ) + if ( message->hdr.payloadLen >= ( sizeof(currentMessage) + sizeof(totalMessages) + sizeof(payloadLength) ) ) { memcpy(¤tMessage, payloadPtr, sizeof(U32)); payloadPtr += sizeof(U32); @@ -3787,71 +4007,275 @@ /*********************************************************************//** * @brief -* The handleServiceModeRequest function handles a request to enter service -* mode. +* The handleTestDGNVRecordCRCOverride function handles a request to override +* the selected NV record's CRC. * @details Inputs: none * @details Outputs: message handled * @param message a pointer to the message to handle * @return none *************************************************************************/ -void handleServiceModeRequest( MESSAGE_T *message ) +void handleTestDGNVRecordCRCOverride( MESSAGE_T *message ) { - BOOL status = FALSE; - DG_OP_MODE_T currentMode = getCurrentOperationMode(); - REQUEST_REJECT_REASON_CODE_T reject; + TEST_OVERRIDE_ARRAY_PAYLOAD_T payload; + BOOL result = FALSE; - if ( 0 == message->hdr.payloadLen ) + // verify payload length + if ( sizeof( TEST_OVERRIDE_ARRAY_PAYLOAD_T ) == message->hdr.payloadLen ) { - if ( ( DG_MODE_STAN == currentMode ) || ( DG_MODE_FAUL == currentMode ) ) + memcpy( &payload, message->payload, sizeof( TEST_OVERRIDE_ARRAY_PAYLOAD_T ) ); + result = testSetNVRecordCRCOverride( payload.index, (U16)payload.state.u32 ); + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** +* The handleTestDGConcPumpParkStatusOverrideRequest function handles a +* request to override the parked status of a given concentrate pump. +* @details Inputs: none +* @details Outputs: message handled +* @param message a pointer to the message to handle +* @return none +*************************************************************************/ +void handleTestDGConcPumpParkStatusOverrideRequest( MESSAGE_T *message ) +{ + TEST_OVERRIDE_ARRAY_PAYLOAD_T payload; + BOOL result = FALSE; + + // verify payload length + if ( sizeof( TEST_OVERRIDE_ARRAY_PAYLOAD_T ) == message->hdr.payloadLen ) + { + memcpy( &payload, message->payload, sizeof( TEST_OVERRIDE_ARRAY_PAYLOAD_T ) ); + + if ( FALSE == payload.reset ) { - status = TRUE; - requestNewOperationMode( DG_MODE_SERV ); - reject = REQUEST_REJECT_REASON_NONE; + result = testSetConcentratePumpParkedOverride( payload.index, (U16)payload.state.u32 ); } else { - reject = REQUEST_REJECT_REASON_DG_NOT_IN_STANDBY_IDLE_STATE; + result = testResetConcentratePumpParkedOverride( payload.index ); } } - else + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** +* The handleTestDGConcPumpParkFaultStatusOverrideRequest function handles a +* request to override the park faulted status of a given concentrate pump. +* @details Inputs: none +* @details Outputs: message handled +* @param message a pointer to the message to handle +* @return none +*************************************************************************/ +void handleTestDGConcPumpParkFaultStatusOverrideRequest( MESSAGE_T *message ) +{ + TEST_OVERRIDE_ARRAY_PAYLOAD_T payload; + BOOL result = FALSE; + + // verify payload length + if ( sizeof( TEST_OVERRIDE_ARRAY_PAYLOAD_T ) == message->hdr.payloadLen ) { - reject = REQUEST_REJECT_REASON_INVALID_REQUEST_FORMAT; + memcpy( &payload, message->payload, sizeof( TEST_OVERRIDE_ARRAY_PAYLOAD_T ) ); + + if ( FALSE == payload.reset ) + { + result = testSetConcentratePumpParkCmdFaultedOverride( payload.index, (U16)payload.state.u32 ); + } + else + { + result = testResetConcentratePumpParkCmdFaultedOverride( payload.index ); + } } - // Respond to request - sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, status ); - sendServiceModeResponse( status, (U32)reject ); + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); } /*********************************************************************//** +* The handleTestDGConcPumpParkCommandRequest function handles a command +* to park a given concentrate pump. +* @details Inputs: none +* @details Outputs: message handled +* @param message a pointer to the message to handle +* @return none +*************************************************************************/ +void handleTestDGConcPumpParkCommandRequest( MESSAGE_T *message ) +{ + U32 pumpIdx; + BOOL result = FALSE; + + // verify payload length + if ( sizeof( U32 ) == message->hdr.payloadLen ) + { + memcpy( &pumpIdx, message->payload, sizeof( U32 ) ); + + result = testSetConcentratePumpParkCommand( pumpIdx ); + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** * @brief - * The sendServiceModeResponse function sends out the DG response to a - * UI request to go to service mode. + * The handleTestDrainPumpMeasuredCurrentOverride function handles a request + * to override the drain pump measured current * @details Inputs: none - * @details Outputs: Service mode request response msg constructed and queued - * @param accepted TRUE if request was accepted, FALSE if not - * @param rejCode Reject reason code explaining why request was rejected + * @details Outputs: message handled + * @param message a pointer to the message to handle * @return none *************************************************************************/ -BOOL sendServiceModeResponse( BOOL accepted, U32 rejCode ) +void handleTestDrainPumpMeasuredCurrentOverride( MESSAGE_T *message ) { - BOOL result; - MESSAGE_T msg; - U08 *payloadPtr = msg.payload; + TEST_OVERRIDE_PAYLOAD_T payload; + BOOL result = FALSE; - // Create a message record - blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_DG_RESPONSE_SERVICE_MODE_REQUEST; - msg.hdr.payloadLen = sizeof( BOOL ) + sizeof( U32 ); + // verify payload length + if ( sizeof( TEST_OVERRIDE_PAYLOAD_T ) == message->hdr.payloadLen ) + { + memcpy( &payload, message->payload, sizeof( TEST_OVERRIDE_PAYLOAD_T ) ); + if ( FALSE == payload.reset ) + { + result = testSetDrainPumpMeasuredCurrentOverride( payload.state.f32 ); + } + else + { + result = testResetDrainPumpMeasuredCurrentOverride(); + } + } - memcpy( payloadPtr, &accepted, sizeof( BOOL ) ); - payloadPtr += sizeof( BOOL ); - memcpy( payloadPtr, &rejCode, sizeof( U32 ) ); + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} - // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer - result = serializeMessage( msg, COMM_BUFFER_OUT_CAN_DG_2_HD, ACK_REQUIRED ); +/*********************************************************************//** + * @brief + * The handleTestGenIdlePublishIntervalOverride function handles a request + * to override the gen idle state publish interval + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestGenIdlePublishIntervalOverride( MESSAGE_T * message ) +{ + TEST_OVERRIDE_PAYLOAD_T payload; + BOOL result = FALSE; - return result; + // verify payload length + if ( sizeof( TEST_OVERRIDE_PAYLOAD_T ) == message->hdr.payloadLen ) + { + memcpy( &payload, message->payload, sizeof( TEST_OVERRIDE_PAYLOAD_T ) ); + if ( FALSE == payload.reset ) + { + result = testSetGenIdleSubstatesPublishIntervalOverride( payload.state.u32 ); + } + else + { + result = testResetGenIdleSubstatesPublishIntervalOverride(); + } + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); } +/*********************************************************************//** + * @brief + * The handleTestDGROPumpFeedbackVoltageOverrideRequest function handles a request + * to override the gen idle state publish interval + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestDGROPumpFeedbackVoltageOverrideRequest( MESSAGE_T * message ) +{ + TEST_OVERRIDE_PAYLOAD_T payload; + BOOL result = FALSE; + + // verify payload length + if ( sizeof( TEST_OVERRIDE_PAYLOAD_T ) == message->hdr.payloadLen ) + { + memcpy( &payload, message->payload, sizeof( TEST_OVERRIDE_PAYLOAD_T ) ); + if ( FALSE == payload.reset ) + { + result = testSetROPumpMeasuredFeedbackDutyCycleOverride( payload.state.f32 ); + } + else + { + result = testResetROPumpMeasuredFeedbackDutyCycleOverride(); + } + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** + * @brief + * The handleTestDGFillModeBroadcastOverrideRequest function handles a request + * to override the gen idle state publish interval + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestDGFillModeBroadcastOverrideRequest( MESSAGE_T * message ) +{ + TEST_OVERRIDE_PAYLOAD_T payload; + BOOL result = FALSE; + + // verify payload length + if ( sizeof( TEST_OVERRIDE_PAYLOAD_T ) == message->hdr.payloadLen ) + { + memcpy( &payload, message->payload, sizeof( TEST_OVERRIDE_PAYLOAD_T ) ); + if ( FALSE == payload.reset ) + { + result = testSetFillModeDataPublishIntervalOverride( payload.state.u32 ); + } + else + { + result = testResetFillModeDataPublishIntervalOverride(); + } + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} +/*********************************************************************//** + * @brief + * The handleTestDGFillIntegratedVolumeOverrideRequest function handles a request + * to override the gen idle state publish interval + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestDGFillIntegratedVolumeOverrideRequest( MESSAGE_T * message ) +{ + TEST_OVERRIDE_PAYLOAD_T payload; + BOOL result = FALSE; + + // verify payload length + if ( sizeof( TEST_OVERRIDE_PAYLOAD_T ) == message->hdr.payloadLen ) + { + memcpy( &payload, message->payload, sizeof( TEST_OVERRIDE_PAYLOAD_T ) ); + if ( FALSE == payload.reset ) + { + result = testSetIntegratedVolumeOverride( payload.state.u32 ); + } + else + { + result = testResetIntegratedVolumeOverride(); + } + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + /**@}*/