Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rc1b9ac0dbf2196280895d2e440dd7ac288ac8424 -r83156b9098cc97a7402db4efba5320fac8284ce4 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision c1b9ac0dbf2196280895d2e440dd7ac288ac8424) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 83156b9098cc97a7402db4efba5320fac8284ce4) @@ -8080,4 +8080,105 @@ sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); } +/*********************************************************************//** + * @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 ); +} + +/*********************************************************************//** + * @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 ); +} + /**@}*/