Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r65ed7df63ccd293199eabe968ae47b75bf015523 -r7fb421c2d6d8bfb0c768ac471d113513c5492dde --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 65ed7df63ccd293199eabe968ae47b75bf015523) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 7fb421c2d6d8bfb0c768ac471d113513c5492dde) @@ -8,7 +8,7 @@ * @file SystemCommMessages.c * * @author (last) Sean Nash -* @date (last) 03-May-2023 +* @date (last) 04-May-2023 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -8111,4 +8111,105 @@ sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); } +/*********************************************************************//** + * @brief + * The handleTestHDGetTestConfig function handles a request to get the + * test configuration per request. + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestHDGetTestConfig( MESSAGE_T* message ) +{ + BOOL result = FALSE; + + // verify payload length + if ( 0 == message->hdr.payloadLen ) + { + result = sendTestConfigStatusToDialin(); + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** + * @brief + * The handleTestHDResetAllTestConfigs function handles a request to reset + * all of the test configurations. + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestHDResetAllTestConfigs( MESSAGE_T* message ) +{ + BOOL result = FALSE; + + // verify payload length + if ( 0 == message->hdr.payloadLen ) + { + result = resetAllTestConfigs(); + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** + * @brief + * The handleTestHDDialinCheckIn function handles check in from Dialin. + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestHDDialinCheckIn( MESSAGE_T* message ) +{ + BOOL status = FALSE; + + if ( 0 == message->hdr.payloadLen ) + { + status = TRUE; + setDialinCheckInTimeStamp(); + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, status ); +} + +/*********************************************************************//** +* @brief +* The handleTestHDSetTestConfig function handles a request to set the +* test configuration. +* @details Inputs: none +* @details Outputs: message handled +* @param message a pointer to the message to handle +* @return none +*************************************************************************/ +void handleTestHDSetTestConfig( MESSAGE_T *message ) +{ + BOOL status = FALSE; + + if ( message->hdr.payloadLen == sizeof( TEST_CONFIG_PAYLOAD_T ) ) + { + TEST_CONFIG_PAYLOAD_T payload; + + memcpy( &payload, message->payload, sizeof( TEST_CONFIG_PAYLOAD_T ) ); + + if ( TRUE == payload.reset ) + { + status = resetTestConfig( (TEST_CONFIG_T)payload.config ); + } + else + { + status = setTestConfig( (TEST_CONFIG_T)payload.config ); + } + } + + // Respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, status ); +} + /**@}*/